[Libreoffice-commits] .: drawinglayer/source

2012-05-11 Thread Julien Nabet
 drawinglayer/source/processor3d/zbufferprocessor3d.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit da2f9e3901d7eccf6633d4d71160b33ae060a624
Author: Julien Nabet 
Date:   Sat May 12 08:31:51 2012 +0200

Fix uninitialized value

Change-Id: I23e35a6453907e44ff43f63ad1d619920f806d03

diff --git a/drawinglayer/source/processor3d/zbufferprocessor3d.cxx 
b/drawinglayer/source/processor3d/zbufferprocessor3d.cxx
index bb35028..d65b3a0 100644
--- a/drawinglayer/source/processor3d/zbufferprocessor3d.cxx
+++ b/drawinglayer/source/processor3d/zbufferprocessor3d.cxx
@@ -374,6 +374,7 @@ public:
 mbModifyColor(false),
 mbUseTex(false),
 mbHasTexCoor(false),
+mbHasInvTexCoor(false),
 mbUseNrm(false),
 mbUseCol(false)
 {}
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2012-05-11 Thread Markus Mohrhard
 sc/inc/colorscale.hxx  |3 +++
 sc/source/core/data/colorscale.cxx |   29 +
 sc/source/core/data/conditio.cxx   |   36 
 sc/source/core/data/documen2.cxx   |5 +
 sc/source/core/data/table2.cxx |5 ++---
 5 files changed, 75 insertions(+), 3 deletions(-)

New commits:
commit dc6388e4f67b32783bb662b3f22f4496c547613c
Author: Markus Mohrhard 
Date:   Sat May 12 07:01:16 2012 +0200

ScConditionalFormat::pRanges needs to be updated correctly

ScConditionalFormat::pRanges must be updated otherwise the duplicate
value check might use the wrong range

Change-Id: I3df7d54cdcd9c8863d5fbd89eff3be83bb73f2a5

diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index 321edc4..5c13b90 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -1536,6 +1536,8 @@ void ScConditionalFormat::CompileXML()
 void ScConditionalFormat::UpdateReference( UpdateRefMode eUpdateRefMode,
 const ScRange& rRange, SCsCOL nDx, SCsROW nDy, 
SCsTAB nDz )
 {
+if(pRanges)
+pRanges->UpdateReference( eUpdateRefMode, pDoc, rRange, nDx, nDy, nDz 
);
 for (sal_uInt16 i=0; iUpdateReference(eUpdateRefMode, rRange, nDx, nDy, nDz);
 
@@ -1552,6 +1554,40 @@ void ScConditionalFormat::RenameCellStyle(const String& 
rOld, const String& rNew
 
 void ScConditionalFormat::UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos )
 {
+if(pRanges)
+{
+size_t n = pRanges->size();
+SCTAB nMinTab = std::min(nOldPos, nNewPos);
+SCTAB nMaxTab = std::max(nOldPos, nNewPos);
+for(size_t i = 0; i < n; ++i)
+{
+ScRange* pRange = (*pRanges)[i];
+SCTAB nTab = pRange->aStart.Tab();
+if(nTab < nMinTab || nTab > nMaxTab)
+{
+continue;
+}
+
+if(nTab == nOldPos)
+{
+pRange->aStart.SetTab(nNewPos);
+pRange->aEnd.SetTab(nNewPos);
+continue;
+}
+
+if(nNewPos < nOldPos)
+{
+pRange->aStart.IncTab();
+pRange->aEnd.IncTab();
+}
+else
+{
+pRange->aStart.IncTab(-1);
+pRange->aEnd.IncTab(-1);
+}
+}
+}
+
 for (sal_uInt16 i=0; iUpdateMoveTab( nOldPos, nNewPos );
 
commit 7db060e12f61a33a344006cf8dfcb4a2527495f0
Author: Markus Mohrhard 
Date:   Sat May 12 06:45:19 2012 +0200

reduce scope of this variable

Change-Id: I I98b7d83aee9f74574a4884f6066e769930e1803a

diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index c6fed2b..d13fa9f 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -650,14 +650,13 @@ void ScTable::CopyFromClip(SCCOL nCol1, SCROW nRow1, 
SCCOL nCol2, SCROW nRow2,
 SCsCOL nDx, SCsROW nDy, sal_uInt16 nInsFlag,
 bool bAsLink, bool bSkipAttrForEmpty, ScTable* 
pTable)
 {
-SCCOL i;
 
 if (nCol2 > MAXCOL) nCol2 = MAXCOL;
 if (nRow2 > MAXROW) nRow2 = MAXROW;
 if (ValidColRow(nCol1, nRow1) && ValidColRow(nCol2, nRow2))
 {
 IncRecalcLevel();
-for ( i = nCol1; i <= nCol2; i++)
+for ( SCCOL i = nCol1; i <= nCol2; i++)
 aCol[i].CopyFromClip(nRow1, nRow2, nDy, nInsFlag, bAsLink, 
bSkipAttrForEmpty, pTable->aCol[i - nDx]);
 
 //remove old notes
@@ -675,7 +674,7 @@ void ScTable::CopyFromClip(SCCOL nCol1, SCROW nRow1, SCCOL 
nCol2, SCROW nRow2,
 if ((nInsFlag & IDF_ATTRIB) != 0)
 {
 if (nRow1==0 && nRow2==MAXROW && pColWidth && pTable->pColWidth)
-for (i=nCol1; i<=nCol2; i++)
+for (SCCOL i=nCol1; i<=nCol2; i++)
 pColWidth[i] = pTable->pColWidth[i-nDx];
 
 if (nCol1==0 && nCol2==MAXCOL && mpRowHeights && 
pTable->mpRowHeights &&
commit 5ff6482b51105aa9645dbf2990cba2c1dfdd63ac
Author: Markus Mohrhard 
Date:   Sat May 12 05:59:29 2012 +0200

add color scales to copy document

Change-Id: I03e141746920c7794e18267cf01799d03c7cafb3

diff --git a/sc/inc/colorscale.hxx b/sc/inc/colorscale.hxx
index 54f0c59..e7d0944 100644
--- a/sc/inc/colorscale.hxx
+++ b/sc/inc/colorscale.hxx
@@ -50,6 +50,7 @@ private:
 public:
 ScColorScaleEntry(double nVal, const Color& rCol);
 ScColorScaleEntry(const ScColorScaleEntry& rEntry);
+ScColorScaleEntry(ScDocument* pDoc, const ScColorScaleEntry& rEntry);
 ~ScColorScaleEntry();
 
 const Color& GetColor() const;
@@ -83,6 +84,7 @@ private:
 bool CheckEntriesForRel(const ScRange& rRange) const;
 public:
 ScColorScaleFormat(ScDocument* pDoc);
+ScColorScaleFormat(ScDocument* pDoc, const ScColorScaleFormat& rFormat);
 
 Color* GetColor(const ScAddress& rAddr) const;
 void AddEntry(ScCol

[Libreoffice-commits] .: editeng/qa

2012-05-11 Thread Kohei Yoshida
 editeng/qa/unit/core-test.cxx |  139 ++
 1 file changed, 139 insertions(+)

New commits:
commit 8ed129b22d1d9f832011df1a7e37402fb8abdbb2
Author: Kohei Yoshida 
Date:   Fri May 11 23:11:10 2012 -0400

Unit test for UNO field item implementation.

Make sure the type IDs are associated with correct service names.

Change-Id: I5ff8ec7fb56f2790f9a3eca8e019c784cb27de43

diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx
index fc5828f..5c45932 100644
--- a/editeng/qa/unit/core-test.cxx
+++ b/editeng/qa/unit/core-test.cxx
@@ -41,6 +41,11 @@
 #include "editeng/eeitem.hxx"
 #include "editeng/editids.hrc"
 #include "editeng/editdoc.hxx"
+#include "editeng/unofield.hxx"
+
+#include 
+
+using namespace com::sun::star;
 
 namespace {
 
@@ -54,8 +59,14 @@ public:
 
 void testConstruction();
 
+/**
+ * Test UNO service class that implements text field items.
+ */
+void testUnoTextFields();
+
 CPPUNIT_TEST_SUITE(Test);
 CPPUNIT_TEST(testConstruction);
+CPPUNIT_TEST(testUnoTextFields);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -85,6 +96,134 @@ void Test::testConstruction()
 aEngine.SetText(aParaText);
 }
 
+namespace {
+
+bool includes(const uno::Sequence& rSeq, const rtl::OUString& 
rVal)
+{
+for (sal_Int32 i = 0, n = rSeq.getLength(); i < n; ++i)
+if (rSeq[i] == rVal)
+return true;
+
+return false;
+}
+
+}
+
+void Test::testUnoTextFields()
+{
+{
+// DATE
+SvxUnoTextField aField(text::textfield::Type::DATE);
+uno::Sequence aSvcs = aField.getSupportedServiceNames();
+bool bGood = includes(aSvcs, "com.sun.star.text.textfield.DateTime");
+CPPUNIT_ASSERT_MESSAGE("expected service is not present.", bGood);
+}
+
+{
+// URL
+SvxUnoTextField aField(text::textfield::Type::URL);
+uno::Sequence aSvcs = aField.getSupportedServiceNames();
+bool bGood = includes(aSvcs, "com.sun.star.text.textfield.URL");
+CPPUNIT_ASSERT_MESSAGE("expected service is not present.", bGood);
+}
+
+{
+// PAGE
+SvxUnoTextField aField(text::textfield::Type::PAGE);
+uno::Sequence aSvcs = aField.getSupportedServiceNames();
+bool bGood = includes(aSvcs, "com.sun.star.text.textfield.PageNumber");
+CPPUNIT_ASSERT_MESSAGE("expected service is not present.", bGood);
+}
+
+{
+// PAGES
+SvxUnoTextField aField(text::textfield::Type::PAGES);
+uno::Sequence aSvcs = aField.getSupportedServiceNames();
+bool bGood = includes(aSvcs, "com.sun.star.text.textfield.PageCount");
+CPPUNIT_ASSERT_MESSAGE("expected service is not present.", bGood);
+}
+
+{
+// TIME
+SvxUnoTextField aField(text::textfield::Type::TIME);
+uno::Sequence aSvcs = aField.getSupportedServiceNames();
+bool bGood = includes(aSvcs, "com.sun.star.text.textfield.DateTime");
+CPPUNIT_ASSERT_MESSAGE("expected service is not present.", bGood);
+}
+
+{
+// FILE
+SvxUnoTextField aField(text::textfield::Type::FILE);
+uno::Sequence aSvcs = aField.getSupportedServiceNames();
+bool bGood = includes(aSvcs, 
"com.sun.star.text.textfield.docinfo.Title");
+CPPUNIT_ASSERT_MESSAGE("expected service is not present.", bGood);
+}
+
+{
+// TABLE
+SvxUnoTextField aField(text::textfield::Type::TABLE);
+uno::Sequence aSvcs = aField.getSupportedServiceNames();
+bool bGood = includes(aSvcs, "com.sun.star.text.textfield.SheetName");
+CPPUNIT_ASSERT_MESSAGE("expected service is not present.", bGood);
+}
+
+{
+// EXTENDED TIME
+SvxUnoTextField aField(text::textfield::Type::EXTENDED_TIME);
+uno::Sequence aSvcs = aField.getSupportedServiceNames();
+bool bGood = includes(aSvcs, "com.sun.star.text.textfield.DateTime");
+CPPUNIT_ASSERT_MESSAGE("expected service is not present.", bGood);
+}
+
+{
+// EXTENDED FILE
+SvxUnoTextField aField(text::textfield::Type::EXTENDED_FILE);
+uno::Sequence aSvcs = aField.getSupportedServiceNames();
+bool bGood = includes(aSvcs, "com.sun.star.text.textfield.FileName");
+CPPUNIT_ASSERT_MESSAGE("expected service is not present.", bGood);
+}
+
+{
+// AUTHOR
+SvxUnoTextField aField(text::textfield::Type::AUTHOR);
+uno::Sequence aSvcs = aField.getSupportedServiceNames();
+bool bGood = includes(aSvcs, "com.sun.star.text.textfield.Author");
+CPPUNIT_ASSERT_MESSAGE("expected service is not present.", bGood);
+}
+
+{
+// MEASURE
+SvxUnoTextField aField(text::textfield::Type::MEASURE);
+uno::Sequence aSvcs = aField.getSupportedServiceNames();
+bool bGood = includes(aSvcs, "com.sun.star.text.textfield.Measure");
+CPPUNIT_ASSERT_MESSAGE("expected service is not

Re: [GSoC] Initial numbers on xlsx load time

2012-05-11 Thread Daniel Bankston

On 05/11/2012 05:15 PM, Kohei Yoshida wrote:

Hi there,

I just did a quick comparison of the load time of one large-ish xlsx
document that contains a bunch of number and string cells just to see
how much difference Daniel's initial changes have made.  Here is the
result: on the latest master branch, the file loaded in 52 seconds,
whereas the build from the feature/gsoc-calc-perf branch the number
was down to 32 seconds.  The file only contains one sheet, with 8
column by 30 row cells.

I think it's safe to say that we are making progress. ;-)

Kohei


Hi Kohei,

I'm glad to hear our efforts are making a difference.  Let's see if we 
can keep knocking seconds off those load times.  :-)


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


Re: How to add color scales to ODF?

2012-05-11 Thread Markus Mohrhard
Hey,


2012/5/11 Kohei Yoshida :
> On Fri, 2012-05-11 at 19:48 +0200, Markus Mohrhard wrote:
>> 2012/5/11 Kohei Yoshida :
>
>> > Come to think of it, how are we dealing with these unique values,
>> > non-unique values conditions in ODF, which has similar range
>> > requirement to color scales (and data bars)?
>> >
>>
>> The unique value condition is not saved to odf. See
>> 11d375a4e719ce4836015020d2f120765672fb09
>
> Wow.  Ok. :-(
>
>> So if we find a solution here for color scales we might use the same
>> solution to export this to odf.
>
> Yup, that makes logical sense.
>

I have thought a bit more about it and had a closer look at our the
"unique value" conditional format and discussing the problem a bit
with Eike on IRC I think the best solution would be to move all
conditional format entries out of the style section and only reference
the styles later. I just fear that this is such a big incompatible
change that we will not get this into ODF.

Advantages:
- clean: separates the information, style assigned to cell,
conditional format, conditional format entries
- respects that conditional formats are not really part of styles,
some of them just use styles
- includes the range
- styles are only referenced by conditional formats, conditional
formats are no longer a set of conditional styles
- extendable (data bars/icon sets are still missing/)
Disadvantages:
- incompatible changes
- maybe would not make it through the oasis committee

The other not so clean solution but more likely accepted solution is
to add also a new section for conditional formats. But instead of
moving all conditional formatting information just store the range in
this section.

Advantages:
- less invasive
- will not break compatibility

Disadvantages:
- need to introduce some non style parts into the style section
- not easily extendable
- information about conditional formats are divided between two places
- looks horribly wrong if you write a the structure into xml and think
about what it actually means (I know this is a bad a

I have attached a simple structure that shows the concepts behind the
first ideas. The second one is just the current implementation with an
additional section mentioning the range of a conditional format.

Regards,
Markus


Re: How to add color scales to ODF?

2012-05-11 Thread Markus Mohrhard
Hey,


2012/5/11 Kohei Yoshida :
> On Fri, 2012-05-11 at 19:48 +0200, Markus Mohrhard wrote:
>> 2012/5/11 Kohei Yoshida :
>
>> > Come to think of it, how are we dealing with these unique values,
>> > non-unique values conditions in ODF, which has similar range
>> > requirement to color scales (and data bars)?
>> >
>>
>> The unique value condition is not saved to odf. See
>> 11d375a4e719ce4836015020d2f120765672fb09
>
> Wow.  Ok. :-(
>
>> So if we find a solution here for color scales we might use the same
>> solution to export this to odf.
>
> Yup, that makes logical sense.
>

I have thought a bit more about it and had a closer look at our the
"unique value" conditional format and discussing the problem a bit
with Eike on IRC I think the best solution would be to move all
conditional format entries out of the style section and only reference
the styles later. I just fear that this is such a big incompatible
change that we will not get this into ODF.

Advantages:
- clean: separates the information, style assigned to cell,
conditional format, conditional format entries
- respects that conditional formats are not really part of styles,
some of them just use styles
- includes the range
- styles are only referenced by conditional formats, conditional
formats are no longer a set of conditional styles
- extendable (data bars/icon sets are still missing/)
Disadvantages:
- incompatible changes
- maybe would not make it through the oasis committee

The other not so clean solution but more likely accepted solution is
to add also a new section for conditional formats. But instead of
moving all conditional formatting information just store the range in
this section.

Advantages:
- less invasive
- will not break compatibility

Disadvantages:
- need to introduce some non style parts into the style section
- not easily extendable
- information about conditional formats are divided between two places
- looks horribly wrong if you write a the structure into xml and think
about what it actually means (I know this is a bad argument but I
can't better describe my feeling here)

I have attached a simple structure that shows the concepts behind the
first ideas. The second one is just the current implementation with an
additional section mentioning the range of a conditional format.

Regards,
Markus


[Libreoffice-commits] .: configure.in

2012-05-11 Thread Caolán McNamara
 configure.in |   20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 78fcdec5b062161493511c0e898051478962f490
Author: Caolán McNamara 
Date:   Sat May 12 00:30:32 2012 +0100

set better mingw32 icu defaults

Change-Id: I57b6d24c3a367ac711231046bada78619a13ab16

diff --git a/configure.in b/configure.in
index 1d84260..71b8f1f 100644
--- a/configure.in
+++ b/configure.in
@@ -7712,6 +7712,16 @@ if test "$with_system_icu" = "yes"; then
 ICU_MAJOR=`echo $ICU_VERSION | cut -d"." -f1`
 ICU_MINOR=`echo $ICU_VERSION | cut -d"." -f2`
 ICU_MICRO=`echo $ICU_VERSION | cut -d"." -f3`
+if test "$ICU_MAJOR" -ge "5" -o "$ICU_MAJOR" = "4" -a "$ICU_MINOR" -ge 
"4"; then
+ICU_RECLASSIFIED_CLOSE_PARENTHESIS="YES"
+else
+ICU_RECLASSIFIED_CLOSE_PARENTHESIS="NO"
+fi
+if test "$ICU_MAJOR" -ge "5" -o "$ICU_MAJOR" = "4" -a "$ICU_MINOR" -ge 
"9"; then
+ICU_RECLASSIFIED_PREPEND_SET_EMPTY="YES"
+else
+ICU_RECLASSIFIED_PREPEND_SET_EMPTY="NO"
+fi
 
 if test "$ICU_MAJOR" -ge "4"; then
 AC_MSG_RESULT([OK, $ICU_VERSION])
@@ -7761,16 +7771,6 @@ You can use --with-system-icu-for-build=force to use it 
anyway.])
 if test -z "$SYSTEM_GENCMN"; then
 AC_MSG_ERROR([\'gencmn\' not found in \$PATH, install the icu 
development tool \'gencmn\'])
 fi
-if test "$ICU_MAJOR" -ge "5" -o "$ICU_MAJOR" = "4" -a "$ICU_MINOR" -ge 
"4"; then
-ICU_RECLASSIFIED_CLOSE_PARENTHESIS="YES"
-else
-ICU_RECLASSIFIED_CLOSE_PARENTHESIS="NO"
-fi
-if test "$ICU_MAJOR" -ge "5" -o "$ICU_MAJOR" = "4" -a "$ICU_MINOR" -ge 
"9"; then
-ICU_RECLASSIFIED_PREPEND_SET_EMPTY="YES"
-else
-ICU_RECLASSIFIED_PREPEND_SET_EMPTY="NO"
-fi
 fi
 
 libo_MINGW_CHECK_DLL([ICUDATA], [icudata][$ICU_MAJOR][$ICU_MINOR])
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


License Statement

2012-05-11 Thread Clio
All of my past & future contributions to LibreOffice may be licensed 
under the MPL/LGPLv3+ dual license.


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


Re: minutes of ESC call ...

2012-05-11 Thread Mat M

AA for Annoying Action :) ?

I didn't ask neither but thought it was for Added Action (a new one).

Mat M
Le Fri, 11 May 2012 12:33:55 +0200, Michael Meeks   
a écrit:




On Fri, 2012-05-11 at 09:12 +0100, Michael Meeks wrote:

On Fri, 2012-05-11 at 09:55 +0200, Noel Grandin wrote:
> I'm curious - what does the AA tag mean?

Either Alcoholics Anonymous, or Action Item :-) depending how difficult
the task is that people volunteer for the meaning varies ;-)


Christina gently pointed out that 'Item' begins with an 'I' not an
A ;-) too true ! I can only plead permanent insanity - I've no idea why
I use AA - sounds like AI: would be better.

Heh,

Michael.




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


Re: incremental rebuilds after icu bump

2012-05-11 Thread Caolán McNamara
On Fri, 2012-05-11 at 13:13 -0700, julien2412 wrote:
> Just to say, after having read some very good advice from Fridrich on
> #libreoffice-dev that after several tests, this worked for me :
>  make icu.clean && make i18npools.clean
>  make icu && make icu.deliver
>  and finally make i18npools
> 
> Perhaps it may help someone else.

That looks better now that I think about it, though
s/i18npools/i18npool/

FWIW, the problem likely goes away if 
a) the icu makefile.mk was changed use the same OUT2INC pattern as the
rest of the those 3rd party modules do. copy, without preserving
timestamps, the headers from location module/untarred-somewhere/X to
module/inc/X at the end of the custom build and deliver from there to
solver.
b) generally touch everything in a 3rd party module after untarring,
with the probable nasty side-effect of autotools kicking in to
regenerate Makefile.in from Makefile.am, etc. and having a fit.

On the positive side of things, the bright note is that because the
dependency stuff in gbuilded module is working so well for so long that
its a such a WTF when something happens that subverts it rather than the
daily event it used to be.

C.

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


[GSoC] Initial numbers on xlsx load time

2012-05-11 Thread Kohei Yoshida
Hi there,

I just did a quick comparison of the load time of one large-ish xlsx
document that contains a bunch of number and string cells just to see
how much difference Daniel's initial changes have made.  Here is the
result: on the latest master branch, the file loaded in 52 seconds,
whereas the build from the feature/gsoc-calc-perf branch the number
was down to 32 seconds.  The file only contains one sheet, with 8
column by 30 row cells.

I think it's safe to say that we are making progress. ;-)

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


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

2012-05-11 Thread Markus Mohrhard
 sc/inc/colorscale.hxx  |2 ++
 sc/source/core/data/colorscale.cxx |   29 +
 sc/source/core/data/documen2.cxx   |2 ++
 sc/source/core/data/documen3.cxx   |3 +++
 sc/source/core/data/document.cxx   |9 +
 5 files changed, 45 insertions(+)

New commits:
commit 03ca37a3034027e9ef4cf80814994007fd595a95
Author: Markus Mohrhard 
Date:   Fri May 11 23:43:43 2012 +0200

update references in color scales

Change-Id: Ie86cbd173a21e79d802a03fd112ea01c0cf44116

diff --git a/sc/inc/colorscale.hxx b/sc/inc/colorscale.hxx
index 2d5839f..54f0c59 100644
--- a/sc/inc/colorscale.hxx
+++ b/sc/inc/colorscale.hxx
@@ -56,6 +56,8 @@ public:
 double GetValue() const;
 void SetFormula(const rtl::OUString& rFormula, ScDocument* pDoc, const 
ScAddress& rAddr, formula::FormulaGrammar::Grammar eGrammar = 
formula::FormulaGrammar::GRAM_DEFAULT);
 void UpdateMoveTab(SCTAB nOldTab, SCTAB nNewTab, SCTAB nTabNo);
+void UpdateReference( UpdateRefMode eUpdateRefMode,
+const ScRange& rRange, SCsCOL nDx, SCsROW nDy, SCsTAB nDz );
 
 bool GetMin() const;
 bool GetMax() const;
diff --git a/sc/source/core/data/colorscale.cxx 
b/sc/source/core/data/colorscale.cxx
index 728d23e..6a249ff 100644
--- a/sc/source/core/data/colorscale.cxx
+++ b/sc/source/core/data/colorscale.cxx
@@ -82,6 +82,15 @@ void ScColorScaleEntry::UpdateMoveTab( SCTAB nOldTab, SCTAB 
nNewTab, SCTAB nTabN
 }
 }
 
+void ScColorScaleEntry::UpdateReference( UpdateRefMode eUpdateRefMode,
+const ScRange& rRange, SCsCOL nDx, SCsROW nDy, SCsTAB nDz )
+{
+if(mpCell)
+{
+mpCell->UpdateReference( eUpdateRefMode, rRange, nDx, nDy, nDz );
+}
+}
+
 const Color& ScColorScaleEntry::GetColor() const
 {
 return maColor;
@@ -390,6 +399,17 @@ void ScColorScaleFormat::UpdateMoveTab(SCTAB nOldTab, 
SCTAB nNewTab)
 }
 }
 
+void ScColorScaleFormat::UpdateReference( UpdateRefMode eUpdateRefMode,
+const ScRange& rRange, SCsCOL nDx, SCsROW nDy, SCsTAB nDz )
+{
+maRanges.UpdateReference( eUpdateRefMode, mpDoc, rRange, nDx, nDy, nDz );
+
+for(iterator itr = begin(); itr != end(); ++itr)
+{
+itr->UpdateReference(eUpdateRefMode, rRange, nDx, nDy, nDz);
+}
+}
+
 bool ScColorScaleFormat::CheckEntriesForRel(const ScRange& rRange) const
 {
 bool bNeedUpdate = false;
@@ -500,4 +520,13 @@ void ScColorScaleFormatList::UpdateMoveTab(SCTAB nOldTab, 
SCTAB nNewTab)
 }
 }
 
+void ScColorScaleFormatList::UpdateReference( UpdateRefMode eUpdateRefMode,
+const ScRange& rRange, SCsCOL nDx, SCsROW nDy, SCsTAB nDz )
+{
+for(iterator itr = begin(); itr != end(); ++itr)
+{
+itr->UpdateReference( eUpdateRefMode, rRange, nDx, nDy, nDz );
+}
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index 605f9cd..1120f05 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -866,6 +866,8 @@ bool ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, 
const ScMarkData* pOnlyM
 //  update conditional formats after table is inserted
 if ( pCondFormList )
 pCondFormList->UpdateReference( URM_INSDEL, aRange, 0,0,1 
);
+if ( mpColorScaleList )
+mpColorScaleList->UpdateReference( URM_INSDEL, aRange, 
0,0,1 );
 if ( pValidationList )
 pValidationList->UpdateReference( URM_INSDEL, aRange, 
0,0,1 );
 // sheet names of references may not be valid until sheet is 
copied
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index f016df5..f1bce7b 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -79,6 +79,7 @@
 #include "formulaparserpool.hxx"
 #include "clipparam.hxx"
 #include "sheetevents.hxx"
+#include "colorscale.hxx"
 #include "queryentry.hxx"
 
 #include "globalnames.hxx"
@@ -1006,6 +1007,8 @@ void ScDocument::UpdateReference( UpdateRefMode 
eUpdateRefMode,
 pDPCollection->UpdateReference( eUpdateRefMode, aRange, nDx, 
nDy, nDz );
 UpdateChartRef( eUpdateRefMode, nCol1, nRow1, nTab1, nCol2, nRow2, 
nTab2, nDx, nDy, nDz );
 UpdateRefAreaLinks( eUpdateRefMode, aRange, nDx, nDy, nDz );
+if ( mpColorScaleList )
+mpColorScaleList->UpdateReference( eUpdateRefMode, aRange, 
nDx, nDy, nDz );
 if ( pCondFormList )
 pCondFormList->UpdateReference( eUpdateRefMode, aRange, nDx, 
nDy, nDz );
 if ( pValidationList )
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 52a8d7d..d24cb7f 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -75,6 +75,7 @@
 #include "markdata.hxx"
 #include "drwlayer.hxx"
 #include "conditio.hxx"
+#include "colorsca

Re: [PATCH 3-5] fdo#47644 performance regression on largish .doc

2012-05-11 Thread Michael Meeks

On Fri, 2012-05-11 at 21:06 +0100, Michael Meeks wrote:
>   So I pushed this to master; I attach a speculative back-port to 3.5 -
> it gives the rest of the rather substantial speedup we need vs. where we
> were; I'd like to get it in. I also tested the
> 'get-position-of-byte-after-the-end' code path which seems to work
> nicely too.

Argh - and it's entirely possible that this breaks the
CVE-2010-3454-1.doc test on -3-5 - but it's rather too late to double
check that now; seems to pass on master though; most odd. Will poke
Monday.

HTH,

Michael.

-- 
michael.me...@suse.com  <><, Pseudo Engineer, itinerant idiot

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


Contributions

2012-05-11 Thread Antoine Proulx
Hi,

Just to say: all of my past & future contributions to LibreOffice may be
licensed under the MPL/LGPLv3+ dual license.

I hope that can help you!
Antoine Proulx
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] .: 2 commits - basebmp/source basebmp/test basegfx/inc basegfx/source unusedcode.easy vcl/headless

2012-05-11 Thread Matus Kukan
 basebmp/source/debug.cxx|4 ++
 basebmp/test/bmpdemo.cxx|1 
 basegfx/inc/basegfx/polygon/b2dpolygontools.hxx |4 --
 basegfx/inc/basegfx/polygon/b3dpolygontools.hxx |4 --
 basegfx/source/polygon/b2dpolygontools.cxx  |   44 
 basegfx/source/polygon/b3dpolygontools.cxx  |   26 --
 unusedcode.easy |3 -
 vcl/headless/svptext.cxx|4 --
 8 files changed, 4 insertions(+), 86 deletions(-)

New commits:
commit 7327195602e7870e20a4eebb8ea26ae7294f065b
Author: Matúš Kukan 
Date:   Fri May 11 10:56:12 2012 +0200

put debugDump behind #if OSL_DEBUG_LEVEL > 2

basebmp/source/debug.cxx is only for vcl/headless/svpgdi.cxx

Change-Id: I I Ib0624d919d7c0c5ce54dbef62fa0b49fd6eb0ab1

diff --git a/basebmp/source/debug.cxx b/basebmp/source/debug.cxx
index 5491715..53e7bf7 100644
--- a/basebmp/source/debug.cxx
+++ b/basebmp/source/debug.cxx
@@ -26,6 +26,8 @@
  *
  /
 
+#if OSL_DEBUG_LEVEL > 2
+
 #include 
 
 #include 
@@ -106,4 +108,6 @@ namespace basebmp
 }
 }
 
+#endif // OSL_DEBUG_LEVEL > 2
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basebmp/test/bmpdemo.cxx b/basebmp/test/bmpdemo.cxx
index 6b94921..02b392a 100644
--- a/basebmp/test/bmpdemo.cxx
+++ b/basebmp/test/bmpdemo.cxx
@@ -62,7 +62,6 @@
 #include 
 #include 
 #include 
-#include 
 
 #include 
 
diff --git a/unusedcode.easy b/unusedcode.easy
index 379de29..6a71b43 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -300,7 +300,6 @@ _SwPamRanges_SAR::_ForEach(unsigned short, unsigned short, 
unsigned char (*)(SwP
 _SwRedlineTbl::Insert(SwRedline* const*, unsigned short)
 _SwRedlineTbl::Insert(_SwRedlineTbl const*, unsigned short, unsigned short)
 _SwRedlineTbl::Remove(SwRedline* const&, unsigned short)
-basebmp::debugDump(boost::shared_ptr const&, 
std::basic_ostream >&)
 
binfilter::B3dEdgeEntryBucketMemArr::Insert(binfilter::B3dEdgeEntryBucketMemArr 
const*, unsigned short, unsigned short, unsigned short)
 binfilter::B3dEdgeEntryBucketMemArr::Replace(char const*&, unsigned short)
 binfilter::B3dEdgeEntryBucketMemArr::Replace(char const**, unsigned short, 
unsigned short)
diff --git a/vcl/headless/svptext.cxx b/vcl/headless/svptext.cxx
index 26abf38..2eecfbd 100644
--- a/vcl/headless/svptext.cxx
+++ b/vcl/headless/svptext.cxx
@@ -34,10 +34,6 @@
 
 #include 
 
-#if OSL_DEBUG_LEVEL > 2
-#include 
-#endif
-
 #include 
 #include 
 #include 
commit 5c3615c1152eabfda508504c8a4c5727868acbc8
Author: Matúš Kukan 
Date:   Fri May 11 10:50:01 2012 +0200

unusedcode: basegfx::tools::equal

Change-Id: I I579fd3de05f78f06af06c53afab1cc70fc700082

diff --git a/basegfx/inc/basegfx/polygon/b2dpolygontools.hxx 
b/basegfx/inc/basegfx/polygon/b2dpolygontools.hxx
index d26475e..0c106cb 100644
--- a/basegfx/inc/basegfx/polygon/b2dpolygontools.hxx
+++ b/basegfx/inc/basegfx/polygon/b2dpolygontools.hxx
@@ -426,10 +426,6 @@ namespace basegfx
 */
 BASEGFX_DLLPUBLIC B2DPolygon createWaveline(const B2DPolygon& 
rCandidate, double fWaveWidth, double fWaveHeight);
 
-//
-// comparators with tolerance for 2D Polygons
-BASEGFX_DLLPUBLIC bool equal(const B2DPolygon& rCandidateA, const 
B2DPolygon& rCandidateB, const double& rfSmallValue);
-
 /** snap some polygon coordinates to discrete coordinates
 
 This method allows to snap some polygon points to discrete 
(integer) values
diff --git a/basegfx/inc/basegfx/polygon/b3dpolygontools.hxx 
b/basegfx/inc/basegfx/polygon/b3dpolygontools.hxx
index 1ff1e6e..8ebead8 100644
--- a/basegfx/inc/basegfx/polygon/b3dpolygontools.hxx
+++ b/basegfx/inc/basegfx/polygon/b3dpolygontools.hxx
@@ -122,10 +122,6 @@ namespace basegfx
 // and a line given by start and end point
 BASEGFX_DLLPUBLIC bool getCutBetweenLineAndPlane(const B3DVector& 
rPlaneNormal, const B3DPoint& rPlanePoint, const B3DPoint& rEdgeStart, const 
B3DPoint& rEdgeEnd, double& fCut);
 
-//
-// comparators with tolerance for 3D Polygons
-BASEGFX_DLLPUBLIC bool equal(const B3DPolygon& rCandidateA, const 
B3DPolygon& rCandidateB, const double& rfSmallValue);
-
 /** snap some polygon coordinates to discrete coordinates
 
 This method allows to snap some polygon points to discrete 
(integer) values
diff --git a/basegfx/source/polygon/b2dpolygontools.cxx 
b/basegfx/source/polygon/b2dpolygontools.cxx
index cfe9f3a..babc779 100644
--- a/basegfx/source/polygon/b2dpolygontools.cxx
+++ b/basegfx/source/polygon/b2dpolygontools.cxx
@@ -3121,50 +3121,6 @@ namespace basegfx
 return aRetval;
 }
 
-/

[Libreoffice-commits] .: configure.in i18npool/CustomTarget_breakiterator.mk

2012-05-11 Thread Caolán McNamara
 configure.in   |   14 ++
 i18npool/CustomTarget_breakiterator.mk |   16 
 2 files changed, 30 insertions(+)

New commits:
commit f2827fb15f530e002d722780be26caf326a45646
Author: Caolán McNamara 
Date:   Fri May 11 21:42:39 2012 +0100

debug foo for mingw32 build

Change-Id: I1d5f9940c6f85269373ccbdc9caa6c5696996c9f

diff --git a/configure.in b/configure.in
index e3943eb..1d84260 100644
--- a/configure.in
+++ b/configure.in
@@ -7734,6 +7734,16 @@ if test "$with_system_icu" = "yes"; then
 You can use --with-system-icu-for-build=force to use it anyway.])
 fi
 fi
+if test "$ICU_MAJOR_FOR_BUILD" -ge "5" -o "$ICU_MAJOR_FOR_BUILD" = "4" 
-a "$ICU_MINOR_FOR_BUILD" -ge "4"; then
+ICU_RECLASSIFIED_CLOSE_PARENTHESIS="YES"
+else
+ICU_RECLASSIFIED_CLOSE_PARENTHESIS="NO"
+fi
+if test "$ICU_MAJOR_FOR_BUILD" -ge "5" -o "$ICU_MAJOR_FOR_BUILD" = "4" 
-a "$ICU_MINOR_FOR_BUILD" -ge "9"; then
+ICU_RECLASSIFIED_PREPEND_SET_EMPTY="YES"
+else
+ICU_RECLASSIFIED_PREPEND_SET_EMPTY="NO"
+fi
 fi
 
 if test "$cross_compiling" != "yes" -o "$with_system_icu_for_build" = 
"yes" -o "$with_system_icu_for_build" = "force"; then
@@ -7753,9 +7763,13 @@ You can use --with-system-icu-for-build=force to use it 
anyway.])
 fi
 if test "$ICU_MAJOR" -ge "5" -o "$ICU_MAJOR" = "4" -a "$ICU_MINOR" -ge 
"4"; then
 ICU_RECLASSIFIED_CLOSE_PARENTHESIS="YES"
+else
+ICU_RECLASSIFIED_CLOSE_PARENTHESIS="NO"
 fi
 if test "$ICU_MAJOR" -ge "5" -o "$ICU_MAJOR" = "4" -a "$ICU_MINOR" -ge 
"9"; then
 ICU_RECLASSIFIED_PREPEND_SET_EMPTY="YES"
+else
+ICU_RECLASSIFIED_PREPEND_SET_EMPTY="NO"
 fi
 fi
 
diff --git a/i18npool/CustomTarget_breakiterator.mk 
b/i18npool/CustomTarget_breakiterator.mk
index 1c70184..e8253b9 100644
--- a/i18npool/CustomTarget_breakiterator.mk
+++ b/i18npool/CustomTarget_breakiterator.mk
@@ -102,12 +102,28 @@ $(i18npool_BIDIR)/%.brk : $(i18npool_BIDIR)/%.txt 
$(i18npool_GENBRKTARGET)
 # NOTE: strips every line with _word_ 'Prepend', including $Prepend
 $(i18npool_BIDIR)/%.txt : \
$(SRCDIR)/i18npool/source/breakiterator/data/%.txt | 
$(i18npool_BIDIR)/.dir
+ifeq ($(GUI)$(COM),WNTGCC)
+   echo DEBUG i18npool 
ICU_RECLASSIFIED_CLOSE_PARENTHESIS=$(ICU_RECLASSIFIED_CLOSE_PARENTHESIS)
+   echo DEBUG i18npool 
ICU_RECLASSIFIED_PREPEND_SET_EMPTY=$(ICU_RECLASSIFIED_PREPEND_SET_EMPTY)
+   cat $(SRC_ROOT)/config_host.mk
+   cat $(SRC_ROOT)/config.log
+   cat $(SRC_ROOT)/configure
+endif
 ifeq ($(ICU_RECLASSIFIED_CLOSE_PARENTHESIS),YES)
 ifeq ($(ICU_RECLASSIFIED_PREPEND_SET_EMPTY),YES)
+ifeq ($(GUI)$(COM),WNTGCC)
+   echo DEBUG both
+endif
sed "s#\[:LineBreak =  Close_Punctuation:\]#\[\[:LineBreak =  
Close_Punctuation:\] \[:LineBreak = Close_Parenthesis:\]\]#" $< | sed 
"/Prepend/d" > $@
 else
+ifeq ($(GUI)$(COM),WNTGCC)
+   echo DEBUG only one
+endif
sed "s#\[:LineBreak =  Close_Punctuation:\]#\[\[:LineBreak =  
Close_Punctuation:\] \[:LineBreak = Close_Parenthesis:\]\]#" $< > $@
 endif
+ifeq ($(GUI)$(COM),WNTGCC)
+   cat $@
+endif
 else
cp $< $@
 endif
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


How to get values for rtlbootstrap.mk in configure?

2012-05-11 Thread Matúš Kukan
Hello,

I just remembered that rtlbootstrap.mk is empty for Windows for quite
some time now.
http://cgit.freedesktop.org/libreoffice/core/tree/sal/CustomTarget_generated.mk#n36

That's probably not good.
There is a comment that the variables (RTL_OS RTL_ARCH) should be set
by configure
http://cgit.freedesktop.org/libreoffice/core/tree/sdext/platform.mk#n28

How could I do that ?
Well, it's easy to get the values for my platform but how to do it for all ?
Somebody wants to do it as an easy hack ;-) ?

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


[REVIEW][3-5] fdo#44010 Writer vertical text frame border painting regression

2012-05-11 Thread Michael Stahl

yet another case of invisible borders in Writer, or rather in this case
they were painted as points, which isn't that helpful.

proposed fix for libreoffice-3-5:

http://cgit.freedesktop.org/libreoffice/core/commit/?id=3f6d3a4045507d1496709c5cff8f359a0d0e8b29

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


Re: Where to store templates?

2012-05-11 Thread Michael Meeks
Hi Alexander,

On Fri, 2012-05-11 at 11:30 -0700, Alexander Wilms wrote:
> I want to add some templates to the repository, but I'm not sure where they
> should be stored

:-) So - I guess we should clobber the existing templates with the new
ones; which leads to the question of - where are the existing ones -
extras/ is almost certainly the place - as you say :-)

The extras/README should be packed with this sort of useful information
but ... is not ;-)

> (https://wiki.documentfoundation.org/Design/Call_for_Templates#Submissions).
> "root/extras/source/templates/layout" or
> "root/extras/source/templates/presnt"? There are two presentation templates
> and one writer document containing a certain formatting, the text could be
> deleted and none of the documents needs to be translated. The slideshow
> templates contain several master slides, if that matters.

So - which are you going to do first ? :-)

Incidentally - one golden rule here is that - when you push something
to git it is there *forever* - which means that every subsequent git
clone anyone in the world will ever do will include your data :-)

What is the moral of that ?

a) don't check-in lots of big binary files unless they
   are really very static / complete :-)
b) come up with cunning programmatic ways to not do translation
   of templates in the utterly dumb way it's done now ;-)
c) try to share big things - eg. images across templates
   without checking them in repeatedly (and bundling them
   into distributions).

Just some hints there really; ie. about the worst thing you can do is
whack some big beautiful high-res image into a template, and then check
it in for each language with a minor tweak. Sadly the packaging code
takes great delight in duplicating such things per-language already
so ... until Gabor fixes this to make templates variously sanely
translateable (IIRC).

There is a bug for some of this: eg.

https://bugs.freedesktop.org/show_bug.cgi?id=49098
or  https://bugs.freedesktop.org/show_bug.cgi?id=49101

Personally, I'd prefer to have '.fodp' '.fodt' etc. files in there, so
we can actually see what is happening as they are changed by people and
version control becomes meaningful :-)

Anyhow - not sure if that helped much but ... :-)

Thanks !

Michael.

-- 
michael.me...@suse.com  <><, Pseudo Engineer, itinerant idiot

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


[Libreoffice-commits] .: sw/source

2012-05-11 Thread Michael Stahl
 sw/source/core/layout/paintfrm.cxx |  159 -
 1 file changed, 87 insertions(+), 72 deletions(-)

New commits:
commit 3f6d3a4045507d1496709c5cff8f359a0d0e8b29
Author: Michael Stahl 
Date:   Fri May 11 21:41:10 2012 +0200

fdo#44010: fix vertical text frame borders:

Frames with text direction Vertical RTL have their borders mangled while
painting, everything is rotated 90 degrees and so the model "left" border
ends up being painted as top border etc.  Clearly the new drawing layer
based painting code is very surprised by this and ends up painting only
points instead of lines.
(regression from 0f0896c26fb260d1bbf31d7a886df3f61837f0f2)

diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index b317fba..1fc1744 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -4544,6 +4544,89 @@ double lcl_GetExtent( const SvxBorderLine* pSideLine, 
const SvxBorderLine* pOppo
 return nExtent;
 }
 
+static void
+lcl_MakeBorderLine(SwRect const& rRect,
+bool const isVerticalInModel,
+bool const isLeftOrTopBorderInModel,
+SvxBorderLine const& rBorder,
+SvxBorderLine const*const pLeftOrTopNeighbour,
+SvxBorderLine const*const pRightOrBottomNeighbour)
+{
+// fdo#44010: for vertical text lcl_PaintTopBottomLine produces vertical
+// borders and lcl_PaintLeftRightLine horizontal ones.
+bool const isVertical(rRect.Height() > rRect.Width());
+bool const isLeftOrTopBorder((isVerticalInModel == isVertical)
+? isLeftOrTopBorderInModel
+: (isLeftOrTopBorderInModel != isVertical));
+SvxBorderLine const*const pStartNeighbour(
+(!isVertical && isVerticalInModel)
+? pRightOrBottomNeighbour : pLeftOrTopNeighbour);
+SvxBorderLine const*const pEndNeighbour(
+(pStartNeighbour == pLeftOrTopNeighbour)
+? pRightOrBottomNeighbour : pLeftOrTopNeighbour);
+
+basegfx::B2DPoint aStart;
+basegfx::B2DPoint aEnd;
+if (isVertical)
+{   // fdo#38635: always from outer edge
+double const fStartX( (isLeftOrTopBorder)
+? rRect.Left()  + (rRect.Width() / 2.0)
+: rRect.Right() - (rRect.Width() / 2.0));
+aStart.setX(fStartX);
+aStart.setY(rRect.Top() +
+lcl_AlignHeight(lcl_GetLineWidth(pStartNeighbour))/2.0);
+aEnd.setX(fStartX);
+aEnd.setY(rRect.Bottom() -
+lcl_AlignHeight(lcl_GetLineWidth(pEndNeighbour))/2.0);
+}
+else
+{   // fdo#38635: always from outer edge
+double const fStartY( (isLeftOrTopBorder)
+? rRect.Top()+ (rRect.Height() / 2.0)
+: rRect.Bottom() - (rRect.Height() / 2.0));
+aStart.setX(rRect.Left() +
+lcl_AlignWidth(lcl_GetLineWidth(pStartNeighbour))/2.0);
+aStart.setY(fStartY);
+aEnd.setX(rRect.Right() -
+lcl_AlignWidth(lcl_GetLineWidth(pEndNeighbour))/2.0);
+aEnd.setY(fStartY);
+}
+
+double const nExtentLeftStart = (isLeftOrTopBorder == isVertical)
+?   lcl_GetExtent(pStartNeighbour, 0)
+:   lcl_GetExtent(0, pStartNeighbour);
+double const nExtentLeftEnd = (isLeftOrTopBorder == isVertical)
+?   lcl_GetExtent(pEndNeighbour, 0)
+:   lcl_GetExtent(0, pEndNeighbour);
+double const nExtentRightStart = (isLeftOrTopBorder == isVertical)
+?   lcl_GetExtent(0, pStartNeighbour)
+:   lcl_GetExtent(pStartNeighbour, 0);
+double const nExtentRightEnd = (isLeftOrTopBorder == isVertical)
+?   lcl_GetExtent(0, pEndNeighbour)
+:   lcl_GetExtent(pEndNeighbour, 0);
+
+double const nLeftWidth = (isLeftOrTopBorder == isVertical)
+ ? rBorder.GetInWidth() : rBorder.GetOutWidth();
+double const nRightWidth = (isLeftOrTopBorder == isVertical)
+ ? rBorder.GetOutWidth() : rBorder.GetInWidth();
+Color const aLeftColor = (isLeftOrTopBorder == isVertical)
+? rBorder.GetColorIn(isLeftOrTopBorder)
+: rBorder.GetColorOut(isLeftOrTopBorder);
+Color const aRightColor = (isLeftOrTopBorder == isVertical)
+? rBorder.GetColorOut(isLeftOrTopBorder)
+: rBorder.GetColorIn(isLeftOrTopBorder);
+
+::rtl::Reference const xLine =
+new BorderLinePrimitive2D(
+aStart, aEnd, nLeftWidth, rBorder.GetDistance(), nRightWidth,
+nExtentLeftStart, nExtentLeftEnd,
+nExtentRightStart, nExtentRightEnd,
+aLeftColor.getBColor(), aRightColor.getBColor(),
+rBorder.GetColorGap().getBColor(), rBorder.HasGapColor(),
+rBorder.GetStyle() );
+g_pBorderLines->AddBorderLine(xLine);
+}
+
 // OD 19.05.2003 #109667# - merge  and 
 // into new method 
 void lcl_PaintLeftRightLine( const sal_Bool _bLeft,
@@ -4608,41 +4691,8 @@ void lcl_PaintLeftRightLine( const sal_Bool

Re: incremental rebuilds after icu bump

2012-05-11 Thread julien2412
Just to say, after having read some very good advice from Fridrich on
#libreoffice-dev that after several tests, this worked for me :
 make icu.clean && make i18npools.clean
 make icu && make icu.deliver
 and finally make i18npools

Perhaps it may help someone else.


--
View this message in context: 
http://nabble.documentfoundation.org/incremental-rebuilds-after-icu-bump-tp3980871p3980921.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


[PATCH 3-5] fdo#47644 performance regression on largish .doc

2012-05-11 Thread Michael Meeks

On Fri, 2012-05-11 at 16:32 +0100, Caolán McNamara wrote:
> > So - how about the attached diff, hopefully rather easier to review &
> > back-port :-)
> 
> Seems sane, though it probably makes sense to tweak the trigger for
> calling buildPageChainCache as the units for nNew there are in bytes
> while the define is in "pages". And we might want to avoid calling it in
> the case of a small relative jump in pages forward.

So I pushed this to master; I attach a speculative back-port to 3.5 -
it gives the rest of the rather substantial speedup we need vs. where we
were; I'd like to get it in. I also tested the
'get-position-of-byte-after-the-end' code path which seems to work
nicely too.

Thanks,

Michael.

-- 
michael.me...@suse.com  <><, Pseudo Engineer, itinerant idiot
>From 3cbfc50821ce4ec44a2c27c097cc88f64f47e2c2 Mon Sep 17 00:00:00 2001
From: Michael Meeks 
Date: Fri, 11 May 2012 20:19:21 +0100
Subject: [PATCH] sot: Improve OLE2 offset-to-page computation with a FAT
 layout vector

---
 sot/source/sdstor/stgstrms.cxx |   85 ++--
 sot/source/sdstor/stgstrms.hxx |3 +
 2 files changed, 76 insertions(+), 12 deletions(-)

diff --git a/sot/source/sdstor/stgstrms.cxx b/sot/source/sdstor/stgstrms.cxx
index 5e6c1ea..8d3d758 100644
--- a/sot/source/sdstor/stgstrms.cxx
+++ b/sot/source/sdstor/stgstrms.cxx
@@ -26,12 +26,12 @@
  *
  /
 
+#include 
 
 #include  // memcpy()
-
+#include 
 #include 
 #include 
-#include 
 
 #include "sot/stg.hxx"
 #include "stgelem.hxx"
@@ -334,6 +334,37 @@ void StgStrm::SetEntry( StgDirEntry& r )
 r.SetDirty();
 }
 
+/*
+ * The page chain, is basically a singly linked list of slots each
+ * point to the next page. Instead of traversing the file structure
+ * for this each time build a simple flat in-memory vector list
+ * of pages.
+ */
+bool StgStrm::buildPageChainCache()
+{
+if (nSize > 0)
+m_aPagesCache.reserve(nSize/nPageSize);
+
+sal_Int32 nBgn = nStart;
+while (nBgn >= 0)
+{
+m_aPagesCache.push_back(nBgn);
+sal_Int32 nOldBgn = nBgn;
+nBgn = pFat->GetNextPage(nBgn);
+if (nBgn == nOldBgn)
+return false;
+}
+
+return true;
+}
+
+//See fdo#47644 for a .doc with a vast amount of pages where seeking around the
+//document takes a colossal amount of time
+//
+//There's a cost to building a page cache, so only build one if the number of
+//pages to seek through hits some sufficiently high value where it's worth it.
+#define ARBITRARY_LARGE_AMOUNT_OF_PAGES 8 * 512
+
 // Compute page number and offset for the given byte position.
 // If the position is behind the size, set the stream right
 // behind the EOF.
@@ -353,9 +384,35 @@ sal_Bool StgStrm::Pos2Page( sal_Int32 nBytePos )
 nPos = nBytePos;
 if( nOld == nNew )
 return sal_True;
+
+if (m_aPagesCache.empty() && nNew > ARBITRARY_LARGE_AMOUNT_OF_PAGES)
+{
+SAL_WARN("sot", "kicking off large seek helper\n");
+buildPageChainCache();
+}
+
+if (!m_aPagesCache.empty())
+{
+size_t nIdx = nNew / nPageSize;
+
+// special case: seek to 1st byte of new, unallocated page
+// (in case the file size is a multiple of the page size)
+if( nBytePos == nSize && !nOffset && nIdx == m_aPagesCache.size() )
+{
+nIdx--;
+nOffset = nPageSize;
+}
+
+if (nIdx < m_aPagesCache.size())
+{
+nPage = m_aPagesCache[ nIdx ];
+return sal_Bool( nPage >= 0 );
+}
+}
+
 if( nNew > nOld )
 {
-// the new position is behind the current, so an incremental
+// the new position is after the current, so an incremental
 // positioning is OK. Set the page relative position
 nRel = nNew - nOld;
 nBgn = nPage;
@@ -404,6 +461,8 @@ StgPage* StgStrm::GetPhysPage( sal_Int32 nBytePos, sal_Bool bForce )
 
 sal_Bool StgStrm::Copy( sal_Int32 nFrom, sal_Int32 nBytes )
 {
+m_aPagesCache.clear();
+
 sal_Int32 nTo = nStart;
 sal_Int32 nPgs = ( nBytes + nPageSize - 1 ) / nPageSize;
 while( nPgs-- )
@@ -430,6 +489,8 @@ sal_Bool StgStrm::Copy( sal_Int32 nFrom, sal_Int32 nBytes )
 
 sal_Bool StgStrm::SetSize( sal_Int32 nBytes )
 {
+m_aPagesCache.clear();
+
 // round up to page size
 sal_Int32 nOld = ( ( nSize + nPageSize - 1 ) / nPageSize ) * nPageSize;
 sal_Int32 nNew = ( ( nBytes + nPageSize - 1 ) / nPageSize ) * nPageSize;
@@ -528,6 +589,8 @@ sal_Int32 StgFATStrm::GetPage( short nOff, sal_Bool bMake, sal_uInt16 *pnMasterA
 {
 if( bMake )
 {
+m_aPagesCache.clear();
+
 // create a new master page
 nFAT = nMaxPage++;
 pMaster = rIo.Copy( nFAT, STG_FREE );
@@ -582,6 +645,8 @@ sal_Int32 StgFATStrm::GetPage( short nOff, sal_Bool bMak

[REVIEW 3-5] fdo#48070 fix parsing of arc paths

2012-05-11 Thread Christina Roßmanith

Hi,

I've changed lcl_importNumberAndSpaces to lcl_importFlagAndSpaces 
because it is only used to import flags (single digit). Values != 0 or 
=! 1 return false as does a '-'. Now missing white space between flags 
isn't a problem any longer.


commit 508fcf698ec7cd97af1eb8936ab30b257143bc1b

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


incremental rebuilds after icu bump

2012-05-11 Thread Caolán McNamara
bumping icu to the latest version has revealed a bit of a gotcha with
the delivering of headers from some of those third-party libraries into
the solver

the icu/prj/d.lst delivers headers right out of the build tree into the
solver. deliver carefully retains the initial timestamps of those files,
and they were untarred to retain their original timestamps

i.e. the non-generated-during-the-build icu headers are timestamped Apr
05 2012 or some such, so if you can't incrementally rebuild because some
stuff isn't getting correctly rebuilt (or some
generated-header-in-old-icu isn't getting replaced by a
nongenerated-bundled-header-in-new-icu) try a manual...

rm -rf solver/*/inc/external/unicode/ solver/*/inc/external/layout/

C.

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


[Libreoffice-commits] .: 2 commits - basegfx/source filter/source

2012-05-11 Thread Christina Rossmanith
 basegfx/source/polygon/b2dsvgpolypolygon.cxx |   35 +
 filter/source/svg/svgreader.cxx  |  486 ---
 2 files changed, 247 insertions(+), 274 deletions(-)

New commits:
commit 508fcf698ec7cd97af1eb8936ab30b257143bc1b
Author: Chr. Rossmanith 
Date:   Fri May 11 21:24:12 2012 +0200

fdo#48070 fix parsing of arc paths

Change-Id: Iffd726eec08da453e5a72c512ef2df35f22b5573

diff --git a/basegfx/source/polygon/b2dsvgpolypolygon.cxx 
b/basegfx/source/polygon/b2dsvgpolypolygon.cxx
index e3e60cd..fc6e2ac 100644
--- a/basegfx/source/polygon/b2dsvgpolypolygon.cxx
+++ b/basegfx/source/polygon/b2dsvgpolypolygon.cxx
@@ -143,35 +143,36 @@ namespace basegfx
 return true;
 }
 
-bool lcl_importNumberAndSpaces(sal_Int32&o_nRetval,
-   sal_Int32&   io_rPos,
-   const ::rtl::OUString&   rStr,
-   const sal_Int32  nLen)
+bool lcl_importFlagAndSpaces(sal_Int32&   o_nRetval,
+ sal_Int32&   io_rPos,
+ const ::rtl::OUString&   rStr,
+ const sal_Int32  nLen)
 {
 sal_Unicode aChar( rStr[io_rPos] );
 ::rtl::OUStringBuffer sNumberString;
 
-if(sal_Unicode('+') == aChar || sal_Unicode('-') == aChar)
+if(sal_Unicode('+') == aChar)
 {
 sNumberString.append(rStr[io_rPos]);
 aChar = rStr[++io_rPos];
 }
 
-while(sal_Unicode('0') <= aChar && sal_Unicode('9') >= aChar)
+if(sal_Unicode('0') == aChar)
 {
-sNumberString.append(rStr[io_rPos]);
-aChar = rStr[++io_rPos];
+o_nRetval = 0;
+++io_rPos;
 }
-
-if(sNumberString.getLength())
+else if (sal_Unicode('1') == aChar)
 {
-o_nRetval = sNumberString.makeStringAndClear().toInt32();
-lcl_skipSpacesAndCommas(io_rPos, rStr, nLen);
-
-return true;
+o_nRetval = 1;
+++io_rPos;
 }
+else
+return false;
 
-return false;
+lcl_skipSpacesAndCommas(io_rPos, rStr, nLen);
+
+return true;
 }
 
 void lcl_putNumberChar( ::rtl::OUStringBuffer& rStr,
@@ -621,8 +622,8 @@ namespace basegfx
 if(!lcl_importDoubleAndSpaces(fRX, nPos, 
rSvgDStatement, nLen)) return false;
 if(!lcl_importDoubleAndSpaces(fRY, nPos, 
rSvgDStatement, nLen)) return false;
 if(!lcl_importDoubleAndSpaces(fPhi, nPos, 
rSvgDStatement, nLen)) return false;
-if(!lcl_importNumberAndSpaces(bLargeArcFlag, nPos, 
rSvgDStatement, nLen)) return false;
-if(!lcl_importNumberAndSpaces(bSweepFlag, nPos, 
rSvgDStatement, nLen)) return false;
+if(!lcl_importFlagAndSpaces(bLargeArcFlag, nPos, 
rSvgDStatement, nLen)) return false;
+if(!lcl_importFlagAndSpaces(bSweepFlag, nPos, 
rSvgDStatement, nLen)) return false;
 if(!lcl_importDoubleAndSpaces(nX, nPos, 
rSvgDStatement, nLen)) return false;
 if(!lcl_importDoubleAndSpaces(nY, nPos, 
rSvgDStatement, nLen)) return false;
 
commit b4d25b7be20a06297b5536c56b4214691e735444
Author: Chr. Rossmanith 
Date:   Tue May 8 21:29:24 2012 +0200

get rid of many USTR()

Change-Id: I7d98f36037f589ea742de53b2a52e2c5bdf7c48f

diff --git a/filter/source/svg/svgreader.cxx b/filter/source/svg/svgreader.cxx
index 36e3dd5..3f59155 100644
--- a/filter/source/svg/svgreader.cxx
+++ b/filter/source/svg/svgreader.cxx
@@ -236,7 +236,7 @@ struct AnnotatingVisitor
 // that first, as it sets our defaults here (manually
 // tracking default state on each Gradient variable is
 // much more overhead)
-uno::Reference 
xNode(xAttributes->getNamedItem(USTR("href")));
+uno::Reference 
xNode(xAttributes->getNamedItem("href"));
 if(xNode.is())
 {
 const rtl::OUString sValue(xNode->getNodeValue());
@@ -274,7 +274,7 @@ struct AnnotatingVisitor
 // that first, as it sets our defaults here (manually
 // tracking default state on each Gradient variable is
 // much more overhead)
-uno::Reference 
xNode(xAttributes->getNamedItem(USTR("href")));
+uno:

Re: failed unit test: sal_osl_file

2012-05-11 Thread Terrence Enger
On Fri, 2012-05-11 at 14:23 +0200, Stephan Bergmann wrote:
> On 05/09/2012 11:17 PM, Terrence Enger wrote:
> > I am trying to build master commit id 5c2c0e3, pulled 2012-05-08, on
> > ubuntu-natty (11.04), and it is failing in unit test sal_osl_file.
> 
> I saw this exact same strange error with the 
> Linux-RHEL6-x86_64@14-with-check tinderbox recently, and assume it is 
> related to the GCC version used on that machine (RHEL 6 GCC 4.4.6) in 
> combination with the recent clean-up of how configure options affect the 
> -O level (switching a --enable-dbgutil build from -O0 to -O2, 
> potentially uncovering optimization-related issues).  I worked around it 
> by adding --enable-debug (so I'm back at -O0).

I have added --enable-debug to my configure options.  The build seems to
have passed the previous point of failure.

Thank you for your help.
Terry.


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


License for my contributions

2012-05-11 Thread Tobias Rosenberger
Hello,

all of my past & future contributions to LibreOffice
may be licensed under the MPL/LGPLv3+ dual license.

Greetings,

Tobias



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


Re: [REVIEW 3-5] Allow keyword Append to be used as a variable. bnc#745930

2012-05-11 Thread Noel Power

On 11/05/12 17:56, Markus Mohrhard wrote:

Hey

2012/5/11 Noel Power:

On 11/05/12 13:53, Michael Meeks wrote:

[...]
yes & no there is it appears one existing test in there that tests 
the SbiScanner class directly. But yeah I think it would be useful to 
be able to try and compile ( maybe even run ) arbitrary basic source 
code ( I thought about doing this before anyway ) Maybe I just need 
to get the finger out 

We already have such a test case. macros_test in sw and sc can execute
any star basic and vba code.

sure I know about those ( I think I even had some hand in them :-) ) but 
iirc there are alot of dependencies ( and basic is much earlier in the 
stack ) I am looking for something less needy that can exercise the 
basic's core functionality compiling, parsing etc. an maybe running very 
core basic stuff ( e.g. not any uno related stuff ) I am currently 
trying to get something running in the basic module like that ( but am 
running into some teething problems ;-) ) But hopefully next week I'll 
get to fix them


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


[Libreoffice-commits] .: sot/source

2012-05-11 Thread Michael Meeks
 sot/source/sdstor/stgstrms.cxx |  109 ++---
 sot/source/sdstor/stgstrms.hxx |1 
 2 files changed, 38 insertions(+), 72 deletions(-)

New commits:
commit 7ed1e9aa174b915aab627762db7b473968b7501e
Author: Michael Meeks 
Date:   Fri May 11 19:49:27 2012 +0100

sot: simplify the storage stream FAT item cache

Change-Id: Icb6fe9341244dfd53300f58ac85560604f53558a

diff --git a/sot/source/sdstor/stgstrms.cxx b/sot/source/sdstor/stgstrms.cxx
index 3ee485e..f8b9776 100644
--- a/sot/source/sdstor/stgstrms.cxx
+++ b/sot/source/sdstor/stgstrms.cxx
@@ -334,27 +334,12 @@ void StgStrm::SetEntry( StgDirEntry& r )
 r.SetDirty();
 }
 
-namespace lcl
-{
-#if defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L
-using std::is_sorted;
-#else
-template  bool is_sorted(iter aStart, iter aEnd)
-{
-if (aStart == aEnd)
-return true;
-
-for (iter aNext = aStart + 1; aNext != aEnd; aStart = aNext, ++aNext)
-{
-if (*aNext < *aStart)
-return false;
-}
-
-return true;
-}
-#endif
-}
-
+/*
+ * The page chain, is basically a singly linked list of slots each
+ * point to the next page. Instead of traversing the file structure
+ * for this each time build a simple flat in-memory vector list
+ * of pages.
+ */
 bool StgStrm::buildPageChainCache()
 {
 if (nSize > 0)
@@ -370,10 +355,6 @@ bool StgStrm::buildPageChainCache()
 return false;
 }
 
-m_bSortedPageChain = lcl::is_sorted(m_aPagesCache.begin(), 
m_aPagesCache.end());
-
-SAL_WARN_IF(!m_bSortedPageChain, "sot", "unsorted page chain, that's 
suspicious");
-
 return true;
 }
 
@@ -382,7 +363,7 @@ bool StgStrm::buildPageChainCache()
 //
 //There's a cost to building a page cache, so only build one if the number of
 //pages to seek through hits some sufficiently high value where it's worth it.
-#define ARBITRARY_LARGE_AMOUNT_OF_PAGES 256
+#define ARBITRARY_LARGE_AMOUNT_OF_PAGES 8 * 512
 
 // Compute page number and offset for the given byte position.
 // If the position is behind the size, set the stream right
@@ -403,6 +384,32 @@ sal_Bool StgStrm::Pos2Page( sal_Int32 nBytePos )
 nPos = nBytePos;
 if( nOld == nNew )
 return sal_True;
+
+if (m_aPagesCache.empty() && nNew > ARBITRARY_LARGE_AMOUNT_OF_PAGES)
+{
+SAL_WARN("sot", "kicking off large seek helper\n");
+buildPageChainCache();
+}
+
+if (!m_aPagesCache.empty())
+{
+size_t nIdx = nNew / nPageSize;
+
+// special case: seek to 1st byte of new, unallocated page
+// (in case the file size is a multiple of the page size)
+if( nBytePos == nSize && !nOffset && nIdx == m_aPagesCache.size() )
+{
+nIdx--;
+nOffset = nPageSize;
+}
+
+if (nIdx < m_aPagesCache.size())
+{
+nPage = m_aPagesCache[ nIdx ];
+return sal_Bool( nPage >= 0 );
+}
+}
+
 if( nNew > nOld )
 {
 // the new position is after the current, so an incremental
@@ -421,58 +428,18 @@ sal_Bool StgStrm::Pos2Page( sal_Int32 nBytePos )
 nRel /= nPageSize;
 
 sal_Int32 nLast = STG_EOF;
-if (m_aPagesCache.empty() && nRel < ARBITRARY_LARGE_AMOUNT_OF_PAGES)
+while (nRel && nBgn >= 0)
 {
-while (nRel && nBgn >= 0)
-{
-nLast = nBgn;
-nBgn = pFat->GetNextPage( nBgn );
-nRel--;
-}
-}
-else if (nBgn >= 0)
-{
-//Seeking large distances is slow, so if we're starting seeking (some
-//fairly arbitrary) large distances, build a cache and re-use it for
-//subsequent seeks
-if (m_aPagesCache.empty())
-{
-SAL_WARN("sot", "kicking off large seek helper\n");
-buildPageChainCache();
-}
-
-std::vector::iterator aI;
-
-if (m_bSortedPageChain)
-aI = std::lower_bound(m_aPagesCache.begin(), m_aPagesCache.end(), 
nBgn);
-else
-aI = std::find(m_aPagesCache.begin(), m_aPagesCache.end(), nBgn);
-
-if (aI == m_aPagesCache.end())
-{
-SAL_WARN("sot", "Unknown page position");
-nBgn = STG_EOF;
-}
-else
-{
-size_t nBgnIndex = std::distance(m_aPagesCache.begin(), aI);
-size_t nIndex = nBgnIndex + nRel;
-
-if (nIndex >= m_aPagesCache.size())
-nIndex = m_aPagesCache.size() - 1;
-
-size_t nSuccessfulStepsTaken = nIndex - nBgnIndex;
-nRel -= nSuccessfulStepsTaken;
-
-nLast = nIndex ? m_aPagesCache[nIndex - 1] : STG_EOF;
-nBgn = m_aPagesCache[nIndex];
-}
+nLast = nBgn;
+nBgn = pFat->GetNextPage( nBgn );
+nRel--;
 }
 
 // special case: seek to 1st byte of new, unallocated page
 // (in case the file size is a multiple of the page size)
 if( nB

Re: [PATCH] fdo#47246 fix headless and android build

2012-05-11 Thread Riccardo Magliocchetti

Il 11/05/2012 20:16, Riccardo Magliocchetti ha scritto:

[this time with the patch]

Tor,

the attached patch is needed to fix --enable-headless build for me,
since the code is shared with android i think that is needed for android
too. Does it work for you too?


It fails linking, /me goes back to the drawing board.

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



[Libreoffice-commits] .: sd/source

2012-05-11 Thread Lubos Lunak
 sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx |   45 +++
 1 file changed, 31 insertions(+), 14 deletions(-)

New commits:
commit e4450c54aee85b295b933e91d207fd8220c01107
Author: Luboš Luňák 
Date:   Fri May 11 20:33:23 2012 +0200

avoid recursion that can mess up DND setup (fdo#41996)

The way too smart ctor for the DND handler started drag immediately,
causing a race condition that could recurse to setting a handler
again before the first one was actually set, thus immediately again
causing the DND to be stopped, and then possibly later again started,
depending on how the race condition turned out. Use delayed initialization
to avoid this.

Change-Id: I528eddbdc7c52a19675997e4c866506c662cff19

diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx 
b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
index 2a48a7c..0d3fc63 100644
--- a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
@@ -251,10 +251,11 @@ public:
 MultiSelectionModeHandler (
 SlideSorter& rSlideSorter,
 SelectionFunction& rSelectionFunction,
-const Point& rMouseModelPosition,
-const sal_uInt32 nEventCode);
+const Point& rMouseModelPosition);
 virtual ~MultiSelectionModeHandler (void);
 
+void Initialize(const sal_uInt32 nEventCode);
+
 virtual SelectionFunction::Mode GetMode (void) const;
 virtual void Abort (void);
 virtual void ProcessEvent (SelectionFunction::EventDescriptor& 
rDescriptor);
@@ -300,11 +301,10 @@ class DragAndDropModeHandler : public 
SelectionFunction::ModeHandler
 public:
 DragAndDropModeHandler (
 SlideSorter& rSlideSorter,
-SelectionFunction& rSelectionFunction,
-const Point& rMousePosition,
-::Window* pWindow);
+SelectionFunction& rSelectionFunction);
 virtual ~DragAndDropModeHandler (void);
 
+void Initialize(const Point& rMousePosition, ::Window* pWindow);
 virtual SelectionFunction::Mode GetMode (void) const;
 virtual void Abort (void);
 
@@ -817,8 +817,13 @@ void SelectionFunction::SwitchToDragAndDropMode (const 
Point aMousePosition)
 {
 if (mpModeHandler->GetMode() != DragAndDropMode)
 {
-SwitchMode(::boost::shared_ptr(
-new DragAndDropModeHandler(mrSlideSorter, *this, aMousePosition, 
mpWindow)));
+::boost::shared_ptr handler(
+new DragAndDropModeHandler(mrSlideSorter, *this));
+SwitchMode(handler);
+// Delayed initialization, only after mpModeHanler is set, otherwise 
DND initialization
+// could already trigger DND events, which would recursively trigger 
this code again,
+// and without mpModeHandler set it would again try to set a new 
handler.
+handler->Initialize(aMousePosition, mpWindow);
 }
 }
 
@@ -830,8 +835,14 @@ void SelectionFunction::SwitchToMultiSelectionMode (
 const sal_uInt32 nEventCode)
 {
 if (mpModeHandler->GetMode() != MultiSelectionMode)
-SwitchMode(::boost::shared_ptr(
-new MultiSelectionModeHandler(mrSlideSorter, *this, 
aMousePosition, nEventCode)));
+{
+::boost::shared_ptr handler(
+new MultiSelectionModeHandler(mrSlideSorter, *this, 
aMousePosition));
+SwitchMode(handler);
+// Delayed initialization, only after mpModeHanler is set, the handle 
ctor
+// is non-trivial, so it could possibly recurse just like the DND 
handler above.
+handler->Initialize(nEventCode);
+}
 }
 
 
@@ -1502,8 +1513,7 @@ void NormalModeHandler::ResetButtonDownLocation (void)
 MultiSelectionModeHandler::MultiSelectionModeHandler (
 SlideSorter& rSlideSorter,
 SelectionFunction& rSelectionFunction,
-const Point& rMouseModelPosition,
-const sal_uInt32 nEventCode)
+const Point& rMouseModelPosition)
 : ModeHandler(rSlideSorter, rSelectionFunction, false),
   meSelectionMode(SM_Normal),
   maSecondCorner(rMouseModelPosition),
@@ -1512,6 +1522,11 @@ MultiSelectionModeHandler::MultiSelectionModeHandler (
   mnSecondIndex(-1),
   maButtonBarLock(rSlideSorter)
 {
+}
+
+
+void MultiSelectionModeHandler::Initialize(const sal_uInt32 nEventCode)
+{
 const Pointer aSelectionPointer (POINTER_TEXT);
 mrSlideSorter.GetContentWindow()->SetPointer(aSelectionPointer);
 SetSelectionModeFromModifier(nEventCode);
@@ -1751,11 +1766,13 @@ void MultiSelectionModeHandler::UpdateSelection (void)
 
 DragAndDropModeHandler::DragAndDropModeHandler (
 SlideSorter& rSlideSorter,
-SelectionFunction& rSelectionFunction,
-const Point& rMousePosition,
-::Window* pWindow)
+SelectionFunction& rSelectionFunction)
 : ModeHandler(rSlideSorter, rSelectionFunction, false)
 {
+}
+
+void DragAndDropModeHandler::Initialize(const Point& rMousePosition, ::Window* 
pWindow)
+{
 SdTransferable* pDragTransferab

[Libreoffice-commits] .: Branch 'feature/gsoc-calc-perf' - sc/source

2012-05-11 Thread Daniel Bankston
 sc/source/filter/oox/worksheethelper.cxx |   11 ---
 1 file changed, 8 insertions(+), 3 deletions(-)

New commits:
commit 09c095bbc9dd44d9dc46e09d6fd75d56edda42d8
Author: Daniel Bankston 
Date:   Fri May 11 12:04:14 2012 -0500

Replace extra XFormulaTokens call with direct ScDocument

Change-Id: Ib7469c4214687021efdcfb9bbf162ee6eb6404c4

diff --git a/sc/source/filter/oox/worksheethelper.cxx 
b/sc/source/filter/oox/worksheethelper.cxx
index 835324b..84b1678 100644
--- a/sc/source/filter/oox/worksheethelper.cxx
+++ b/sc/source/filter/oox/worksheethelper.cxx
@@ -69,6 +69,7 @@
 #include "sharedstringsbuffer.hxx"
 #include "sheetdatabuffer.hxx"
 #include "stylesbuffer.hxx"
+#include "tokenuno.hxx"
 #include "unitconverter.hxx"
 #include "viewsettings.hxx"
 #include "workbooksettings.hxx"
@@ -1587,9 +1588,13 @@ void WorksheetHelper::putRichString( const CellAddress& 
rAddress, const RichStri
 
 void WorksheetHelper::putFormulaTokens( const CellAddress& rAddress, const 
ApiTokenSequence& rTokens ) const
 {
-Reference< XFormulaTokens > xTokens( getCell( rAddress ), UNO_QUERY );
-OSL_ENSURE( xTokens.is(), "WorksheetHelper::putFormulaTokens - missing 
token interface" );
-if( xTokens.is() ) xTokens->setTokens( rTokens );
+ScDocument& rDoc = getScDocument();
+ScTokenArray aTokenArray;
+ScAddress aCellPos;
+ScUnoConversion::FillScAddress( aCellPos, rAddress );
+ScTokenConversion::ConvertToTokenArray( rDoc, aTokenArray, rTokens );
+ScBaseCell* pNewCell = new ScFormulaCell( &rDoc, aCellPos, &aTokenArray );
+rDoc.PutCell( aCellPos, pNewCell, sal_True );
 }
 
 void WorksheetHelper::initializeWorksheetImport()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[PATCH] Fix autogen.sh configuration when ACLOCAL_FLAGS are non-empty

2012-05-11 Thread Ruslan Kabatsayev
Hello all.

Current autogen.sh only sets "-I ./m4" when ACLOCAL_FLAGS are empty,
leading to problems with expansion of libo_MINGW_CHECK_DLL macro.
As people on IRC have said, it should append this option to existing
flags. So, I'm attaching a patch which fixes this.

Regards,
Ruslan


0001-autogen.sh-append-aclocal-arguments-to-ACLOCAL_FLAGS.patch
Description: Binary data
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: How to add color scales to ODF?

2012-05-11 Thread Kohei Yoshida
On Fri, 2012-05-11 at 19:48 +0200, Markus Mohrhard wrote:
> 2012/5/11 Kohei Yoshida :

> > Come to think of it, how are we dealing with these unique values,
> > non-unique values conditions in ODF, which has similar range
> > requirement to color scales (and data bars)?
> >
> 
> The unique value condition is not saved to odf. See
> 11d375a4e719ce4836015020d2f120765672fb09

Wow.  Ok. :-(

> So if we find a solution here for color scales we might use the same
> solution to export this to odf.

Yup, that makes logical sense.

Kohei

-- 
Kohei Yoshida, LibreOffice hacker, Calc

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


Where to store templates?

2012-05-11 Thread Alexander Wilms
Hi,

I want to add some templates to the repository, but I'm not sure where they
should be stored
(https://wiki.documentfoundation.org/Design/Call_for_Templates#Submissions).
"root/extras/source/templates/layout" or
"root/extras/source/templates/presnt"? There are two presentation templates
and one writer document containing a certain formatting, the text could be
deleted and none of the documents needs to be translated. The slideshow
templates contain several master slides, if that matters.

Thanks in advance

Alex

--
View this message in context: 
http://nabble.documentfoundation.org/Where-to-store-templates-tp3980690.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


[PATCH] fdo#47246 fix headless and android build

2012-05-11 Thread Riccardo Magliocchetti

[this time with the patch]

Tor,

the attached patch is needed to fix --enable-headless build for me, 
since the code is shared with android i think that is needed for android 
too. Does it work for you too?


thanks,
riccardo
>From cf3672d14b6559cb63b7355441d14944d1d454e6 Mon Sep 17 00:00:00 2001
From: Riccardo Magliocchetti 
Date: Fri, 11 May 2012 20:09:41 +0200
Subject: [PATCH] fdo#47246: vcl: fix headless build and android compilation

Change-Id: I5212c5d023ed968b4e0f538adaa3e7b6b5e690d8
---
 vcl/Library_vcl.mk |   14 --
 1 files changed, 0 insertions(+), 14 deletions(-)

diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index bf03be2..3a1907d 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -417,18 +417,6 @@ vcl_generic_code=\
 vcl/generic/fontmanager/helper \
 vcl/generic/fontmanager/parseAFM
 
-vcl_headless_code=\
-vcl/headless/svpbmp \
-vcl/headless/svpdummies \
-vcl/headless/svpelement \
-vcl/headless/svpframe \
-vcl/headless/svpgdi \
-vcl/headless/svpinst \
-vcl/headless/svpdata \
-vcl/headless/svpprn \
-vcl/headless/svptext \
-vcl/headless/svpvd
-
 $(eval $(call gb_Library_add_defs,vcl,\
 $(if $(VALGRIND_CFLAGS), \
 $(VALGRIND_CFLAGS) \
@@ -479,7 +467,6 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
 vcl/unx/generic/printer/ppdparser \
 vcl/null/printerinfomanager \
 vcl/headless/headlessinst \
-	$(vcl_headless_code) \
 ))
 
 $(eval $(call gb_Library_use_libraries,vcl,\
@@ -509,7 +496,6 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
 vcl/unx/generic/printer/ppdparser \
 vcl/null/printerinfomanager \
 vcl/android/androidinst \
-	$(vcl_headless_code) \
 ))
 
 $(eval $(call gb_Library_use_libraries,vcl,\
-- 
1.7.5.4

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


[PATCH] fdo#47246 fix headless and android build

2012-05-11 Thread Riccardo Magliocchetti

Tor,

the attached patch is needed to fix --enable-headless build for me, 
since the code is shared with android i think that is needed for android 
too. Does it work for you too?


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


Re: How to add color scales to ODF?

2012-05-11 Thread Markus Mohrhard
2012/5/11 Kohei Yoshida :
> On Fri, May 11, 2012 at 11:50 AM, Kohei Yoshida  
> wrote:
>
>> My gut feeling (totally unscientific and may be illogical) tells me
>> that wedging this information into the style section may not be the
>> cleanest approach.  I could, however, imagine we define these color
>> scales elsewhere, and reference them from the style section somehow,
>> either by name or by index.  Or just totally leave it outside the
>> style section.  Somehow I tend to think that this feature behaves more
>> like a database range, chart source range, or pivot table data source,
>> than conditional formatting.  And based on how Markus is implementing
>> it so far even in the core, the color scale data is separated stored
>> than the conventional conditional formatting data.
>
> Actually I'll take a step back from this.  The existing conditional
> formatting implementation *does* have the concept of ranges.  For
> instance, unique values condition only makes sense when it's applied
> to a range of cells.  So, color scales may be considered a logical
> extension of the conventional conditional formatting.
>
> Come to think of it, how are we dealing with these unique values,
> non-unique values conditions in ODF, which has similar range
> requirement to color scales (and data bars)?
>

The unique value condition is not saved to odf. See
11d375a4e719ce4836015020d2f120765672fb09

So if we find a solution here for color scales we might use the same
solution to export this to odf.

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


[Libreoffice-commits] .: editeng/source offapi/com sc/source sd/source svx/source

2012-05-11 Thread Kohei Yoshida
 editeng/source/items/flditem.cxx|1 -
 editeng/source/uno/unofield.cxx |   10 --
 editeng/source/xml/xmltxtexp.cxx|2 +-
 offapi/com/sun/star/text/textfield/Type.idl |2 --
 sc/source/ui/unoobj/fielduno.cxx|5 +
 sd/source/ui/unoidl/unomodel.cxx|2 +-
 svx/source/unodraw/unomod.cxx   |2 +-
 7 files changed, 4 insertions(+), 20 deletions(-)

New commits:
commit ee5fc5d25fe102c30daf7d181b8181d40b85a4f3
Author: Kohei Yoshida 
Date:   Fri May 11 13:03:07 2012 -0400

Removing EXTENDED_DATE. There is really no such thing.

This can be safely substituted by the normal DATE.

Change-Id: I I6b4ccfa342a8d7b638b013cdce64a0b7ff477ec0

diff --git a/editeng/source/items/flditem.cxx b/editeng/source/items/flditem.cxx
index d5aec5b..bcc578d 100644
--- a/editeng/source/items/flditem.cxx
+++ b/editeng/source/items/flditem.cxx
@@ -63,7 +63,6 @@ SvxFieldData* SvxFieldData::Create(const 
uno::Reference& xTe
 case text::textfield::Type::TIME:
 case text::textfield::Type::EXTENDED_TIME:
 case text::textfield::Type::DATE:
-case text::textfield::Type::EXTENDED_DATE:
 {
 sal_Bool bIsDate = false;
 xPropSet->getPropertyValue(UNO_TC_PROP_IS_DATE) >>= bIsDate;
diff --git a/editeng/source/uno/unofield.cxx b/editeng/source/uno/unofield.cxx
index 83cad2d..a156c89 100644
--- a/editeng/source/uno/unofield.cxx
+++ b/editeng/source/uno/unofield.cxx
@@ -146,7 +146,6 @@ const SfxItemPropertySet* ImplGetFieldItemPropertySet( 
sal_Int32 mnId )
 
 switch( mnId )
 {
-case text::textfield::Type::EXTENDED_DATE:
 case text::textfield::Type::EXTENDED_TIME:
 case text::textfield::Type::DATE:
 return &aExDateTimeFieldPropertySet_Impl;
@@ -266,7 +265,6 @@ SvxUnoTextField::SvxUnoTextField( sal_Int32 nServiceId ) 
throw()
 
 switch( nServiceId )
 {
-case text::textfield::Type::EXTENDED_DATE:
 case text::textfield::Type::DATE:
 mpImpl->mbBoolean2 = sal_True;
 mpImpl->mnInt32 = SVXDATEFORMAT_STDSMALL;
@@ -329,7 +327,6 @@ SvxUnoTextField::SvxUnoTextField( uno::Reference< 
text::XTextRange > xAnchor, co
 switch( mnServiceId )
 {
 case text::textfield::Type::DATE:
-case text::textfield::Type::EXTENDED_DATE:
 {
 mpImpl->mbBoolean2 = sal_True;
 // #i35416# for variable date field, don't use invalid 
"-00-00" date,
@@ -403,7 +400,6 @@ SvxFieldData* SvxUnoTextField::CreateFieldData() const 
throw()
 case text::textfield::Type::TIME:
 case text::textfield::Type::EXTENDED_TIME:
 case text::textfield::Type::DATE:
-case text::textfield::Type::EXTENDED_DATE:
 {
 if( mpImpl->mbBoolean2 ) // IsDate?
 {
@@ -630,8 +626,6 @@ OUString SAL_CALL SvxUnoTextField::getPresentation( 
sal_Bool bShowCommand )
 return OUString("Footer");
 case text::textfield::Type::PRESENTATION_DATE_TIME:
 return OUString("DateTime");
-case text::textfield::Type::EXTENDED_DATE:
-return OUString("ExtDate");
 default:
 return OUString("Unknown");
 }
@@ -879,10 +873,6 @@ uno::Sequence< OUString > SAL_CALL 
SvxUnoTextField::getSupportedServiceNames()
 pServices[2] = "com.sun.star.presentation.TextField.DateTime";
 pServices[3] = "com.sun.star.presentation.textfield.DateTime";
 break;
-case text::textfield::Type::EXTENDED_DATE:
-pServices[2] = "com.sun.star.text.TextField.DateTime";
-pServices[3] = "com.sun.star.text.textfield.DateTime";
-break;
 default:
 aSeq.realloc(0);
 }
diff --git a/editeng/source/xml/xmltxtexp.cxx b/editeng/source/xml/xmltxtexp.cxx
index 15ea264..a0455ff 100644
--- a/editeng/source/xml/xmltxtexp.cxx
+++ b/editeng/source/xml/xmltxtexp.cxx
@@ -245,7 +245,7 @@ uno::Reference< uno::XInterface > SAL_CALL 
SvxSimpleUnoModel::createInstance( co
 
RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.TextField.DateTime")))
)
 {
-return (::cppu::OWeakObject * )new SvxUnoTextField( 
text::textfield::Type::EXTENDED_DATE );
+return (::cppu::OWeakObject * )new SvxUnoTextField( 
text::textfield::Type::DATE );
 }
 
 return SvxUnoTextCreateTextField( aServiceSpecifier );
diff --git a/offapi/com/sun/star/text/textfield/Type.idl 
b/offapi/com/sun/star/text/textfield/Type.idl
index a9a2653..cfa864a 100644
--- a/offapi/com/sun/star/text/textfield/Type.idl
+++ b/offapi/com/sun/star/text/textfield/Type.idl
@@ -60,8 +60,6 @@ constants Type
 const long PRESENTATION_HEADER= 11;
 const long PRESENTATION_FOOTER= 12;
 const long PRESENTATION_DATE_TIME = 13;
-
-const long EXTENDED_DATE = 14;
 };
 
 }; }; }; }; };
diff --git a/sc/source/ui/unoobj/fielduno.cxx b/sc

Re: [REVIEW 3-5] Allow keyword Append to be used as a variable. bnc#745930

2012-05-11 Thread Markus Mohrhard
Hey

2012/5/11 Noel Power :
> On 11/05/12 13:53, Michael Meeks wrote:
>>
>> On Fri, 2012-05-11 at 12:47 +0100, Noel Power wrote:
>>>
>>> please see
>>>
>>> http://cgit.freedesktop.org/libreoffice/core/commit/?id=634b211632847dcb04b31f478296e5e6d732ac73
>>> hopefully ripe for cherry-picking
>>
>>        Is there an easily extensible unit testing framework in-place for
>> this
>> sort of thing ? :-)
>>
>
> yes & no there is it appears one existing test in there that tests the
> SbiScanner class directly. But yeah I think it would be useful to be able to
> try and compile ( maybe even run ) arbitrary basic source code ( I thought
> about doing this before anyway ) Maybe I just need to get the finger out
>

We already have such a test case. macros_test in sw and sc can execute
any star basic and vba code.

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


[RFC] cleanup cairo detection

2012-05-11 Thread Riccardo Magliocchetti

Hello,

finally managed to get back to libo after a few and found that cairo is 
needed even with --disable-cairo-canvas.


The situation is a bit more convoluted than last time so while at move 
all the cairo related machinery in the same place and try to make easier 
to follow the various cases.


I won't have a full build before monday (update: it failed, looks 
unrelated) so any review / test in the mean time is appreciated.


Will post a proper patch from git after i get the build sorted out.

thanks,
riccardo
diff --git a/configure.in b/configure.in
index e3943eb..085e25c 100644
--- a/configure.in
+++ b/configure.in
@@ -8763,21 +8763,6 @@ if test "$enable_split_opt_features" = "yes"; then
 fi
 AC_SUBST(SPLIT_OPT_FEATURES)
 
-if test $_os = Darwin -o $_os = WINNT; then
-if test "$enable_cairo_canvas" = yes; then
-AC_MSG_ERROR([The cairo canvas should not be used for this platform])
-fi
-enable_cairo_canvas=no
-elif test -z "$enable_cairo_canvas"; then
-enable_cairo_canvas=yes
-fi
-
-ENABLE_CAIRO_CANVAS=""
-if test "$enable_cairo_canvas" = "yes"; then
-ENABLE_CAIRO_CANVAS="TRUE"
-fi
-AC_SUBST(ENABLE_CAIRO_CANVAS)
-
 dnl ===
 dnl Check whether the GStreamer libraries are available.
 dnl ===
@@ -10349,58 +10334,82 @@ AC_SUBST(LIBRSVG_CFLAGS)
 AC_SUBST(LIBRSVG_LIBS)
 AC_SUBST(SYSTEM_LIBRSVG)
 
-dnl ===
-dnl Test whether to build cairo or rely on the system version
-dnl ===
+dnl ===
+dnl Test whether to build cairo, rely on the system version or don't use it at all
+dnl ===
 
+dnl Check and warn is cairo has been enabled by mistake
+CAIRO_BY_MISTAKE=no
+if test $_os = Darwin -o $_os = WINNT; then
+CAIRO_BY_MISTAKE=yes
+enable_cairo_canvas=no
+if test $_os = WINNT; then
+dnl We only need cairo for Windows if we
+dnl build librsvg or directx disabled
+if test "$ENABLE_LIBRSVG" != NO -o -z "$ENABLE_DIRECTX"; then
+enable_cairo_canvas=yes
+CAIRO_BY_MISTAKE=no
+fi
+fi
+elif test -z "$enable_cairo_canvas"; then
+enable_cairo_canvas=yes
+fi
 
-SYSTEM_CAIRO=""
+if test "$ENABLE_LIBRSVG" != NO; then
+enable_cairo_canvas=yes
+fi
+
+if test "$CAIRO_BY_MISTAKE" = "yes" -a "$enable_cairo_canvas" != "yes"; then
+AC_MSG_ERROR([The cairo canvas should not be used for this platform])
+enable_cairo_canvas=no
+fi
 
-AC_MSG_CHECKING([whether to use the system cairo])
+ENABLE_CAIRO_CANVAS=""
+if test "$enable_cairo_canvas" = "yes"; then
+ENABLE_CAIRO_CANVAS="TRUE"
+fi
+AC_SUBST(ENABLE_CAIRO_CANVAS)
 
-if test "$with_system_cairo" = "yes"; then
-SYSTEM_CAIRO=YES
-AC_MSG_RESULT([yes])
 
-PKG_CHECK_MODULES( CAIRO, cairo >= 1.0.2 )
+SYSTEM_CAIRO=""
+if test "$enable_cairo_canvas" = "yes"; then
+AC_MSG_CHECKING([whether to use the system cairo])
+if test "$with_system_cairo" = "yes"; then
+SYSTEM_CAIRO=YES
+AC_MSG_RESULT([yes])
+
+PKG_CHECK_MODULES( CAIRO, cairo >= 1.0.2 )
 
-if test "$test_xrender" = "yes"; then
-if test "$with_system_xextensions_headers" != "no"; then
-AC_MSG_CHECKING([whether Xrender.h defines PictStandardA8])
-AC_LANG_PUSH([C])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]],[[
+if test "$test_xrender" = "yes"; then
+if test "$with_system_xextensions_headers" != "no"; then
+AC_MSG_CHECKING([whether Xrender.h defines PictStandardA8])
+AC_LANG_PUSH([C])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]],[[
 #ifdef PictStandardA8
 #else
   return fail;
 #endif
 ]])],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([no, X headers too old.])])
 
-AC_LANG_POP([C])
-fi
-fi
-libo_MINGW_CHECK_DLL([CAIRO], [libcairo])
-libo_MINGW_TRY_DLL([FONTCONFIG], [libfontconfig])
-libo_MINGW_TRY_DLL([FREETYPE], [libfreetype])
-libo_MINGW_TRY_DLL([PIXMAN], [libpixman])
-libo_MINGW_TRY_DLL([PNG15], [libpng15])
-else
-AC_MSG_RESULT([no])
-
-if test $_os = WINNT; then
-dnl We only need cairo for Windows if we
-dnl build librsvg or directx disabled
-if test "$ENABLE_LIBRSVG" != NO -o -z "$ENABLE_DIRECTX"; then
-BUILD_TYPE="$BUILD_TYPE CAIRO"
+AC_LANG_POP([C])
+fi
 fi
+libo_MINGW_CHECK_DLL([CAIRO], [libcairo])
+libo_MINGW_TRY_DLL([FONTCONFIG], [libfontconfig])
+libo_MINGW_TRY_DLL([FREETYPE], [libfreetype])
+libo_MINGW_TRY_DLL([PIXMAN], [libpixman])
+libo_MINGW_TRY_DLL([PNG15], [libpng15])
 else
-i

Re: How to add color scales to ODF?

2012-05-11 Thread Kohei Yoshida
On Fri, May 11, 2012 at 11:50 AM, Kohei Yoshida  wrote:

> My gut feeling (totally unscientific and may be illogical) tells me
> that wedging this information into the style section may not be the
> cleanest approach.  I could, however, imagine we define these color
> scales elsewhere, and reference them from the style section somehow,
> either by name or by index.  Or just totally leave it outside the
> style section.  Somehow I tend to think that this feature behaves more
> like a database range, chart source range, or pivot table data source,
> than conditional formatting.  And based on how Markus is implementing
> it so far even in the core, the color scale data is separated stored
> than the conventional conditional formatting data.

Actually I'll take a step back from this.  The existing conditional
formatting implementation *does* have the concept of ranges.  For
instance, unique values condition only makes sense when it's applied
to a range of cells.  So, color scales may be considered a logical
extension of the conventional conditional formatting.

Come to think of it, how are we dealing with these unique values,
non-unique values conditions in ODF, which has similar range
requirement to color scales (and data bars)?

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


Re: [Libreoffice-commits] .: 2 commits - accessibility/CustomTarget_bridge_inc.mk configure.in extensions/CustomTarget_so_activex_idl.mk extensions/Library_so_activex.mk extensions/Library_so_activex_

2012-05-11 Thread Lubos Lunak
On Friday 11 of May 2012, Noel Grandin wrote:
> On 2012-05-11 17:46, Lubos Lunak wrote:
> > Why are you so sure about any of these? Does somebody build with this
> > long parth successfully? E.g. your tinderbox does not.
>
> My tinderbox does. I was the tester before this patch was committed.

 Win-x86_17-Windows7-hexrex ? That one, according to its log, builds in 
C:/LibreOffice/libo/ and D:/ .

-- 
 Lubos Lunak
 l.lu...@suse.cz
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


License statement

2012-05-11 Thread Anton Meixome
All of my past & future contributions to LibreOffice may be
licensed under the MPL/LGPLv3+ dual license

-- 
Antón Méixome - Galician Native Lang Coordination
Blog about Galician Office Suite
Galician community OOo.org & LibO
http://blog.openoffice.gl
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice-commits] .: 2 commits - accessibility/CustomTarget_bridge_inc.mk configure.in extensions/CustomTarget_so_activex_idl.mk extensions/Library_so_activex.mk extensions/Library_so_activex_

2012-05-11 Thread Noel Grandin



On 2012-05-11 17:46, Lubos Lunak wrote:
Why are you so sure about any of these? Does somebody build with this 
long parth successfully? E.g. your tinderbox does not. 

My tinderbox does. I was the tester before this patch was committed.

The problems my tinderbox has been having lately appear to relate to 
intermittent internet connectivity to the LO servers, which then 
resulted in partially downloaded and applied libraries.




Disclaimer: http://www.peralex.com/disclaimer.html


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


[Libreoffice-commits] .: vcl/inc

2012-05-11 Thread Caolán McNamara
 vcl/inc/unx/gtk/gtksys.hxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 02a89fdb0e54c31e510682f9b70f9fd33fe88efa
Author: Caolán McNamara 
Date:   Fri May 11 16:58:29 2012 +0100

include deque

Change-Id: I4d3fef95d3259673115833b3ee89bd8792eb3af0

diff --git a/vcl/inc/unx/gtk/gtksys.hxx b/vcl/inc/unx/gtk/gtksys.hxx
index 582d4b9..94fe25a 100644
--- a/vcl/inc/unx/gtk/gtksys.hxx
+++ b/vcl/inc/unx/gtk/gtksys.hxx
@@ -33,6 +33,7 @@
 #include "generic/gensys.h"
 #include 
 #include 
+#include 
 
 class GtkSalSystem : public SalGenericSystem
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - vcl/inc

2012-05-11 Thread Caolán McNamara
 vcl/inc/unx/gtk/gtksys.hxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit dd8f905389056acbcd35db1cb027f816df1a429e
Author: Caolán McNamara 
Date:   Fri May 11 16:58:09 2012 +0100

include deque

diff --git a/vcl/inc/unx/gtk/gtksys.hxx b/vcl/inc/unx/gtk/gtksys.hxx
index 582d4b9..94fe25a 100644
--- a/vcl/inc/unx/gtk/gtksys.hxx
+++ b/vcl/inc/unx/gtk/gtksys.hxx
@@ -33,6 +33,7 @@
 #include "generic/gensys.h"
 #include 
 #include 
+#include 
 
 class GtkSalSystem : public SalGenericSystem
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sc/source

2012-05-11 Thread Caolán McNamara
 sc/source/ui/unoobj/scdetect.cxx |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit c4f1c3053a4d892b0bbc8842044133b64eee00ae
Author: Eike Rathke 
Date:   Thu May 10 19:05:48 2012 +0200

resolved fdo#49639 import .xls with HTML as such, not CSV

This restores the previous behavior for this content type, regression
introduced with the fix for fdo#40021 
c2a26cf9dab637c292e431d5cdf7bab5bbda571d

Signed-off-by: Caolán McNamara 

diff --git a/sc/source/ui/unoobj/scdetect.cxx b/sc/source/ui/unoobj/scdetect.cxx
index 556d54f..59ae14b 100644
--- a/sc/source/ui/unoobj/scdetect.cxx
+++ b/sc/source/ui/unoobj/scdetect.cxx
@@ -737,12 +737,14 @@ static sal_Bool lcl_MayBeDBase( SvStream& rStream )
 const sal_Size nTrySize = 80;
 ByteString aHeader = read_uInt8s_AsOString(rStr, 
nTrySize);
 
+bool bMaybeHtml = HTMLParser::IsHTMLFormat( 
aHeader.GetBuffer());
+
 if ( aHeader.CompareTo( "{\\rtf", 5 ) == 
COMPARE_EQUAL )
 {
 // test for RTF
 pFilter = aMatcher.GetFilter4FilterName( 
String::CreateFromAscii(pFilterRtf) );
 }
-else if ( bIsXLS && bMaybeText )
+else if ( bIsXLS && (bMaybeText && !bMaybeHtml) )
 {
 aHeader = 
comphelper::string::stripStart(aHeader, ' ');
 // Detect Excel 2003 XML here only if XLS was 
preselected.
@@ -756,7 +758,7 @@ static sal_Bool lcl_MayBeDBase( SvStream& rStream )
 pFilter = pPreselectedFilter;
 else if ( 
pPreselectedFilter->GetFilterName().EqualsAscii(pFilterAscii) && bMaybeText )
 pFilter = pPreselectedFilter;
-else if ( HTMLParser::IsHTMLFormat( 
aHeader.GetBuffer() ) )
+else if ( bMaybeHtml )
 {
 // test for HTML
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: [PUSHED][REVIEW 3-5] resolved fdo#49639 import .xls with HTML as such, not CSV

2012-05-11 Thread Caolán McNamara
On Thu, 2012-05-10 at 19:13 +0200, Eike Rathke wrote:
> Hi,
> 
> Please review attached patch and commit to 3-5. Fixes
> https://bugs.freedesktop.org/show_bug.cgi?id=49639
> FILEOPEN html content .xls files shows text.csv with html tags instead
> of Spreadsheet contents

cherry-picked to 3-5

C.

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


Re: How to add color scales to ODF?

2012-05-11 Thread Kohei Yoshida
On Fri, May 11, 2012 at 8:53 AM, Michael Stahl  wrote:

> i wonder if that restriction is really necessary.

IMO it is.  Imagine a case where the same color scale definition is
applied to non-contiguous regions, and you having to decide whether to
scale those regions as if they are unified, or treat them as
independent ranges (therefore independent scaling).  Having that
restriction removes such ambiguity.  And when dealing with file format
specification, removing ambiguity is almost always a good thing.

Also, I'm personally a bit reluctant to using the styles section for
this.  Because it's also possible that the same scaling definition is
applied to, say, A1:A10, and A11:A20, but we need to treat them as
separate units.  The current proposal would incorrectly merge these
two ranges into one, and would cause unintentional scaling effect or
unintentional grouping of scaled ranges.

My gut feeling (totally unscientific and may be illogical) tells me
that wedging this information into the style section may not be the
cleanest approach.  I could, however, imagine we define these color
scales elsewhere, and reference them from the style section somehow,
either by name or by index.  Or just totally leave it outside the
style section.  Somehow I tend to think that this feature behaves more
like a database range, chart source range, or pivot table data source,
than conditional formatting.  And based on how Markus is implementing
it so far even in the core, the color scale data is separated stored
than the conventional conditional formatting data.

  of course i don't
> know how Calc is implemented and whether there would be performance
> advantages in doing so;

Not sure about performance advantage, but it would clear up the above
ambiguity issue, which would ease the implementation and keep the
implementation cleaner.

> also i don't know if OOXML has such a
> restrictions,

In OOXML color scales are defined per range, so in that sense yes.

> but another problem: is it possible that users want to use the same
> color scale on a bunch of cells, but otherwise style them differently?

This is probably the same concern I raised above.  We need to keep two
separate but contiguous ranges with the same style as separate groups,
in case the user wants to change the style definition of one group
later.

> if so i guess this could be dealt with via some kind of style
> inheritance (which is already possible AFAIK), i.e. put the color scale
> into a base style; or perhaps it would be better to have color scales as
> top-level elements, and then reference them from styles (similar to e.g.
> fonts), like so:

Hmm, I'm not in favor of this.  To me this is making it more complex
than it needs to be.  The feature itself doesn't have the concept of
inheritance relationship.  I would hate to introduce such relationship
in the file format which leads to having to convert one model to
another during file save and load.

Just my 2-cents.

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


Re: [PUSHED 3-5] fdo#46889 ( handle unmatched End Sub/Function ) statements in imported vba

2012-05-11 Thread Miklos Vajna
On Fri, May 11, 2012 at 05:49:15PM +0200, Miklos Vajna  wrote:
> On Fri, May 11, 2012 at 12:44:18PM +0100, Noel Power  wrote:
> > attached is a backport of
> > master:24b402d67eb9acc7ff1f0afeee7237f6b3b14644 &
> > master:1bd695d3ddcbce48899a70130b5e948c48541d17 squashed. Be good to
> > get into 3-5
> 
> Pushed to -3-5.

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


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - oox/source

2012-05-11 Thread Miklos Vajna
 oox/source/ole/vbamodule.cxx |   48 +++
 1 file changed, 48 insertions(+)

New commits:
commit 2edf8cba49e8ba72fa7b0e02d24a38cab45c697c
Author: Noel Power 
Date:   Fri Mar 2 13:04:18 2012 +

weed out unmatched Sub/End Sub statements when importing VBA fdo#46889

fix mishandling of 'End Sub' is there is a trailing comment fod#46889

Signed-off-by: Miklos Vajna 

diff --git a/oox/source/ole/vbamodule.cxx b/oox/source/ole/vbamodule.cxx
index cbd9744..12e1110 100644
--- a/oox/source/ole/vbamodule.cxx
+++ b/oox/source/ole/vbamodule.cxx
@@ -218,6 +218,7 @@ void VbaModule::createEmptyModule( const Reference< 
XNameContainer >& rxBasicLib
 OUString VbaModule::readSourceCode( StorageBase& rVbaStrg, const Reference< 
XNameContainer >& rxOleNameOverrides ) const
 {
 OUStringBuffer aSourceCode;
+const static rtl::OUString sUnmatchedRemovedTag( 
RTL_CONSTASCII_USTRINGPARAM( "Rem removed unmatched Sub/End: " ) );
 if( (maStreamName.getLength() > 0) && (mnOffset != SAL_MAX_UINT32) )
 {
 BinaryXInputStream aInStrm( rVbaStrg.openInputStream( maStreamName ), 
true );
@@ -231,6 +232,14 @@ OUString VbaModule::readSourceCode( StorageBase& rVbaStrg, 
const Reference< XNam
 VbaInputStream aVbaStrm( aInStrm );
 // load the source code line-by-line, with some more processing
 TextInputStream aVbaTextStrm( mxContext, aVbaStrm, meTextEnc );
+
+struct ProcedurePair
+{
+bool bInProcedure;
+sal_uInt32 nPos;
+ProcedurePair() : bInProcedure( false ), nPos( 0 ) {};
+} procInfo;
+
 while( !aVbaTextStrm.isEof() )
 {
 OUString aCodeLine = aVbaTextStrm.readLine();
@@ -241,6 +250,45 @@ OUString VbaModule::readSourceCode( StorageBase& rVbaStrg, 
const Reference< XNam
 }
 else
 {
+// Hack here to weed out any unmatched End Sub / Sub Foo 
statements.
+// The behaviour of the vba ide practically guarantees the 
case and
+// spacing of Sub statement(s). However, indentation can 
be arbitrary hence
+// the trim.
+rtl::OUString trimLine( aCodeLine.trim() );
+if ( mbExecutable && (
+  trimLine.matchAsciiL( RTL_CONSTASCII_STRINGPARAM("Sub ") 
) ||
+  trimLine.matchAsciiL( RTL_CONSTASCII_STRINGPARAM("Public 
Sub ") )  ||
+  trimLine.matchAsciiL( 
RTL_CONSTASCII_STRINGPARAM("Private Sub ") ) ||
+  trimLine.matchAsciiL( RTL_CONSTASCII_STRINGPARAM("Static 
Sub ") ) ) )
+{
+// this should never happen, basic doesn't support 
nested procedures
+// first Sub Foo must be bogus
+if ( procInfo.bInProcedure )
+{
+// comment out the line
+aSourceCode.insert( procInfo.nPos, 
sUnmatchedRemovedTag );
+// mark location of this Sub
+procInfo.nPos = aSourceCode.getLength();
+}
+else
+{
+procInfo.bInProcedure = true;
+procInfo.nPos = aSourceCode.getLength();
+}
+}
+else if ( mbExecutable && aCodeLine.trim().matchAsciiL( 
RTL_CONSTASCII_STRINGPARAM("End Sub")) )
+{
+// un-matched End Sub
+if ( !procInfo.bInProcedure )
+{
+aSourceCode.append( sUnmatchedRemovedTag );
+}
+else
+{
+procInfo.bInProcedure = false;
+procInfo.nPos = 0;
+}
+}
 // normal source code line
 if( !mbExecutable )
 aSourceCode.appendAscii( RTL_CONSTASCII_STRINGPARAM( 
"Rem " ) );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: [PUSHED][REVIEW 3-5] rhbz#809019 presentation does not run with monitors in clone mode

2012-05-11 Thread Caolán McNamara
On Fri, 2012-05-11 at 13:08 +0200, David Tardon wrote:
> Hi all,
> 
> the new gtk VCL plugin does not recognize that a multi-monitor machine
> has the monitors configured in clone mode. The consequence of that is
> that impress shows presenter console and not the presentation itself
> (see https://bugzilla.redhat.com/show_bug.cgi?id=809019 ).
> 
> Commit b1c3f00d9b0ef6c91b0209c13531bd1f9d63c1e0 should fix that.

cherry-picked.

C.

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


Re: [REVIEW 3-5] fdo#46889 ( handle unmatched End Sub/Function ) statements in imported vba

2012-05-11 Thread Miklos Vajna
On Fri, May 11, 2012 at 12:44:18PM +0100, Noel Power  wrote:
> attached is a backport of
> master:24b402d67eb9acc7ff1f0afeee7237f6b3b14644 &
> master:1bd695d3ddcbce48899a70130b5e948c48541d17 squashed. Be good to
> get into 3-5

Pushed to -3-5.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - vcl/inc vcl/unx

2012-05-11 Thread Caolán McNamara
 vcl/inc/unx/gtk/gtkdata.hxx |2 
 vcl/inc/unx/gtk/gtksys.hxx  |   11 +++--
 vcl/unx/gtk/app/gtkdata.cxx |2 
 vcl/unx/gtk/app/gtksys.cxx  |   85 +++-
 vcl/unx/gtk/window/gtkframe.cxx |4 -
 5 files changed, 81 insertions(+), 23 deletions(-)

New commits:
commit 16e3dc5b81abde7144eab5a597c80417c2480e9a
Author: David Tardon 
Date:   Wed Apr 25 15:08:53 2012 +0200

rhbz#809019 count mirrored monitors as one

Change-Id: I I I184541e99ab4e04b8534dd0341bc2f3630094e9c
(cherry picked from commit b1c3f00d9b0ef6c91b0209c13531bd1f9d63c1e0)

Signed-off-by: Caolán McNamara 

diff --git a/vcl/inc/unx/gtk/gtkdata.hxx b/vcl/inc/unx/gtk/gtkdata.hxx
index 21fb1e4..3eb7dc7 100644
--- a/vcl/inc/unx/gtk/gtkdata.hxx
+++ b/vcl/inc/unx/gtk/gtkdata.hxx
@@ -150,6 +150,8 @@ public:
 GdkDisplay* GetGdkDisplay() const { return m_pGdkDisplay; }
 boolIsX11Display() const { return m_bX11Display; }
 
+GtkSalSystem* getSystem() const { return m_pSys; }
+
 virtual void deregisterFrame( SalFrame* pFrame );
 GdkCursor *getCursor( PointerStyle ePointerStyle );
 virtual int CaptureMouse( SalFrame* pFrame );
diff --git a/vcl/inc/unx/gtk/gtksys.hxx b/vcl/inc/unx/gtk/gtksys.hxx
index df9e79e..582d4b9 100644
--- a/vcl/inc/unx/gtk/gtksys.hxx
+++ b/vcl/inc/unx/gtk/gtksys.hxx
@@ -36,7 +36,11 @@
 
 class GtkSalSystem : public SalGenericSystem
 {
+typedef std::deque > ScreenMonitors_t;
+
 GdkDisplay *mpDisplay;
+// Number of monitors for every active screen.
+ScreenMonitors_t maScreenMonitors;
 public:
  GtkSalSystem();
 virtual ~GtkSalSystem();
@@ -56,10 +60,11 @@ public:
 { return getXScreenFromDisplayScreen( GetDisplayDefaultScreen() ); 
}
 int   GetDisplayXScreenCount();
 SalX11Screen  getXScreenFromDisplayScreen(unsigned int nDisplayScreen);
+void  countScreenMonitors();
 // We have a 'screen' number that is combined from screen-idx + monitor-idx
-static intgetScreenIdxFromPtr (GdkDisplay *pDisplay, GdkScreen 
*pScreen);
-static intgetScreenMonitorIdx (GdkDisplay *pDisplay, GdkScreen 
*pScreen, int nX, int nY);
-static GdkScreen *getScreenMonitorFromIdx (GdkDisplay *pDisplay, int nIdx, 
gint &nMonitor);
+intgetScreenIdxFromPtr (GdkScreen *pScreen);
+intgetScreenMonitorIdx (GdkScreen *pScreen, int nX, int nY);
+GdkScreen *getScreenMonitorFromIdx (int nIdx, gint &nMonitor);
 };
 
 #endif // _VCL_GTKSYS_HXX_
diff --git a/vcl/unx/gtk/app/gtkdata.cxx b/vcl/unx/gtk/app/gtkdata.cxx
index af4f670..c147f3e 100644
--- a/vcl/unx/gtk/app/gtkdata.cxx
+++ b/vcl/unx/gtk/app/gtkdata.cxx
@@ -201,12 +201,14 @@ GdkFilterReturn GtkSalDisplay::filterGdkEvent( GdkXEvent* 
sys_event,
 
 void GtkSalDisplay::screenSizeChanged( GdkScreen* pScreen )
 {
+m_pSys->countScreenMonitors();
 if (pScreen)
 emitDisplayChanged();
 }
 
 void GtkSalDisplay::monitorsChanged( GdkScreen* pScreen )
 {
+m_pSys->countScreenMonitors();
 if (pScreen)
 emitDisplayChanged();
 }
diff --git a/vcl/unx/gtk/app/gtksys.cxx b/vcl/unx/gtk/app/gtksys.cxx
index 42d61b2..ec8fbef 100644
--- a/vcl/unx/gtk/app/gtksys.cxx
+++ b/vcl/unx/gtk/app/gtksys.cxx
@@ -50,6 +50,7 @@ SalSystem *GtkInstance::CreateSalSystem()
 GtkSalSystem::GtkSalSystem() : SalGenericSystem()
 {
 mpDisplay = gdk_display_get_default();
+countScreenMonitors();
 }
 
 GtkSalSystem::~GtkSalSystem()
@@ -62,6 +63,52 @@ GtkSalSystem::GetDisplayXScreenCount()
 return gdk_display_get_n_screens (mpDisplay);
 }
 
+namespace
+{
+
+struct GdkRectangleEqual
+{
+bool operator()(GdkRectangle const& rLeft, GdkRectangle const& rRight)
+{
+return
+rLeft.x == rRight.x
+&& rLeft.y == rRight.y
+&& rLeft.width == rRight.width
+&& rLeft.height == rRight.height
+;
+}
+};
+
+}
+
+void
+GtkSalSystem::countScreenMonitors()
+{
+maScreenMonitors.clear();
+for (gint i = 0; i < gdk_display_get_n_screens(mpDisplay); i++)
+{
+GdkScreen* const pScreen(gdk_display_get_screen(mpDisplay, i));
+gint nMonitors(pScreen ? gdk_screen_get_n_monitors(pScreen) : 0);
+if (nMonitors > 1)
+{
+std::vector aGeometries;
+aGeometries.reserve(nMonitors);
+for (gint j(0); j != nMonitors; ++j)
+{
+GdkRectangle aGeometry;
+gdk_screen_get_monitor_geometry(pScreen, j, &aGeometry);
+aGeometries.push_back(aGeometry);
+}
+GdkRectangleEqual aCmp;
+std::sort(aGeometries.begin(), aGeometries.end(), aCmp);
+const std::vector::iterator aUniqueEnd(
+std::unique(aGeometries.begin(), aGeometries.end(), aCmp));
+nMonitors = std::distance(aGeometries.begin(), aUniqueEnd);
+}
+maScreenM

Re: [Libreoffice-commits] .: 2 commits - accessibility/CustomTarget_bridge_inc.mk configure.in extensions/CustomTarget_so_activex_idl.mk extensions/Library_so_activex.mk extensions/Library_so_activex_

2012-05-11 Thread Lubos Lunak
On Thursday 10 of May 2012, Noel Grandin wrote:
> OK, so we know
> (a) it's not a cygwin thing
> (b) its not a visual C thing, because we're both on the same version
> (c) it works on a Windows7 box, but not a WindowsServer2008 box.
>
> So it's probably a bug that was fixed sometime in the WindowsVista or
> Windows7 timeframe.

 Why are you so sure about any of these? Does somebody build with this long 
parth successfully? E.g. your tinderbox does not.

> We could probably implement a configure check that looks like
>if $OS == WINDOWS && $OS_VERSION < Vista && length($ROOT_PATH)>XXX
>   complain_loudly_and_exit()
>
> where we know XXX is less than 36 and more than 2, because
> "C:/cygwin/home/tinderbox/libreoffice" causes it to break and "W:" does
> not.
>
> Would you be able to figure out what the point is where it starts to break?

 Changing the path to c:/cygwin/home/tinderbox/master avoids the problem, but 
I don't think we can really protect against this. Somebody alters some -I 
options a bit and the limit changes again.

-- 
 Lubos Lunak
 l.lu...@suse.cz
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [PUSHED-3-5] Revert "Set the listbox height to an integer multiple of the listbox entry height"

2012-05-11 Thread Caolán McNamara
On Wed, 2012-05-09 at 15:52 +0400, Ivan Timofeev wrote:
> Hmm, maybe this is annoying. But what if we would just draw a border 
> around the control. See the attached image. Not so annoying now, right?

I reckon you should go for it in the absence of any negative feedback.

C.

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


[Libreoffice-commits] .: Branch 'feature/gsoc-calc-perf' - 2 commits - sc/source

2012-05-11 Thread Daniel Bankston
 sc/source/filter/oox/worksheethelper.cxx |   13 +
 1 file changed, 9 insertions(+), 4 deletions(-)

New commits:
commit f356710356a7bc8b524ef12c862777fb8ee17782
Author: Daniel Bankston 
Date:   Fri May 11 10:37:44 2012 -0500

Get cell instance once and use c++style cast

Change-Id: I0a2a06b805ba1fd7d03937e767568d622615b059

diff --git a/sc/source/filter/oox/worksheethelper.cxx 
b/sc/source/filter/oox/worksheethelper.cxx
index e9cefd7..835324b 100644
--- a/sc/source/filter/oox/worksheethelper.cxx
+++ b/sc/source/filter/oox/worksheethelper.cxx
@@ -1558,9 +1558,10 @@ void WorksheetHelper::putFormulaResult( const 
CellAddress& rAddress, double fVal
 ScDocument& rDoc = getScDocument();
 ScAddress aCellPos;
 ScUnoConversion::FillScAddress( aCellPos, rAddress );
-if ( rDoc.GetCellType( aCellPos ) == CELLTYPE_FORMULA )
+ScBaseCell* pBaseCell = rDoc.GetCell( aCellPos );
+if ( pBaseCell->GetCellType() == CELLTYPE_FORMULA )
 {
-ScFormulaCell* pCell = (ScFormulaCell *)rDoc.GetCell( aCellPos );
+ScFormulaCell* pCell = static_cast< ScFormulaCell* >( pBaseCell );
 pCell->SetHybridDouble( fValue );
 pCell->ResetDirty();
 pCell->ResetChanged();
commit e0c744f3a9de2e6927d8af7c5127ca8c6a26ae0c
Author: Daniel Bankston 
Date:   Fri May 11 10:14:43 2012 -0500

Use ScUnoConversion instead of casts for address conversion

Change-Id: Ia3fbe15aeed9a3cb7928ada1a438b190f8fbb017

diff --git a/sc/source/filter/oox/worksheethelper.cxx 
b/sc/source/filter/oox/worksheethelper.cxx
index 49ab86a..e9cefd7 100644
--- a/sc/source/filter/oox/worksheethelper.cxx
+++ b/sc/source/filter/oox/worksheethelper.cxx
@@ -1548,7 +1548,9 @@ void WorksheetHelper::setManualRowHeight( sal_Int32 nRow )
 
 void WorksheetHelper::putValue( const CellAddress& rAddress, double fValue ) 
const
 {
-getScDocument().SetValue( (SCCOL)rAddress.Column, (SCROW)rAddress.Row, 
(SCTAB)rAddress.Sheet, fValue );
+ScAddress aAddress;
+ScUnoConversion::FillScAddress( aAddress, rAddress );
+getScDocument().SetValue( aAddress.Col(), aAddress.Row(), aAddress.Tab(), 
fValue );
 }
 
 void WorksheetHelper::putFormulaResult( const CellAddress& rAddress, double 
fValue ) const
@@ -1567,7 +1569,9 @@ void WorksheetHelper::putFormulaResult( const 
CellAddress& rAddress, double fVal
 
 void WorksheetHelper::putString( const CellAddress& rAddress, const OUString& 
rText ) const
 {
-getScDocument().SetString( (SCCOL)rAddress.Column, (SCROW)rAddress.Row, 
(SCTAB)rAddress.Sheet, rText );
+ScAddress aAddress;
+ScUnoConversion::FillScAddress( aAddress, rAddress );
+getScDocument().SetString( aAddress.Col(), aAddress.Row(), aAddress.Tab(), 
rText );
 }
 
 void WorksheetHelper::putRichString( const CellAddress& rAddress, const 
RichString& rString, const Font* pFirstPortionFont ) const
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sot/source

2012-05-11 Thread Caolán McNamara
 sot/source/sdstor/stgstrms.cxx |  133 -
 sot/source/sdstor/stgstrms.hxx |4 -
 2 files changed, 16 insertions(+), 121 deletions(-)

New commits:
commit 4a6d590a0794fc00b3acb66bee9e1cd85c85ccc7
Author: Caolán McNamara 
Date:   Fri May 11 16:37:34 2012 +0100

Revert "Related: fdo#47644 for huge files build a page chain cache for 
seeks"

This reverts commit e7c861e3ec9398436eda16bb748af22a2d9afc27.

that was dumb, never intended to push this

diff --git a/sot/source/sdstor/stgstrms.cxx b/sot/source/sdstor/stgstrms.cxx
index e982837..5e6c1ea 100644
--- a/sot/source/sdstor/stgstrms.cxx
+++ b/sot/source/sdstor/stgstrms.cxx
@@ -26,10 +26,9 @@
  *
  /
 
-#include 
 
 #include  // memcpy()
-#include 
+
 #include 
 #include 
 #include 
@@ -335,56 +334,6 @@ void StgStrm::SetEntry( StgDirEntry& r )
 r.SetDirty();
 }
 
-namespace lcl
-{
-#if defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L
-using std::is_sorted;
-#else
-template  bool is_sorted(iter aStart, iter aEnd)
-{
-if (aStart == aEnd)
-return true;
-
-for (iter aNext = aStart + 1; aNext != aEnd; aStart = aNext, ++aNext)
-{
-if (*aNext < *aStart)
-return false;
-}
-
-return true;
-}
-#endif
-}
-
-bool StgStrm::buildPageChainCache()
-{
-if (nSize > 0)
-m_aPagesCache.reserve(nSize/nPageSize);
-
-sal_Int32 nBgn = nStart;
-while (nBgn >= 0)
-{
-m_aPagesCache.push_back(nBgn);
-sal_Int32 nOldBgn = nBgn;
-nBgn = pFat->GetNextPage(nBgn);
-if (nBgn == nOldBgn)
-return false;
-}
-
-m_bSortedPageChain = lcl::is_sorted(m_aPagesCache.begin(), 
m_aPagesCache.end());
-
-SAL_WARN_IF(!m_bSortedPageChain, "sot", "unsorted page chain, that's 
suspicious");
-
-return true;
-}
-
-//See fdo#47644 for a .doc with a vast amount of pages where seeking around the
-//document takes a colossal amount of time
-//
-//There's a cost to building a page cache, so only build one if the number of
-//pages to seek through hits some sufficiently high value where it's worth it.
-#define ARBITRARY_LARGE_AMOUNT_OF_PAGES 256
-
 // Compute page number and offset for the given byte position.
 // If the position is behind the size, set the stream right
 // behind the EOF.
@@ -406,7 +355,7 @@ sal_Bool StgStrm::Pos2Page( sal_Int32 nBytePos )
 return sal_True;
 if( nNew > nOld )
 {
-// the new position is after the current, so an incremental
+// the new position is behind the current, so an incremental
 // positioning is OK. Set the page relative position
 nRel = nNew - nOld;
 nBgn = nPage;
@@ -420,59 +369,13 @@ sal_Bool StgStrm::Pos2Page( sal_Int32 nBytePos )
 }
 // now, traverse the FAT chain.
 nRel /= nPageSize;
-
 sal_Int32 nLast = STG_EOF;
-if (m_aPagesCache.empty() && nRel < ARBITRARY_LARGE_AMOUNT_OF_PAGES)
-{
-while (nRel && nBgn >= 0)
-{
-nLast = nBgn;
-nBgn = pFat->GetNextPage( nBgn );
-nRel--;
-}
-}
-else if (nBgn >= 0)
+while( nRel && nBgn >= 0 )
 {
-//Seeking large distances is slow, so if we're starting seeking (some
-//fairly arbitrary) large distances, build a cache and re-use it for
-//subsequent seeks
-if (m_aPagesCache.empty())
-{
-SAL_INFO("sot", "kicking off large seek helper\n");
-buildPageChainCache();
-}
-
-std::vector::iterator aI;
-
-if (m_bSortedPageChain)
-aI = std::lower_bound(m_aPagesCache.begin(), m_aPagesCache.end(), 
nBgn);
-else
-aI = std::find(m_aPagesCache.begin(), m_aPagesCache.end(), nBgn);
-
-if (aI == m_aPagesCache.end())
-{
-SAL_WARN("sot", "Unknown page position");
-nBgn = STG_EOF;
-}
-else
-{
-size_t nBgnDistance = std::distance(m_aPagesCache.begin(), aI);
-
-size_t nIndex = nBgnDistance + nRel;
-
-if (nIndex > m_aPagesCache.size())
-{
-nRel = m_aPagesCache.size() - nBgnDistance;
-nIndex = m_aPagesCache.size() - 1;
-}
-else
-nRel = 0;
-
-nLast = nIndex ? m_aPagesCache[nIndex - 1] : STG_EOF;
-nBgn = m_aPagesCache[nIndex];
-}
+nLast = nBgn;
+nBgn = pFat->GetNextPage( nBgn );
+nRel--;
 }
-
 // special case: seek to 1st byte of new, unallocated page
 // (in case the file size is a multiple of the page size)
 if( nBytePos == nSize && nBgn == STG_EOF && !nRel && !nOffset )
@@ -501,8 +404,6 @@ StgPage* StgStrm::GetPhysPage( sal_Int32 nBytePos, sal_Bool 
bForce )
 
 sal_Bool StgStrm::Copy( sal_Int32 nFrom, sal_Int32 nByte

Re: [PUSHED][REVIEW:3-5] fdo#49501 RTF_MARGL/R/T/B should also set the current margin

2012-05-11 Thread Caolán McNamara
On Fri, 2012-05-11 at 10:21 +0200, Miklos Vajna wrote:
> Hi,
> 
> See
> http://cgit.freedesktop.org/libreoffice/core/commit/?id=d6acd86
> 
> Regression from 3.4; backported patch attached.

pushed

C.

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


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - writerfilter/source

2012-05-11 Thread Caolán McNamara
 writerfilter/source/rtftok/rtfdocumentimpl.cxx |   24 ++--
 1 file changed, 10 insertions(+), 14 deletions(-)

New commits:
commit 71669deb856bcadba38f135837537ee8bd465f29
Author: Miklos Vajna 
Date:   Wed May 9 11:30:13 2012 +0200

fdo#49501 RTF_MARGL/R/T/B should also set the current margin

Change-Id: I I69b92d0cd07c9f08f14affb447b55b26b2556186

Signed-off-by: Caolán McNamara 

diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx 
b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 330bc25..1d45cb3 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -2628,34 +2628,30 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, 
int nParam)
 lcl_putNestedAttribute(m_aStates.top().aSectionSprms,
 NS_ooxml::LN_EG_SectPrContents_pgSz, 
NS_ooxml::LN_CT_PageSz_w, pIntValue, true);
 break;
-case RTF_MARGL:
+case RTF_MARGL: // fall through: set the default + current value
 lcl_putNestedAttribute(m_aDefaultState.aSectionSprms,
 NS_ooxml::LN_EG_SectPrContents_pgMar, 
NS_ooxml::LN_CT_PageMar_left, pIntValue, true);
-break;
-case RTF_MARGR:
-lcl_putNestedAttribute(m_aDefaultState.aSectionSprms,
-NS_ooxml::LN_EG_SectPrContents_pgMar, 
NS_ooxml::LN_CT_PageMar_right, pIntValue, true);
-break;
-case RTF_MARGT:
-lcl_putNestedAttribute(m_aDefaultState.aSectionSprms,
-NS_ooxml::LN_EG_SectPrContents_pgMar, 
NS_ooxml::LN_CT_PageMar_top, pIntValue, true);
-break;
-case RTF_MARGB:
-lcl_putNestedAttribute(m_aDefaultState.aSectionSprms,
-NS_ooxml::LN_EG_SectPrContents_pgMar, 
NS_ooxml::LN_CT_PageMar_bottom, pIntValue, true);
-break;
 case RTF_MARGLSXN:
 lcl_putNestedAttribute(m_aStates.top().aSectionSprms,
 NS_ooxml::LN_EG_SectPrContents_pgMar, 
NS_ooxml::LN_CT_PageMar_left, pIntValue, true);
 break;
+case RTF_MARGR: // fall through: set the default + current value
+lcl_putNestedAttribute(m_aDefaultState.aSectionSprms,
+NS_ooxml::LN_EG_SectPrContents_pgMar, 
NS_ooxml::LN_CT_PageMar_right, pIntValue, true);
 case RTF_MARGRSXN:
 lcl_putNestedAttribute(m_aStates.top().aSectionSprms,
 NS_ooxml::LN_EG_SectPrContents_pgMar, 
NS_ooxml::LN_CT_PageMar_right, pIntValue, true);
 break;
+case RTF_MARGT: // fall through: set the default + current value
+lcl_putNestedAttribute(m_aDefaultState.aSectionSprms,
+NS_ooxml::LN_EG_SectPrContents_pgMar, 
NS_ooxml::LN_CT_PageMar_top, pIntValue, true);
 case RTF_MARGTSXN:
 lcl_putNestedAttribute(m_aStates.top().aSectionSprms,
 NS_ooxml::LN_EG_SectPrContents_pgMar, 
NS_ooxml::LN_CT_PageMar_top, pIntValue, true);
 break;
+case RTF_MARGB: // fall through: set the default + current value
+lcl_putNestedAttribute(m_aDefaultState.aSectionSprms,
+NS_ooxml::LN_EG_SectPrContents_pgMar, 
NS_ooxml::LN_CT_PageMar_bottom, pIntValue, true);
 case RTF_MARGBSXN:
 lcl_putNestedAttribute(m_aStates.top().aSectionSprms,
 NS_ooxml::LN_EG_SectPrContents_pgMar, 
NS_ooxml::LN_CT_PageMar_bottom, pIntValue, true);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: [PUSHED][REVIEW 3.5] fdo#44292

2012-05-11 Thread Caolán McNamara
On Fri, 2012-05-11 at 09:58 +0100, Noel Power wrote:
> my bad, seems I introduced a regression with 
> http://cgit.freedesktop.org/libreoffice/core/commit/?id=cd1c434c4bd4756fa1355e906cb2e8de4aae0618
>  
> the following patch 
> http://cgit.freedesktop.org/libreoffice/core/commit/?id=2dee7d6205832a1212790ac1ab168a6b6fce686d
>  
> should revert it. The patch is quite confusing to look at ( but quite 
> simple if you view it with whitespace changes suppressed :-) ) Be great 
> to cherry pick this

pushed to 3-5

C.

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


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 2 commits - sot/source writerfilter/source

2012-05-11 Thread Caolán McNamara
 sot/source/sdstor/stgstrms.cxx  |  133 ++--
 sot/source/sdstor/stgstrms.hxx  |4 
 writerfilter/source/dmapper/PropertyMap.cxx |  224 ++--
 3 files changed, 233 insertions(+), 128 deletions(-)

New commits:
commit ae218f73ff4eaa4191e620abee8235f73ea0e1fc
Author: Noel Power 
Date:   Fri May 11 09:50:31 2012 +0100

Revert "another partial fix for bnc#693238" ( and fixes fdo#44292 )

This reverts commit cd1c434c4bd4756fa1355e906cb2e8de4aae0618.

Conflicts:

writerfilter/source/dmapper/PropertyMap.cxx

Change-Id: I I83ae3418438aa02db744e6b6eb5a9c199938c91f
(cherry picked from commit 2dee7d6205832a1212790ac1ab168a6b6fce686d)

Signed-off-by: Caolán McNamara 

diff --git a/writerfilter/source/dmapper/PropertyMap.cxx 
b/writerfilter/source/dmapper/PropertyMap.cxx
index 4f03839..503052f 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -843,130 +843,130 @@ void SectionPropertyMap::CloseSectionGroup( 
DomainMapper_Impl& rDM_Impl )
 if( m_nColumnCount > 0 && xSection.is())
 ApplyColumnProperties( xSection );
 }
-//get the properties and create appropriate page styles
-uno::Reference< beans::XPropertySet > xFollowPageStyle = GetPageStyle( 
rDM_Impl.GetPageStyles(), rDM_Impl.GetTextFactory(), false );
-
-if( m_nDzaGutter > 0 )
+else
 {
-//todo: iGutterPos from DocProperties are missing
-if( m_bGutterRTL )
-m_nRightMargin += m_nDzaGutter;
-else
-m_nLeftMargin += m_nDzaGutter;
-}
-operator[]( PropertyDefinition( PROP_LEFT_MARGIN, false )) =  
uno::makeAny( m_nLeftMargin  );
-operator[]( PropertyDefinition( PROP_RIGHT_MARGIN, false )) = 
uno::makeAny( m_nRightMargin );
-
-/*** if headers/footers are available then the top/bottom margins of the
-header/footer are copied to the top/bottom margin of the page
-*/
-CopyLastHeaderFooter( false, rDM_Impl );
-PrepareHeaderFooterProperties( false );
-
-const ::rtl::OUString sTrayIndex = rPropNameSupplier.GetName( 
PROP_PRINTER_PAPER_TRAY_INDEX );
-if( m_nPaperBin >= 0 )
-xFollowPageStyle->setPropertyValue( sTrayIndex, uno::makeAny( 
m_nPaperBin ) );
-uno::Reference< text::XTextColumns > xColumns;
-if( m_nColumnCount > 0 )
-xColumns = ApplyColumnProperties( xFollowPageStyle );
-
-//prepare text grid properties
-sal_Int32 nHeight = 1;
-PropertyMap::iterator aElement = find(PropertyDefinition( PROP_HEIGHT, 
false ));
-if( aElement != end())
-aElement->second >>= nHeight;
-
-sal_Int32 nWidth = 1;
-aElement = find(PropertyDefinition( PROP_WIDTH, false ));
-if( aElement != end())
-aElement->second >>= nWidth;
-
-text::WritingMode eWritingMode = text::WritingMode_LR_TB;
-aElement = find(PropertyDefinition( PROP_WRITING_MODE, false ));
-if( aElement != end())
-aElement->second >>= eWritingMode;
-
-
-
-sal_Int32 nTextAreaHeight = eWritingMode == text::WritingMode_LR_TB ?
-nHeight - m_nTopMargin - m_nBottomMargin :
-nWidth - m_nLeftMargin - m_nRightMargin;
-
-operator[]( PropertyDefinition( PROP_GRID_LINES, false )) =
-uno::makeAny( static_cast(nTextAreaHeight/m_nGridLinePitch));
+//get the properties and create appropriate page styles
+uno::Reference< beans::XPropertySet > xFollowPageStyle = GetPageStyle( 
rDM_Impl.GetPageStyles(), rDM_Impl.GetTextFactory(), false );
 
-sal_Int32 nCharWidth = 423; //240 twip/ 12 pt
-//todo: is '0' the right index here?
-const StyleSheetEntryPtr pEntry = 
rDM_Impl.GetStyleSheetTable()->FindStyleSheetByISTD(::rtl::OUString::valueOf(static_cast(0),
 16));
-if( pEntry.get( ) )
-{
-PropertyMap::iterator aElement_ = 
pEntry->pProperties->find(PropertyDefinition( PROP_CHAR_HEIGHT_ASIAN, false ));
-if( aElement_ != pEntry->pProperties->end())
+if( m_nDzaGutter > 0 )
 {
-double fHeight = 0;
-if( aElement_->second >>= fHeight )
-nCharWidth = ConversionHelper::convertTwipToMM100( (long)( 
fHeight * 20.0 + 0.5 ));
+//todo: iGutterPos from DocProperties are missing
+if( m_bGutterRTL )
+m_nRightMargin += m_nDzaGutter;
+else
+m_nLeftMargin += m_nDzaGutter;
+}
+operator[]( PropertyDefinition( PROP_LEFT_MARGIN, false )) =  
uno::makeAny( m_nLeftMargin  );
+operator[]( PropertyDefinition( PROP_RIGHT_MARGIN, false )) = 
uno::makeAny( m_nRightMargin );
+
+/*** if headers/footers are available then the top/bottom margins of 
the
+header/footer are copied to the top/bottom margin of the page
+  */
+CopyLastHeaderFooter( false, rDM_Impl );
+PrepareHeaderFooterProperties( false );
+
+const ::rtl::OUString sTrayIndex = r

[Libreoffice-commits] .: i18npool/CustomTarget_breakiterator.mk

2012-05-11 Thread Caolán McNamara
 i18npool/CustomTarget_breakiterator.mk |5 -
 1 file changed, 5 deletions(-)

New commits:
commit 0c31cd693cd599138bd7a686ea932d25faac7393
Author: Caolán McNamara 
Date:   Fri May 11 15:27:35 2012 +0100

drop debugging spew

Change-Id: I50b0ce42e68c8a6a5da3150468a7df8bb9030686

diff --git a/i18npool/CustomTarget_breakiterator.mk 
b/i18npool/CustomTarget_breakiterator.mk
index 1c757dd..1c70184 100644
--- a/i18npool/CustomTarget_breakiterator.mk
+++ b/i18npool/CustomTarget_breakiterator.mk
@@ -102,16 +102,11 @@ $(i18npool_BIDIR)/%.brk : $(i18npool_BIDIR)/%.txt 
$(i18npool_GENBRKTARGET)
 # NOTE: strips every line with _word_ 'Prepend', including $Prepend
 $(i18npool_BIDIR)/%.txt : \
$(SRCDIR)/i18npool/source/breakiterator/data/%.txt | 
$(i18npool_BIDIR)/.dir
-   echo DEBUG i18npool 
ICU_RECLASSIFIED_CLOSE_PARENTHESIS=$(ICU_RECLASSIFIED_CLOSE_PARENTHESIS) 
ICU_RECLASSIFIED_PREPEND_SET_EMPTY=$(ICU_RECLASSIFIED_PREPEND_SET_EMPTY)
-   cat $(SRC_ROOT)/config_host.mk
 ifeq ($(ICU_RECLASSIFIED_CLOSE_PARENTHESIS),YES)
 ifeq ($(ICU_RECLASSIFIED_PREPEND_SET_EMPTY),YES)
-   echo DEBUG both
sed "s#\[:LineBreak =  Close_Punctuation:\]#\[\[:LineBreak =  
Close_Punctuation:\] \[:LineBreak = Close_Parenthesis:\]\]#" $< | sed 
"/Prepend/d" > $@
 else
-   echo DEBUG only one
sed "s#\[:LineBreak =  Close_Punctuation:\]#\[\[:LineBreak =  
Close_Punctuation:\] \[:LineBreak = Close_Parenthesis:\]\]#" $< > $@
-   cat $@
 endif
 else
cp $< $@
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: [REVIEW 3-5] fdo#47644 performance regression on largish .doc

2012-05-11 Thread Caolán McNamara
On Fri, 2012-05-11 at 10:09 +0100, Michael Meeks wrote:
>  we actually precisely know our offset from the beginning of the chain/array
> ( which is nNew/nPageSize ).

hmm, that escaped me entirely. Been trying to find a loophole that
invalidates that e.g. 10 20 30 40 where 20 is the first entry. But
anything like that seems to be covered in that the ::Inits pass the
first entry which ends up as nStart and we build the chain only from
there. So I can't see any reason it wouldn't work.

>   So - how about the attached diff, hopefully rather easier to review &
> back-port :-)

Seems sane, though it probably makes sense to tweak the trigger for
calling buildPageChainCache as the units for nNew there are in bytes
while the define is in "pages". And we might want to avoid calling it in
the case of a small relative jump in pages forward.

C.

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


Re: failed unit test: sal_osl_file

2012-05-11 Thread Terrence Enger
On Thu, 2012-05-10 at 16:18 +0100, Caolán McNamara wrote:
> On Wed, 2012-05-09 at 17:17 -0400, Terrence Enger wrote:
> > I am trying to build master commit id 5c2c0e3, pulled 2012-05-08, on
> > ubuntu-natty (11.04), and it is failing in unit test sal_osl_file.
> 
> You didn't flip from a system cppunit to an internal one without a
> rebuild inbetween, or anything like that ?


I think not.  But my system does have ubuntu-supplied
libcppunit.  Could a change in the build system since my
previous successful build (2012-04-01) have done this
silently?  My autogen.lastrun was last changed 2012-03-09,
and it shows no reference to cppunit:

--disable-mozilla
--enable-symbols
--enable-dbgutil
--enable-crashdump
--disable-build-mozilla
--without-system-postgresql
--enable-python=internal

Moreover, the error looks the same after `make clean`.


Meanwhile, I applied a blunt instrument to the failing
testcase.  This lets the build progress to CUT sal_osl_module.
This unit test fails in SAL_INFO at module.cxx:321, which
leads to "free: invalid pointer" and SIGABRT.  One must
suspect a problem between the system-supplied stream
functions and the LO-supplied custom allocator, but to trace
through that is beyond my skill level.  (If I were smarter,
I would have given up sooner.  Sigh!)


gdb, of course, eats the return code from a failed unit
test.  So I can go on to see four more unit tests fail with
"free(): invalid pointer" after one of the "message" macros.



Thank you for your patience.
Terry.


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


[Libreoffice-commits] .: sfx2/inc

2012-05-11 Thread Stephan Bergmann
 sfx2/inc/sfx2/sfxcommands.h |1 -
 1 file changed, 1 deletion(-)

New commits:
commit d8321bd0651c89fc158859a2b2ee5903533921ed
Author: Stephan Bergmann 
Date:   Fri May 11 16:38:58 2012 +0200

Looks like CMD_SID_FRAMETITLE can go

...now that SID_FRAMETITLE is gone, and it is unused, anyway.

Change-Id: I8b6b2641b988763df85d88490dc46484083b7180

diff --git a/sfx2/inc/sfx2/sfxcommands.h b/sfx2/inc/sfx2/sfxcommands.h
index cb41efe..31109d5 100644
--- a/sfx2/inc/sfx2/sfxcommands.h
+++ b/sfx2/inc/sfx2/sfxcommands.h
@@ -99,7 +99,6 @@
 #define CMD_SID_FOCUSURLBOX ".uno:FocusUrlBox"
 #define CMD_SID_FORMATMENU  ".uno:FormatMenu"
 #define CMD_SID_STYLE_FAMILY3   ".uno:FrameStyle"
-#define CMD_SID_FRAMETITLE  ".uno:FrameTitle"
 #define CMD_SID_PROGFILENAME".uno:FullName"
 #define CMD_SID_DOCFULLNAME ".uno:FullName"
 #define CMD_SID_WIN_FULLSCREEN  ".uno:FullScreen"
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2012-05-11 Thread Miklos Vajna
 sw/source/filter/ww8/rtfattributeoutput.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f506ca0fee6114210d41c9c4a5f7eff5f5666d02
Author: Miklos Vajna 
Date:   Fri May 11 16:29:19 2012 +0200

fdo#45522 fix crash on RTF export of sub-tables during copy&paste

Change-Id: I71b0794c597344723dd53e114b5ad03605b8c859

diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx 
b/sw/source/filter/ww8/rtfattributeoutput.cxx
index e5ebc52..c8efc82 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -257,7 +257,7 @@ void RtfAttributeOutput::StartParagraph( 
ww8::WW8TableNodeInfo::Pointer_t pTextN
 OSL_ENSURE( pDeepInner, "TableNodeInfoInner not found");
 // Make sure we always start a row between ending one and starting 
a cell.
 // In case of subtables, we may not get the first cell.
-if ((pDeepInner && pDeepInner->getCell() == 0) || m_bTableRowEnded)
+if (pDeepInner && (pDeepInner->getCell() == 0 || m_bTableRowEnded))
 {
 m_bTableRowEnded = false;
 StartTableRow( pDeepInner );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: [Libreoffice-commits] .: Fix updchk xcu data after gbuild'ification

2012-05-11 Thread Stephan Bergmann

On 05/11/2012 01:11 PM, Stephan Bergmann wrote:

commit 3f5ddf2e873b76abe3e166089fac2cfcb358d346
Author: Stephan Bergmann
Date:   Fri May 11 13:08:51 2012 +0200

 Fix updchk xcu data after gbuild'ification

 For one, install:module was missing from xcu files that are processed with
 gb_Configuration_add_spool_modules, resulting in effectively empty output
 xcu files.  For another, localization from Addons.xcu is now merged into
 per-lang registry_*.xcd in postprocess/packregistry/makefile.mk.

 Change-Id: Ie87edbad163b124d18090ab36aa36de560a20cbc


For the record, testing the localization part of this fix temporarily 
requires something like the attached translations-de.patch (for 
--with-lang='en-US de') to the current translations repo, as the move of 
extensions/source/update/check/Addons.xcu to 
extensions/source/update/check/org/openoffice/Office/Addons.xcu (from 
 
"extensions: convert update stuff to gbuild") has not yet been reflected 
in the translations repo.


Timár, is it right that this change in the translations/source/.../*.po 
files will happen automatically, eventually?  (The change that moved 
Addons.xcu is quite old already, from 2011-12-14.)  And will the 
existing translations get lost in that event, or are they somehow moved 
automagically?


Stephan
diff --git a/translations/source/de/extensions/source/update/check.po b/translations/source/de/extensions/source/update/check.po
index 42492c5..5a29732 100644
--- a/translations/source/de/extensions/source/update/check.po
+++ b/translations/source/de/extensions/source/update/check.po
@@ -226,7 +226,3 @@ msgstr "Updates für Extensions verfügbar"
 msgctxt "updatehdl.src#RID_UPDATE_BUBBLE_EXT_UPD_AVAIL.string.text"
 msgid "Click here for more information."
 msgstr "Klicken Sie hier für mehr Informationen."
-
-#: Addons.xcu#.Addons.AddonUI.OfficeHelp.UpdateCheckJob.Title.value.text
-msgid "Check for ~Updates..."
-msgstr "Suche nach ~Updates..."
diff --git a/translations/source/de/extensions/source/update/check/org/openoffice/Office.po b/translations/source/de/extensions/source/update/check/org/openoffice/Office.po
new file mode 100644
index 000..22d4c14
--- /dev/null
+++ b/translations/source/de/extensions/source/update/check/org/openoffice/Office.po
@@ -0,0 +1,20 @@
+#. extracted from extensions/source/update/org/openoffice/Office.oo
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://qa.openoffice.org/issues/enter_bug.cgi?comment=&component=l10n&form_name=enter_issue&short_desc=Localization+issue+in+file%3A+extensions%2Fsource%2Fupdate%2Fcheck.oo&subcomponent=ui\n";
+"POT-Creation-Date: 2012-02-21 19:42+0200\n"
+"PO-Revision-Date: 2011-12-28 09:13+0200\n"
+"Last-Translator: Christian \n"
+"Language-Team: LANGUAGE \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: de\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: Translate Toolkit 1.9.0\n"
+"X-Accelerator-Marker: ~\n"
+
+#: Addons.xcu#.Addons.AddonUI.OfficeHelp.UpdateCheckJob.Title.value.text
+msgid "Check for ~Updates..."
+msgstr "Suche nach ~Updates..."
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [REVIEW 3-5] Allow keyword Append to be used as a variable. bnc#745930

2012-05-11 Thread Noel Power

On 11/05/12 13:53, Michael Meeks wrote:

On Fri, 2012-05-11 at 12:47 +0100, Noel Power wrote:

please see
http://cgit.freedesktop.org/libreoffice/core/commit/?id=634b211632847dcb04b31f478296e5e6d732ac73
hopefully ripe for cherry-picking

Is there an easily extensible unit testing framework in-place for this
sort of thing ? :-)



yes & no there is it appears one existing test in there that tests the 
SbiScanner class directly. But yeah I think it would be useful to be 
able to try and compile ( maybe even run ) arbitrary basic source code ( 
I thought about doing this before anyway ) Maybe I just need to get the 
finger out


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


[Libreoffice-commits] .: sw/source

2012-05-11 Thread Miklos Vajna
 sw/source/filter/ww8/rtfattributeoutput.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit f0a520421247de3345e2039ed6bc0e642aa52a8e
Author: Miklos Vajna 
Date:   Fri May 11 16:03:13 2012 +0200

RtfAttributeOutput::EndTableCell: fix integer underflow

Regression from commit 1f77a5e, caused an ~infinite loop with the bugdoc
from fdo#45522. With this fix, the bugdoc "just" crashes again.

Change-Id: Idb0282d1606351498c9148343b9578d2b3642acf

diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx 
b/sw/source/filter/ww8/rtfattributeoutput.cxx
index b3da716..e5ebc52 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -960,7 +960,8 @@ void RtfAttributeOutput::EndTableCell( )
 m_bTableCellOpen = false;
 m_bTblAfterCell = true;
 m_bWroteCellInfo = false;
-m_aCells[m_nTableDepth]--;
+if (m_aCells[m_nTableDepth] > 0)
+m_aCells[m_nTableDepth]--;
 }
 
 void RtfAttributeOutput::EndTableRow( )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: i18npool/CustomTarget_breakiterator.mk

2012-05-11 Thread Caolán McNamara
 i18npool/CustomTarget_breakiterator.mk |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 705b217c9c966319071305f415442cb2a0c46d66
Author: Caolán McNamara 
Date:   Fri May 11 14:58:35 2012 +0100

debug harder

Change-Id: Ib74fba6059c1adcd10fc07331d70d7c7d8931bef

diff --git a/i18npool/CustomTarget_breakiterator.mk 
b/i18npool/CustomTarget_breakiterator.mk
index 50ab96b..1c757dd 100644
--- a/i18npool/CustomTarget_breakiterator.mk
+++ b/i18npool/CustomTarget_breakiterator.mk
@@ -102,12 +102,16 @@ $(i18npool_BIDIR)/%.brk : $(i18npool_BIDIR)/%.txt 
$(i18npool_GENBRKTARGET)
 # NOTE: strips every line with _word_ 'Prepend', including $Prepend
 $(i18npool_BIDIR)/%.txt : \
$(SRCDIR)/i18npool/source/breakiterator/data/%.txt | 
$(i18npool_BIDIR)/.dir
+   echo DEBUG i18npool 
ICU_RECLASSIFIED_CLOSE_PARENTHESIS=$(ICU_RECLASSIFIED_CLOSE_PARENTHESIS) 
ICU_RECLASSIFIED_PREPEND_SET_EMPTY=$(ICU_RECLASSIFIED_PREPEND_SET_EMPTY)
+   cat $(SRC_ROOT)/config_host.mk
 ifeq ($(ICU_RECLASSIFIED_CLOSE_PARENTHESIS),YES)
 ifeq ($(ICU_RECLASSIFIED_PREPEND_SET_EMPTY),YES)
+   echo DEBUG both
sed "s#\[:LineBreak =  Close_Punctuation:\]#\[\[:LineBreak =  
Close_Punctuation:\] \[:LineBreak = Close_Parenthesis:\]\]#" $< | sed 
"/Prepend/d" > $@
-   cat $@
 else
+   echo DEBUG only one
sed "s#\[:LineBreak =  Close_Punctuation:\]#\[\[:LineBreak =  
Close_Punctuation:\] \[:LineBreak = Close_Parenthesis:\]\]#" $< > $@
+   cat $@
 endif
 else
cp $< $@
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: icu/makefile.mk

2012-05-11 Thread Tor Lillqvist
 icu/makefile.mk |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 4134d6df2d1f7e22d5481f2b77dfe7855db70b02
Author: Tor Lillqvist 
Date:   Fri May 11 16:40:00 2012 +0300

Must prepend uconfig.h.prepend to uconfig.h when using --with-library-suffix

Change-Id: I201292765bd8514749757f84c55ffaec68e03a6b

diff --git a/icu/makefile.mk b/icu/makefile.mk
index fe00f46..ce54ff5 100644
--- a/icu/makefile.mk
+++ b/icu/makefile.mk
@@ -174,6 +174,7 @@ OUT2LIB= \
 $(BUILD_DIR)$/lib$/libicule.a \
 $(BUILD_DIR)$/lib$/libicutu.a
 .ELIF "$(OS)"=="ANDROID"
+BUILD_ACTION+= && cat uconfig.h.prepend common/unicode/uconfig.h 
>common/unicode/uconfig.h.new && mv common/unicode/uconfig.h.new 
common/unicode/uconfig.h
 OUT2LIB= \
 $(BUILD_DIR)$/lib$/libicudatalo.so \
 $(BUILD_DIR)$/lib$/libicuuclo.so \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: i18npool/CustomTarget_breakiterator.mk

2012-05-11 Thread Caolán McNamara
 i18npool/CustomTarget_breakiterator.mk |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit dccbc03adc6bd2eed0497dd99866f70113a46dca
Author: Caolán McNamara 
Date:   Fri May 11 14:34:20 2012 +0100

dump transformed output

Change-Id: I4aec3fbd6cc8bad7cbeaaef6e9909b83b7771fe1

diff --git a/i18npool/CustomTarget_breakiterator.mk 
b/i18npool/CustomTarget_breakiterator.mk
index a107ded..50ab96b 100644
--- a/i18npool/CustomTarget_breakiterator.mk
+++ b/i18npool/CustomTarget_breakiterator.mk
@@ -104,7 +104,8 @@ $(i18npool_BIDIR)/%.txt : \
$(SRCDIR)/i18npool/source/breakiterator/data/%.txt | 
$(i18npool_BIDIR)/.dir
 ifeq ($(ICU_RECLASSIFIED_CLOSE_PARENTHESIS),YES)
 ifeq ($(ICU_RECLASSIFIED_PREPEND_SET_EMPTY),YES)
-   sed "s#\[:LineBreak =  Close_Punctuation:\]#\[\[:LineBreak =  
Close_Punctuation:\] \[:LineBreak = Close_Parenthesis:\]\]#" $< | sed 
"/\/d" > $@
+   sed "s#\[:LineBreak =  Close_Punctuation:\]#\[\[:LineBreak =  
Close_Punctuation:\] \[:LineBreak = Close_Parenthesis:\]\]#" $< | sed 
"/Prepend/d" > $@
+   cat $@
 else
sed "s#\[:LineBreak =  Close_Punctuation:\]#\[\[:LineBreak =  
Close_Punctuation:\] \[:LineBreak = Close_Parenthesis:\]\]#" $< > $@
 endif
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 3 commits - svtools/source svx/source

2012-05-11 Thread Takeshi Abe
 svtools/source/config/apearcfg.cxx  |1 
 svtools/source/config/miscopt.cxx   |3 -
 svtools/source/config/test/test.cxx |3 -
 svtools/source/contnr/imivctl1.cxx  |1 
 svtools/source/contnr/svimpbox.cxx  |   64 
 svtools/source/contnr/svlbitm.cxx   |2 
 svtools/source/contnr/svlbox.cxx|   50 -
 svtools/source/control/ctrlbox.cxx  |3 -
 svtools/source/control/roadmap.cxx  |1 
 svtools/source/control/toolbarmenuimp.hxx   |1 
 svtools/source/filter/FilterConfigCache.cxx |5 --
 svtools/source/svhtml/parhtml.cxx   |1 
 svx/source/table/tablecontroller.hxx|4 -
 13 files changed, 139 deletions(-)

New commits:
commit be0c5bd426db05c1dae1b63263e7fac61ec09494
Author: Takeshi Abe 
Date:   Fri May 11 22:22:20 2012 +0900

removed unused defines

Change-Id: Icc2ed1499615728bd8dce1b34e64095fcd5d78b9

diff --git a/svtools/source/config/apearcfg.cxx 
b/svtools/source/config/apearcfg.cxx
index 0847ad0..0f6c792 100644
--- a/svtools/source/config/apearcfg.cxx
+++ b/svtools/source/config/apearcfg.cxx
@@ -36,7 +36,6 @@
 #include 
 #include 
 
-#define DEFAULT_LOOKNFEEL   0
 #define DEFAULT_DRAGMODE2
 #define DEFAULT_SNAPMODE0
 #define DEFAULT_SCALEFACTOR 100
diff --git a/svtools/source/config/miscopt.cxx 
b/svtools/source/config/miscopt.cxx
index f43a7c8..51d2ee7 100644
--- a/svtools/source/config/miscopt.cxx
+++ b/svtools/source/config/miscopt.cxx
@@ -51,7 +51,6 @@ using namespace ::com::sun::star;
 
 #define ASCII_STR(s)OUString( 
RTL_CONSTASCII_USTRINGPARAM(s) )
 #define ROOTNODE_MISC   ASCII_STR("Office.Common/Misc")
-#define DEFAULT_PLUGINSENABLED  sal_True;
 
 #define PROPERTYNAME_PLUGINSENABLED ASCII_STR("PluginsEnabled")
 #define PROPERTYHANDLE_PLUGINSENABLED   0
@@ -76,8 +75,6 @@ using namespace ::com::sun::star;
 #define PROPERTYNAME_EXPERIMENTALMODE   ASCII_STR("ExperimentalMode")
 #define PROPERTYHANDLE_EXPERIMENTALMODE 10
 
-#define PROPERTYCOUNT   11
-
 #define VCL_TOOLBOX_STYLE_FLAT  ((sal_uInt16)0x0004) // from 

 
 class SvtMiscOptions_Impl : public ConfigItem
diff --git a/svtools/source/config/test/test.cxx 
b/svtools/source/config/test/test.cxx
index bfc48bf..2a63be2 100644
--- a/svtools/source/config/test/test.cxx
+++ b/svtools/source/config/test/test.cxx
@@ -96,9 +96,6 @@ using namespace ::com::sun::star::registry  ;
 
 #define ASCII( STEXT )  OUString( 
RTL_CONSTASCII_USTRINGPARAM( STEXT ))
 
-#define SERVICENAME_SIMPLEREGISTRY  OUString( 
RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.SimpleRegistry" ))
-#define SERVICENAME_NESTEDREGISTRY  OUString( 
RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.registry.NestedRegistry" ))
-
 
//_
 //  declarations
 
//_
diff --git a/svtools/source/contnr/imivctl1.cxx 
b/svtools/source/contnr/imivctl1.cxx
index 7f7eae4..48e8b10 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -46,7 +46,6 @@
 #include 
 #include 
 
-#define DD_SCROLL_PIXEL 24
 #define IMPICNVIEW_ACC_RETURN 1
 #define IMPICNVIEW_ACC_ESCAPE 2
 
diff --git a/svtools/source/contnr/svlbitm.cxx 
b/svtools/source/contnr/svlbitm.cxx
index a4cbfc0..ba1ee4b 100644
--- a/svtools/source/contnr/svlbitm.cxx
+++ b/svtools/source/contnr/svlbitm.cxx
@@ -36,8 +36,6 @@
 #include 
 #include 
 
-#define TABOFFS_NOT_VALID -200
-
 struct SvLBoxButtonData_Impl
 {
 SvLBoxEntry*pEntry;
diff --git a/svtools/source/control/ctrlbox.cxx 
b/svtools/source/control/ctrlbox.cxx
index 9c5ddb9..5029aa7 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -62,9 +62,6 @@
 #define GAPTOEXTRAPREVIEW 10
 #define MAXPREVIEWWIDTH 120
 
-#define TWIPS_TO_PT100(val) (val * 5)
-#define PT100_TO_TWIPS(val) (val / 5)
-
 #define FONTNAMEBOXMRUENTRIESFILE "/user/config/fontnameboxmruentries"
 
 using namespace ::com::sun::star;
diff --git a/svtools/source/control/roadmap.cxx 
b/svtools/source/control/roadmap.cxx
index 60c5853..b2e06dd 100644
--- a/svtools/source/control/roadmap.cxx
+++ b/svtools/source/control/roadmap.cxx
@@ -43,7 +43,6 @@
 #define ROADMAP_INDENT_Y27
 #define ROADMAP_ITEM_DISTANCE_Y 6
 #define RMINCOMPLETE-1
-#define NADDITEM1
 
 //.
 namespace svt
commit 193872bcdfc3f988463a4ff62e25a4f31d81469d
Author: Takeshi Abe 
Date:   Fri May 11 22:21:59 2012 +0900

removed dead code

Change-Id: I76361b6fc995b13547e0bf24a593f91e456502c8

diff --git a/svtools/source/contnr/svimpbox.cxx

[Libreoffice-commits] .: 4 commits - icu/icu4c-android.patch icu/icu4c-build.patch icu/makefile.mk

2012-05-11 Thread Tor Lillqvist
 icu/icu4c-android.patch |   50 ++--
 icu/icu4c-build.patch   |   32 ++
 icu/makefile.mk |2 -
 3 files changed, 52 insertions(+), 32 deletions(-)

New commits:
commit f9b5e3d8ce2b1201ff021d70f466d3cb61efd777
Author: Tor Lillqvist 
Date:   Fri May 11 15:58:36 2012 +0300

Fix copy/pasted comment

Change-Id: I I782827cfaf58e6eb4f6f3f8cd4159a0f787a7024

diff --git a/icu/makefile.mk b/icu/makefile.mk
index 4009280..fe00f46 100644
--- a/icu/makefile.mk
+++ b/icu/makefile.mk
@@ -121,7 +121,7 @@ icu_CXXFLAGS+=-fno-omit-frame-pointer
 .ENDIF
 
 .IF "$(OS)"=="IOS" || "$(OS)"=="ANDROID"
-# Problems with uint64_t on Android unless disabling strictness
+# Problems on Android unless disabling dynamic loading
 DISABLE_DYLOAD=--disable-dyload
 .ENDIF
 
commit 5a20d2be688e5f0e316a71b3fc7582a2935e8787
Author: Tor Lillqvist 
Date:   Fri May 11 15:57:59 2012 +0300

"gcc-android" needs to be recognized on the build platform

Change-Id: I0f44150a31fa11afd908c3ba340d73effacfe17f

diff --git a/icu/icu4c-android.patch b/icu/icu4c-android.patch
index 1056ea4..dea0e0a 100644
--- a/icu/icu4c-android.patch
+++ b/icu/icu4c-android.patch
@@ -41,38 +41,6 @@
  *)
  ;;
  esac
 misc/icu/source/tools/toolutil/pkg_genc.c
-+++ misc/build/icu/source/tools/toolutil/pkg_genc.c
-@@ -145,6 +145,28 @@
- 
- ".long ","",HEX_0X
- },
-+{"gcc-android",
-+  "\t.arch armv5te\n"
-+  "\t.fpu softvfp\n"
-+  "\t.eabi_attribute 20, 1\n"
-+  "\t.eabi_attribute 21, 1\n"
-+  "\t.eabi_attribute 23, 3\n"
-+  "\t.eabi_attribute 24, 1\n"
-+  "\t.eabi_attribute 25, 1\n"
-+  "\t.eabi_attribute 26, 2\n"
-+  "\t.eabi_attribute 30, 6\n"
-+  "\t.eabi_attribute 18, 4\n"
-+  "\t.file \"%s.s\"\n"
-+  "\t.global %s\n"
-+  "\t.section .rodata\n"
-+  "\t.align 2\n"
-+  "\t.type %s, %%object\n"
-+  "%s:\n",
-+
-+  "\t.word ",
-+  "\t.section .note.GNU-stack,\"\",%%progbits\n",
-+  HEX_0X
-+},
- {"sun",
- "\t.section \".rodata\"\n"
- "\t.align   8\n"
-
 --- misc/icu/source/common/putilimp.h
 +++ misc/build/icu/source/common/putilimp.h
 @@ -86,6 +86,8 @@
diff --git a/icu/icu4c-build.patch b/icu/icu4c-build.patch
index db2d441..8082fc1 100644
--- a/icu/icu4c-build.patch
+++ b/icu/icu4c-build.patch
@@ -9,6 +9,38 @@
  #define SMALL_BUFFER_FLAG_NAMES 32
  #define BUFFER_PADDING_SIZE 20
  
+--- misc/icu/source/tools/toolutil/pkg_genc.c
 misc/build/icu/source/tools/toolutil/pkg_genc.c
+@@ -145,6 +145,28 @@
+ 
+ ".long ","",HEX_0X
+ },
++{"gcc-android",
++  "\t.arch armv5te\n"
++  "\t.fpu softvfp\n"
++  "\t.eabi_attribute 20, 1\n"
++  "\t.eabi_attribute 21, 1\n"
++  "\t.eabi_attribute 23, 3\n"
++  "\t.eabi_attribute 24, 1\n"
++  "\t.eabi_attribute 25, 1\n"
++  "\t.eabi_attribute 26, 2\n"
++  "\t.eabi_attribute 30, 6\n"
++  "\t.eabi_attribute 18, 4\n"
++  "\t.file \"%s.s\"\n"
++  "\t.global %s\n"
++  "\t.section .rodata\n"
++  "\t.align 2\n"
++  "\t.type %s, %%object\n"
++  "%s:\n",
++
++  "\t.word ",
++  "\t.section .note.GNU-stack,\"\",%%progbits\n",
++  HEX_0X
++},
+ {"sun",
+ "\t.section \".rodata\"\n"
+ "\t.align   8\n"
+
 --- misc/icu/source/common/stringpiece.cpp 2010-09-29 20:37:20.0 
+0200
 +++ misc/build/icu/source/common/stringpiece.cpp   2011-03-15 
10:57:24.722045561 +0100
 @@ -75,7 +75,7 @@
commit 95a8ac4f5ad2c5d59f03725b7e101d0d2a8654f0
Author: Tor Lillqvist 
Date:   Fri May 11 15:37:17 2012 +0300

The timezone variable is called just that on Android

Change-Id: Icd3f13bec24227174b3698ed26f97d8c55d892ff

diff --git a/icu/icu4c-android.patch b/icu/icu4c-android.patch
index f8163d3..1056ea4 100644
--- a/icu/icu4c-android.patch
+++ b/icu/icu4c-android.patch
@@ -84,3 +84,12 @@
  #else
  #   define U_HAVE_NL_LANGINFO_CODESET 1
  #endif
+@@ -114,6 +114,8 @@
+ 
+ #ifdef U_TIMEZONE
+ /* Use the predefined value. */
++#elif defined(__ANDROID__)
++#   define U_TIMEZONE timezone
+ #elif U_PLATFORM_IS_LINUX_BASED
+ #   define U_TIMEZONE __timezone
+ #elif U_PLATFORM_USES_ONLY_WIN32_API
commit a973651de8b119f76e93459c26c0363664a8ed4e
Author: Tor Lillqvist 
Date:   Fri May 11 15:28:01 2012 +0300

No  for Android

Change-Id: I8063d5524b34177d77500069c85a3ae718fa5422

diff --git a/icu/icu4c-android.patch b/icu/icu4c-android.patch
index e6befb0..f8163d3 100644
--- a/icu/icu4c-android.patch
+++ b/icu/icu4c-android.patch
@@ -73,3 +73,14 @@
  "\t.section \".rodata\"\n"
  "\t.align   8\n"
 
+--- misc/icu/source/common/putilimp.h
 misc/build/icu/source/common/putilimp.h
+@@ -86,6 +86,8 @@
+ /* Use the predefined value. */
+ #elif U_PLATFORM_HAS_WIN32_API
+ #   define U_HAVE_NL_LANGINFO_CODESET 0
++#elif defined(__ANDROID__)
++#   define U_HAVE_NL_LANGINFO_CODESET 0
+ #else
+ #   define

[Libreoffice-commits] .: i18npool/CustomTarget_breakiterator.mk

2012-05-11 Thread Caolán McNamara
 i18npool/CustomTarget_breakiterator.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 779e6e7d4c8f92c3138cd839f529e5eacaad1755
Author: Caolán McNamara 
Date:   Fri May 11 14:20:07 2012 +0100

is this sed line confusing older seds ?

Change-Id: I04508b7bdc3fcb9fc1b0ddae7d595a302aa7ec65

diff --git a/i18npool/CustomTarget_breakiterator.mk 
b/i18npool/CustomTarget_breakiterator.mk
index fcb1aaa..a107ded 100644
--- a/i18npool/CustomTarget_breakiterator.mk
+++ b/i18npool/CustomTarget_breakiterator.mk
@@ -104,7 +104,7 @@ $(i18npool_BIDIR)/%.txt : \
$(SRCDIR)/i18npool/source/breakiterator/data/%.txt | 
$(i18npool_BIDIR)/.dir
 ifeq ($(ICU_RECLASSIFIED_CLOSE_PARENTHESIS),YES)
 ifeq ($(ICU_RECLASSIFIED_PREPEND_SET_EMPTY),YES)
-   sed "s#\[:LineBreak =  Close_Punctuation:\]#\[\[:LineBreak =  
Close_Punctuation:\] \[:LineBreak = Close_Parenthesis:\]\]#;/\/d" $< 
> $@
+   sed "s#\[:LineBreak =  Close_Punctuation:\]#\[\[:LineBreak =  
Close_Punctuation:\] \[:LineBreak = Close_Parenthesis:\]\]#" $< | sed 
"/\/d" > $@
 else
sed "s#\[:LineBreak =  Close_Punctuation:\]#\[\[:LineBreak =  
Close_Punctuation:\] \[:LineBreak = Close_Parenthesis:\]\]#" $< > $@
 endif
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Bug 37361] LibreOffice 3.5 most annoying bugs

2012-05-11 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=37361

Bug 37361 depends on bug 45190, which changed state.

Bug 45190 Summary: FILEOPEN Shifted and invisible content in table in rtf 
document
https://bugs.freedesktop.org/show_bug.cgi?id=45190

   What|Old Value   |New Value

 Resolution||FIXED
 Status|NEW |RESOLVED

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] .: sw/qa writerfilter/source

2012-05-11 Thread Miklos Vajna
 sw/qa/extras/rtftok/data/fdo45190.rtf  |   10 ++
 sw/qa/extras/rtftok/rtftok.cxx |   22 ++
 writerfilter/source/rtftok/rtfdocumentimpl.cxx |8 +++-
 3 files changed, 39 insertions(+), 1 deletion(-)

New commits:
commit bf123eeffc05907dfcb0d355ab17359353b0ede5
Author: Miklos Vajna 
Date:   Fri May 11 14:45:59 2012 +0200

fdo#45190 import of RTF_LI should reset inherited RTF_FI

Change-Id: I17c287fa4daa399876b34182c02d9cf928fe1b6f

diff --git a/sw/qa/extras/rtftok/data/fdo45190.rtf 
b/sw/qa/extras/rtftok/data/fdo45190.rtf
new file mode 100644
index 000..613a283
--- /dev/null
+++ b/sw/qa/extras/rtftok/data/fdo45190.rtf
@@ -0,0 +1,10 @@
+{\rtf1
+{\stylesheet
+{\s1 \fi-100 style;}
+}
+\s1\li0 first
+\par
+\pard
+\s1\fi-100\li0 second
+\par
+}
diff --git a/sw/qa/extras/rtftok/rtftok.cxx b/sw/qa/extras/rtftok/rtftok.cxx
index bff076a..29ea9be 100644
--- a/sw/qa/extras/rtftok/rtftok.cxx
+++ b/sw/qa/extras/rtftok/rtftok.cxx
@@ -92,6 +92,7 @@ public:
 void testFdo49501();
 void testFdo49271();
 void testFdo49692();
+void testFdo45190();
 
 CPPUNIT_TEST_SUITE(Test);
 #if !defined(MACOSX) && !defined(WNT)
@@ -127,6 +128,7 @@ public:
 CPPUNIT_TEST(testFdo49501);
 CPPUNIT_TEST(testFdo49271);
 CPPUNIT_TEST(testFdo49692);
+CPPUNIT_TEST(testFdo45190);
 #endif
 CPPUNIT_TEST_SUITE_END();
 
@@ -721,6 +723,26 @@ void Test::testFdo49692()
 }
 }
 
+void Test::testFdo45190()
+{
+load("fdo45190.rtf");
+
+uno::Reference xTextDocument(mxComponent, 
uno::UNO_QUERY);
+uno::Reference 
xParaEnumAccess(xTextDocument->getText(), uno::UNO_QUERY);
+uno::Reference xParaEnum = 
xParaEnumAccess->createEnumeration();
+
+// inherited \fi should be reset
+uno::Reference xPropertySet(xParaEnum->nextElement(), 
uno::UNO_QUERY);
+sal_Int32 nValue = 0;
+xPropertySet->getPropertyValue("ParaFirstLineIndent") >>= nValue;
+CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nValue);
+
+// but direct one not
+xPropertySet.set(xParaEnum->nextElement(), uno::UNO_QUERY);
+xPropertySet->getPropertyValue("ParaFirstLineIndent") >>= nValue;
+CPPUNIT_ASSERT_EQUAL(sal_Int32(TWIP_TO_MM100(-100)), nValue);
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(Test);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx 
b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index a1f27be..83ea09c 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -2233,7 +2233,6 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, 
int nParam)
 switch (nKeyword)
 {
 case RTF_FI: nSprm = NS_sprm::LN_PDxaLeft1; break;
-case RTF_LI: nSprm = NS_sprm::LN_PDxaLeft; break;
 case RTF_LIN: nSprm = 0x845e; break;
 case RTF_RI: nSprm = NS_sprm::LN_PDxaRight; break;
 case RTF_RIN: nSprm = 0x845d; break;
@@ -2868,6 +2867,13 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, 
int nParam)
 case RTF_DPFILLBGCB:
 m_aStates.top().aDrawingObject.nFillColorB = nParam; 
m_aStates.top().aDrawingObject.bHasFillColor = true;
 break;
+case RTF_LI:
+
m_aStates.top().aParagraphSprms->push_back(make_pair(NS_sprm::LN_PDxaLeft, 
pIntValue));
+// It turns out \li should reset the \fi inherited from the 
stylesheet.
+// So set the direct formatting to zero, if we don't have such 
direct formatting yet.
+if 
(!m_aStates.top().aParagraphSprms.find(NS_sprm::LN_PDxaLeft1).get())
+
m_aStates.top().aParagraphSprms->push_back(make_pair(NS_sprm::LN_PDxaLeft1, 
RTFValue::Pointer_t(new RTFValue(0;
+break;
 default:
 SAL_INFO("writerfilter", OSL_THIS_FUNC << ": TODO handle value '" 
<< lcl_RtfToString(nKeyword) << "'");
 aSkip.setParsed(false);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: [PUSHED][REVIEW 3-5] inputline sometimes not correct size ?

2012-05-11 Thread Noel Power

On 11/05/12 13:41, Eike Rathke wrote:

Hi Noel,

On Friday, 2012-05-11 12:10:27 +0100, Noel Power wrote:


I remember we talked about this before, I guess I meant to check if
it fixed things for you ( and get it to 3.5 ) 
http://cgit.freedesktop.org/libreoffice/core/commit/?id=7580fff93292d08bc6f42792f256b832f5c4bad6
can you still reproduce this problem  (and perhaps verify this fixes
it ? )

Yup, 3-5 still had it and that fixed it, pushed
http://cgit.freedesktop.org/libreoffice/core/commit/?h=libreoffice-3-5&id=a2859b0bdf4bc84ea02c3a59ae4d626739732643

oh that's great you could confirm because I could never reproduce that

thanks again

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


Re: [libreoffice-marketing] LibreOffice developer digest

2012-05-11 Thread Cor Nouws

Thorsten Behrens wrote (11-05-12 14:53)


Wow, nice work - thanks so much for taking over!


You're all welcome guys 'n girls!

Now Twitte, Lke, ...


--
 - Cor
 - http://nl.libreoffice.org

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


Re: [libreoffice-marketing] LibreOffice developer digest

2012-05-11 Thread Thorsten Behrens
Cor Nouws wrote:
> Now the routing is clear, I hope I can do it fast and regularly.
> Looking in the git-commits is something I do anyway.
> 
Wow, nice work - thanks so much for taking over!

Cheers,

-- Thorsten


pgp3FzS9cNI92.pgp
Description: PGP signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


REMINDER: Release 3.5.4-rc1 from libreoffice-3-5 branch

2012-05-11 Thread Petr Mladek
Hi,

please note that the commit deadline for 3.5.4-rc1 is on Monday, May 14,
2012.

The tag and branch libreoffice-3-5-4 is going to be created the day
after. Only commits with 3 reviewers will be allowed for that branch.

See also
http://wiki.documentfoundation.org/ReleasePlan#3.5_release
http://wiki.documentfoundation.org/Release_Criteria
http://wiki.documentfoundation.org/Development/Branches


Best Regards,
Petr


PS: Please, help with reviewing patches :-)


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


Re: [REVIEW 3-5] Allow keyword Append to be used as a variable. bnc#745930

2012-05-11 Thread Michael Meeks

On Fri, 2012-05-11 at 12:47 +0100, Noel Power wrote:
> please see 
> http://cgit.freedesktop.org/libreoffice/core/commit/?id=634b211632847dcb04b31f478296e5e6d732ac73
>  
> hopefully ripe for cherry-picking

Is there an easily extensible unit testing framework in-place for this
sort of thing ? :-)

ATB,

Michael.

-- 
michael.me...@suse.com  <><, Pseudo Engineer, itinerant idiot

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


Re: How to add color scales to ODF?

2012-05-11 Thread Michael Stahl
On 11/05/12 13:21, Eike Rathke wrote:
> Hi Markus,
> 
> On Friday, 2012-05-11 03:20:37 +0200, Markus Mohrhard wrote:
> 
>> A possible way a color scale entry would look like is:
>>
>> 
>>   
>>   
>> 
>> 
>>   
>>   
>>   
>>   
>> 
> 
> Taking Michael's suggestion
> 
> 
>style:color-scale-minimum-value="3" style:color-scale-maximum="44"
> style:color-scale-maximum-value="42"/>
> 
> 
> and applying your example this could be something like
> 
> 
> 
>  office:value="10"/>
> 
> 
> 
> 
> 
> 
>  fo:background-color="#aa"/>
>  fo:background-color="#bb"/>
> 
> 
> 
> 
> For type="value" above, can also strings be colored differently? Then
> we'd need to use office:value-type as well.
> 
> 
>> For color scales and data bars( that are more or less just another way
>> to represent the same information ) there are quite some differences
>> to normal conditional formatting. One important difference is that the
>> range the color scale is applied to is really important (min, max,
>> percent, percentile) don't make sense without a range.
> 
> I think that can be expressed in the specification saying that a style
> containing  needs to be applied on a contiguous
> range. Not sure though. If not, then things get complicated.

i wonder if that restriction is really necessary.  of course i don't
know how Calc is implemented and whether there would be performance
advantages in doing so; also i don't know if OOXML has such a
restrictions, and if not whether it would create interop problems.

but another problem: is it possible that users want to use the same
color scale on a bunch of cells, but otherwise style them differently?

if so i guess this could be dealt with via some kind of style
inheritance (which is already possible AFAIK), i.e. put the color scale
into a base style; or perhaps it would be better to have color scales as
top-level elements, and then reference them from styles (similar to e.g.
fonts), like so:




  



  


with the idea that all cells that reference via their styles the same
color scales participate in the minimum/maximum etc. setting.

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


[Libreoffice-commits] .: 2 commits - sw/source

2012-05-11 Thread Philipp Weissenbacher
 sw/source/core/text/frmform.cxx |8 +--
 sw/source/core/text/porlay.hxx  |   83 +++-
 2 files changed, 45 insertions(+), 46 deletions(-)

New commits:
commit 46f38ec48c938764ece51c262f4cc018c5c8ff8d
Author: Philipp Weissenbacher 
Date:   Fri May 11 14:38:29 2012 +0200

Translate German comments

Change-Id: I21d88cdc84435ba60e3c85eab1848eaedf65e82b

diff --git a/sw/source/core/text/porlay.hxx b/sw/source/core/text/porlay.hxx
index e81769b..e7f9559 100644
--- a/sw/source/core/text/porlay.hxx
+++ b/sw/source/core/text/porlay.hxx
@@ -75,9 +75,9 @@ public:
  *  class SwRepaint
  */
 
-// SwRepaint ist ein dokumentglobales SwRect mit einem nOfst der angibt,
-// ab wo in der ersten Zeile gepaintet werden soll
-// und einem nRightOfst, der den rechten Rand bestimmt
+// SwRepaint is a document-global SwRect
+// nOfst states from where in the first line should be painted
+// nRightOfst gives teh right margin
 class SwRepaint : public SwRect
 {
 SwTwips nOfst;
@@ -100,10 +100,10 @@ public:
 class SwLineLayout : public SwTxtPortion
 {
 private:
-SwLineLayout *pNext;// Die naechste Zeile.
+SwLineLayout *pNext;// The next Line
 std::vector* pLLSpaceAdd; // Used for justified alignment.
 std::deque* pKanaComp;  // Used for Kana compression.
-KSHORT nRealHeight; // Die aus Zeilenabstand/Register 
resultierende Hoehe.
+KSHORT nRealHeight; // The height resulting from line 
spacing and register
 sal_Bool bFormatAdj : 1;
 sal_Bool bDummy : 1;
 sal_Bool bFntChg: 1;
@@ -113,17 +113,17 @@ private:
 sal_Bool bFly   : 1;
 sal_Bool bRest  : 1;
 sal_Bool bBlinking  : 1;
-sal_Bool bClipping  : 1; // Clipping erforderlich wg. exakter Zeilenhoehe
-sal_Bool bContent   : 1; // enthaelt Text, fuer Zeilennumerierung
-sal_Bool bRedline   : 1; // enthaelt Redlining
-sal_Bool bForcedLeftMargin : 1; // vom Fly verschobener linker Einzug
+sal_Bool bClipping  : 1; // Clipping needed for exact line height
+sal_Bool bContent   : 1; // Text for line numbering
+sal_Bool bRedline   : 1; // The Redlining
+sal_Bool bForcedLeftMargin : 1; // Left adjustment moved by the Fly
 sal_Bool bHanging : 1; // contents a hanging portion in the margin
 sal_Bool bUnderscore : 1;
 
 SwTwips _GetHangingMargin() const;
 
 public:
-// von SwLinePortion
+// From SwLinePortion
 virtual SwLinePortion *Insert( SwLinePortion *pPortion );
 virtual SwLinePortion *Append( SwLinePortion *pPortion );
 inline SwLinePortion *GetFirstPortion() const;
@@ -157,8 +157,7 @@ public:
 inline void SetUnderscore( const sal_Bool bNew = sal_True ) { bUnderscore 
= bNew; }
 inline sal_Bool HasUnderscore() const { return bUnderscore; }
 
-// Beruecksichtigung von Dummyleerzeilen
-// 4147, 8221:
+// Respecting empty dummy lines
 inline void SetDummy( const sal_Bool bNew ) { bDummy = bNew; }
 inline sal_Bool IsDummy() const { return bDummy; }
 
@@ -174,19 +173,19 @@ public:
 
 void Init( SwLinePortion *pNextPortion = NULL);
 
-// Sammelt die Daten fuer die Zeile.
+// Collects the data for the line
 void CalcLine( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf );
 
 inline void SetRealHeight( KSHORT nNew ) { nRealHeight = nNew; }
 inline KSHORT GetRealHeight() const { return nRealHeight; }
 
-// Erstellt bei kurzen Zeilen die Glue-Kette.
+// Creates the glue chain for short lines
 SwMarginPortion *CalcLeftMargin();
 
 inline SwTwips GetHangingMargin() const
 { return _GetHangingMargin(); }
 
-// fuer die Sonderbehandlung bei leeren Zeilen
+// For special treatment for empty lines
 virtual sal_Bool Format( SwTxtFormatInfo &rInf );
 
 //
@@ -263,46 +262,46 @@ public:
 
 class SwParaPortion : public SwLineLayout
 {
-// neu zu paintender Bereich
+// Area that needs repainting
 SwRepaint aRepaint;
-// neu zu formatierender Bereich
+// Area that needs reformatting
 SwCharRange aReformat;
 SwScriptInfo aScriptInfo;
-//   Fraction aZoom;
+// Fraction aZoom;
 long nDelta;
 
-// Wenn ein SwTxtFrm gelocked ist, werden keine Veraenderungen an den
-// Formatierungsdaten (unter pLine) vorgenommen (vgl. ORPHANS)
-sal_Bool bFlys  : 1; // Ueberlappen Flys ?
+// If a SwTxtFrma is locked, no changes occur to the formatting data (under
+// pLine) (compare with Orphans)
+sal_Bool bFlys  : 1; // Overlapping Flys?
 sal_Bool bPrep  : 1; // PREP_*
 sal_Bool bPrepWidows: 1; // PREP_WIDOWS
 sal_Bool bPrepAdjust: 1; // PREP_ADJUST_FRM
 sal_Bool bPrepMustFit   : 1; // PREP_MUST_FIT
-sal_Bool bFollowField   : 1; // Es steht noch ein Feldrest fuer den Follow 
an.
+sal_Bool bFollowField 

Re: [libreoffice-marketing] LibreOffice developer digest

2012-05-11 Thread Cor Nouws

Hi Petr,

Petr Mladek wrote (11-05-12 14:39)

Cor Nouws píše v Čt 10. 05. 2012 v 17:32 +0200:



Attached an ods with the rough data I have now.


The list of selected changes look reasonable to me. I just suggest two
things:

+ add name of the author
+ slightly reword each commit summary to get a consistent look and
  feel


The second I did a bit. The first might be an idea for the next time:
http://blog.documentfoundation.org/2012/05/11/new-and-changed-functions-you-can-experience-and-test-them-now/


[...]
If you want to add links to bugzilla, I could create a simple script for
you. It will replace fdo#x with the needed tags for WordPress. I
guess that it uses html tags. Does it?


Thanks for the offer. When looking at the WordPress thing yesterday I 
did not find a HTML switch, but it was there today. And that makes it 
easy enough for me to handle.

But if I think I need smarter tools, I'll call you :-)


Cool. Thanks a lot for working on it.


First time is bit more time-consuming.
Now the routing is clear, I hope I can do it fast and regularly.
Looking in the git-commits is something I do anyway.

Cheers,

--
 - Cor
 - http://nl.libreoffice.org

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


Re: [PUSHED][REVIEW 3-5] inputline sometimes not correct size ?

2012-05-11 Thread Eike Rathke
Hi Noel,

On Friday, 2012-05-11 12:10:27 +0100, Noel Power wrote:

> I remember we talked about this before, I guess I meant to check if
> it fixed things for you ( and get it to 3.5 ) 
> http://cgit.freedesktop.org/libreoffice/core/commit/?id=7580fff93292d08bc6f42792f256b832f5c4bad6
> can you still reproduce this problem  (and perhaps verify this fixes
> it ? )

Yup, 3-5 still had it and that fixed it, pushed
http://cgit.freedesktop.org/libreoffice/core/commit/?h=libreoffice-3-5&id=a2859b0bdf4bc84ea02c3a59ae4d626739732643

Thanks
  Eike

-- 
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GnuPG key 0x293C05FD : 997A 4C60 CE41 0149 0DB3  9E96 2F1A D073 293C 05FD


pgpkjEA5R5L9S.pgp
Description: PGP signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] .: icu/icu4c-interlck.patch icu/makefile.mk

2012-05-11 Thread Caolán McNamara
 icu/icu4c-interlck.patch |   11 +++
 icu/makefile.mk  |1 +
 2 files changed, 12 insertions(+)

New commits:
commit 9590650af70bc9cde35e87fc386956c3e7054229
Author: Caolán McNamara 
Date:   Fri May 11 13:40:50 2012 +0100

gcc atomics only definitely available >= gcc 4.4.4

Change-Id: I77580411eabe4375d86670debb4a5770f7873c14

diff --git a/icu/icu4c-interlck.patch b/icu/icu4c-interlck.patch
new file mode 100644
index 000..6426dce
--- /dev/null
+++ b/icu/icu4c-interlck.patch
@@ -0,0 +1,11 @@
+--- misc/icu/source/common/putilimp.h
 misc/build/icu/source/common/putilimp.h
+@@ -175,7 +175,7 @@
+  */
+ #ifdef U_HAVE_GCC_ATOMICS
+ /* Use the predefined value. */
+-#elif defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 401)
++#elif defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 404)
+ #   define U_HAVE_GCC_ATOMICS 1
+ #else
+ #   define U_HAVE_GCC_ATOMICS 0
diff --git a/icu/makefile.mk b/icu/makefile.mk
index 0253978..4009280 100644
--- a/icu/makefile.mk
+++ b/icu/makefile.mk
@@ -53,6 +53,7 @@ PATCH_FILES=\
 icu4c-warnings.patch \
 icu4c.9313.cygwin.patch \
 icu4c-macosx.patch \
+icu4c-interlck.patch \
 
 .IF "$(OS)"=="ANDROID"
 PATCH_FILES+=\
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sc/source

2012-05-11 Thread Eike Rathke
 sc/source/ui/app/inputwin.cxx |   18 +++---
 sc/source/ui/inc/inputwin.hxx |2 ++
 2 files changed, 13 insertions(+), 7 deletions(-)

New commits:
commit a2859b0bdf4bc84ea02c3a59ae4d626739732643
Author: Noel Power 
Date:   Wed Jan 25 12:36:17 2012 +

fix initial height of multiline input window

There is a hardcoded preferred height for the input window that was getting 
picked up becuase the result of GetTextHeight was just '1' ( due to no font 
being set up ) We shouldn't use a hardcoded value, we should always use the 
proper text height e.g. the result of a successfull call to  GetTextHeight() ( 
the patch makes sure we get a decent result from this call )
(cherry picked from commit 7580fff93292d08bc6f42792f256b832f5c4bad6)

Signed-off-by: Eike Rathke 

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index b7592e3..b61ccb9 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1133,6 +1133,15 @@ ScMultiTextWnd::ScMultiTextWnd( ScInputBarGroup* pParen, 
ScTabViewShell* pViewSh
 mnLastExpandedLines( INPUTWIN_MULTILINES ),
 mbInvalidate( false )
 {
+// Calculate the text height, need to set a font for that. Probably we 
could set the font
+// here ( on this Window ) and avoid the temp Window. OTOH vcl is such a 
mystery I prefer
+// to minimise possible unexpected side-affects this way
+Window aTmp(this, WB_BORDER );
+aTmp.SetFont(aTextFont);
+mnTextHeight = LogicToPixel(Size(0,aTmp.GetTextHeight())).Height() ;
+Size aBorder;
+aBorder = CalcWindowSize( aBorder);
+mnBorderHeight = aBorder.Height();
 nTextStartPos = TEXT_MULTI_STARTPOS;
 }
 
@@ -1163,13 +1172,8 @@ EditView* ScMultiTextWnd::GetEditView()
 
 long ScMultiTextWnd::GetPixelHeightForLines( long nLines )
 {
-long height = ( LogicToPixel(Size(0,GetTextHeight())).Height() );
-// need to figure out why GetTextHeight is not set up when I need it
-// some initialisation timing issue ?
-height = Max ( long( 14 ), height );
-// add padding ( for the borders of the window I guess ) otherwise we
-// chop slightly the top and bottom of whatever is in the inputbox
-return ( nLines *  height ) + 4;
+// add padding ( for the borders of the window )
+return ( nLines *  mnTextHeight ) + mnBorderHeight;
 }
 
 void ScMultiTextWnd::SetNumLines( long nLines )
diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx
index ae8383d..b0facf1 100644
--- a/sc/source/ui/inc/inputwin.hxx
+++ b/sc/source/ui/inc/inputwin.hxx
@@ -207,6 +207,8 @@ private:
 ScInputBarGroup& mrGroupBar;
 long mnLines;
 long mnLastExpandedLines;
+long mnTextHeight;
+long mnBorderHeight;
 bool mbInvalidate;
 };
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: [libreoffice-marketing] LibreOffice developer digest

2012-05-11 Thread Petr Mladek
Cor Nouws píše v Čt 10. 05. 2012 v 17:32 +0200:
> Hi Petr,
> 
> Petr Mladek wrote (10-05-12 17:11)
> 
> > Wonderful. Could you please cut&paste them? I wonder how they look like.
> 
> thanks for your interest!
> Attached an ods with the rough data I have now.

The list of selected changes look reasonable to me. I just suggest two
things:

   + add name of the author
   + slightly reword each commit summary to get a consistent look and
 feel

I mean to get something like the GNOME digest, see
http://blogs.gnome.org/commitdigest/2012/03/11/issue-179/#more-624


> Thinking about a strategy to get that in WordPress quickly (without 
> difficult mouse editing of links... Someone a hint?) :-\
> (will post part of it, will keep part for next blog)

When I announce builds for openSUSE, I cut&paste the previous
announcement. Most of the links are the same.

If you want to add links to bugzilla, I could create a simple script for
you. It will replace fdo#x with the needed tags for WordPress. I
guess that it uses html tags. Does it?


> > BTW: How did you collect them? The following ways come to my mind:
> >
> > + git changelog:
> 
> Yup, just this. I see it once or sometimes more each day. And picking 
> out interesting stuff goes fast after some practising ;-)

Cool. Thanks a lot for working on it.


Best Regards,
Petr

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


Re: [PUSHED 3-5] Allow keyword Append to be used as a variable. bnc#745930

2012-05-11 Thread Miklos Vajna
On Fri, May 11, 2012 at 12:47:08PM +0100, Noel Power  wrote:
> please see 
> http://cgit.freedesktop.org/libreoffice/core/commit/?id=634b211632847dcb04b31f478296e5e6d732ac73
> hopefully ripe for cherry-picking

Makes sense, pushed.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - basic/source

2012-05-11 Thread Miklos Vajna
 basic/source/comp/io.cxx  |2 ++
 basic/source/comp/scanner.cxx |5 +++--
 basic/source/comp/token.cxx   |9 +
 basic/source/inc/scanner.hxx  |1 +
 4 files changed, 15 insertions(+), 2 deletions(-)

New commits:
commit cf4410701e76cda3bf70032a5f1ac60c1ae9b261
Author: Noel Power 
Date:   Tue Feb 21 12:22:32 2012 +

allow keyword Append to be used as a variable. bnc#745930

statements like
  Dim AppEnd As Integer
will generate compiler errors because Append is a special symbol/keyword in 
libreoffice basic. This restriction though is too strict because 'Append' is 
only such a keyword when used within the 'Open' statement ( where it refers to 
one of the possible values for a paramater ).
(cherry picked from commit 634b211632847dcb04b31f478296e5e6d732ac73)

Signed-off-by: Miklos Vajna 

diff --git a/basic/source/comp/io.cxx b/basic/source/comp/io.cxx
index 038f200..f1c865e 100644
--- a/basic/source/comp/io.cxx
+++ b/basic/source/comp/io.cxx
@@ -181,6 +181,7 @@ void SbiParser::Input()
 
 void SbiParser::Open()
 {
+bInStatement = true;
 SbiExpression aFileName( this );
 SbiToken eTok;
 TestToken( FOR );
@@ -277,6 +278,7 @@ void SbiParser::Open()
 aGen.Gen( _OPEN, nMode, nFlags );
 delete pLen;
 delete pChan;
+bInStatement = false;
 }
 
 // NAME file AS file
diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx
index e1a5c75..4e1c4b1 100644
--- a/basic/source/comp/scanner.cxx
+++ b/basic/source/comp/scanner.cxx
@@ -55,9 +55,10 @@ SbiScanner::SbiScanner( const ::rtl::OUString& rBuf, 
StarBASIC* p ) : aBuf( rBuf
 bUsedForHilite =
 bCompatible =
 bVBASupportOn =
-bPrevLineExtentsComment = sal_False;
+bInStatement =
+bPrevLineExtentsComment = false;
 bHash=
-bErrors  = sal_True;
+bErrors  = true;
 }
 
 SbiScanner::~SbiScanner()
diff --git a/basic/source/comp/token.cxx b/basic/source/comp/token.cxx
index f8cc89a..657cd29 100644
--- a/basic/source/comp/token.cxx
+++ b/basic/source/comp/token.cxx
@@ -401,6 +401,15 @@ special:
 return eCurTok = SYMBOL;
 else if( tp->t == TEXT )
 return eCurTok = SYMBOL;
+// maybe we can expand this for other statements that have parameters
+// that are keywords ( and those keywords are only used within such
+// statements )
+// what's happening here is that if we come across 'append' ( and we are
+// not in the middle of parsing a special statement ( like 'Open')
+// we just treat keyword 'append' as a normal 'SYMBOL'.
+// Also we accept Dim APPEND
+else if ( ( !bInStatement || eCurTok == DIM ) && tp->t == APPEND )
+return eCurTok = SYMBOL;
 
 // #i92642: Special LINE token handling -> SbiParser::Line()
 
diff --git a/basic/source/inc/scanner.hxx b/basic/source/inc/scanner.hxx
index 1bb554b..cd19cbf 100644
--- a/basic/source/inc/scanner.hxx
+++ b/basic/source/inc/scanner.hxx
@@ -74,6 +74,7 @@ protected:
 bool   bVBASupportOn;   // sal_True: OPTION VBASupport 1 
otherwise default False
 bool   bPrevLineExtentsComment; // sal_True: Previous line is comment 
and ends on "... _"
 
+bool   bInStatement;
 void   GenError( SbError );
 public:
 SbiScanner( const ::rtl::OUString&, StarBASIC* = NULL );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: icu/icu4c-macosx.patch

2012-05-11 Thread Caolán McNamara
 icu/icu4c-macosx.patch |   25 +++--
 1 file changed, 15 insertions(+), 10 deletions(-)

New commits:
commit bdbd8d8084d257cb2cb42ad9ba8e14c03a53a28d
Author: Caolán McNamara 
Date:   Fri May 11 13:24:41 2012 +0100

bodge MacOSX harder

Change-Id: If5a3afa4fea10e95cc52a7411f91ee86bea2b54c

diff --git a/icu/icu4c-macosx.patch b/icu/icu4c-macosx.patch
index d685a5f..0de6ac3 100644
--- a/icu/icu4c-macosx.patch
+++ b/icu/icu4c-macosx.patch
@@ -1,14 +1,19 @@
 --- misc/icu/source/common/putil.cpp
 +++ misc/build/icu/source/common/putil.cpp
-@@ -975,6 +975,11 @@
- return result;
- }
- #endif
-+
+@@ -1080,8 +1080,16 @@
+ static const time_t decemberSolstice=1198332540; /*2007-12-22 06:09 
UT*/
+ 
+ /* This probing will tell us when daylight savings occurs.  */
 +#if U_PLATFORM_IS_DARWIN_BASED
-+extern struct tm *localtime_r(const time_t *, struct tm *);
++struct tm *tmp;
++tmp = localtime(&juneSolstice);
++juneSol = *tmp;
++tmp = localtime(&decemberSolstice);
++decemberSol = *tmp;
++#else
+ localtime_r(&juneSolstice, &juneSol);
+ localtime_r(&decemberSolstice, &decemberSol);
 +#endif
-+
- U_CAPI const char* U_EXPORT2
- uprv_tzname(int n)
- {
+ if(decemberSol.tm_isdst > 0) {
+   daylightType = U_DAYLIGHT_DECEMBER;
+ } else if(juneSol.tm_isdst > 0) {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: failed unit test: sal_osl_file

2012-05-11 Thread Stephan Bergmann

On 05/09/2012 11:17 PM, Terrence Enger wrote:

I am trying to build master commit id 5c2c0e3, pulled 2012-05-08, on
ubuntu-natty (11.04), and it is failing in unit test sal_osl_file.


I saw this exact same strange error with the 
Linux-RHEL6-x86_64@14-with-check tinderbox recently, and assume it is 
related to the GCC version used on that machine (RHEL 6 GCC 4.4.6) in 
combination with the recent clean-up of how configure options affect the 
-O level (switching a --enable-dbgutil build from -O0 to -O2, 
potentially uncovering optimization-related issues).  I worked around it 
by adding --enable-debug (so I'm back at -O0).


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


Licensing my contributions

2012-05-11 Thread surensp...@gmail.com
All of my past & future contributions to LibreOffice may be licensed under
the MPL/LGPLv3+ dual license.

Cheers,
Suren.

-- 
Cheers,
~Suren.

Co-Founder, Goyaka Labs
http://suren.in
http://twitter.com/suren
skype: pingsuren
Ph: 9742077760
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] .: sw/source

2012-05-11 Thread Philipp Weissenbacher
 sw/source/core/text/frmform.cxx |  322 +++-
 1 file changed, 154 insertions(+), 168 deletions(-)

New commits:
commit 8c60833c26c02a28d98e79cccb41aff009b38fc2
Author: Philipp Weissenbacher 
Date:   Fri May 11 13:54:59 2012 +0200

Translate German comments

diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx
index b3a40b1..9931412 100644
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
@@ -537,11 +537,12 @@ void SwTxtFrm::AdjustFrm( const SwTwips nChgHght, 
sal_Bool bHasToFit )
  *  SwTxtFrm::AdjustFollow()
  */
 
-/* AdjustFollow erwartet folgende Situation:
- * Der SwTxtIter steht am unteren Ende des Masters, der Offset wird
- * im Follow eingestellt.
- * nOffset haelt den Offset im Textstring, ab dem der Master abschliesst
- * und der Follow beginnt. Wenn er 0 ist, wird der FolgeFrame geloescht.
+/* AdjustFollow expects the following situtation:
+ * The SwTxtIter points to the lower end of the Master, the Offset is set in
+ * the Follow.
+ * nOffset holds the Offset in the text string, from which the Master closes
+ * and the Follow starts.
+ * If it's 0, the FollowFrame is deleted.
  */
 
 void SwTxtFrm::_AdjustFollow( SwTxtFormatter &rLine,
@@ -550,8 +551,8 @@ void SwTxtFrm::_AdjustFollow( SwTxtFormatter &rLine,
 {
 SwFrmSwapper aSwapper( this, sal_False );
 
-// Wir haben den Rest der Textmasse: alle Follows loeschen
-// Sonderfall sind DummyPortions()
+// We got the rest of the text mass: Delete all Follows
+// DummyPortions() are a special caseSonderfall
 // - special cases are controlled by parameter .
 if( HasFollow() && !(nMode & 1) && nOffset == nEnd )
 {
@@ -559,7 +560,7 @@ void SwTxtFrm::_AdjustFollow( SwTxtFormatter &rLine,
 {
 if( ((SwTxtFrm*)GetFollow())->IsLocked() )
 {
-OSL_FAIL( "+SwTxtFrm::JoinFrm: Follow ist locked." );
+OSL_FAIL( "+SwTxtFrm::JoinFrm: Follow is locked." );
 return;
 }
 JoinFrm();
@@ -568,16 +569,16 @@ void SwTxtFrm::_AdjustFollow( SwTxtFormatter &rLine,
 return;
 }
 
-// Tanz auf dem Vulkan: Wir formatieren eben schnell noch einmal
-// die letzte Zeile fuer das QuoVadis-Geraffel. Selbstverstaendlich
-// kann sich dadurch auch der Offset verschieben:
+// Dancing on the vulcano: We'll just format the last line quickly
+// for the QuoVadis stuff.
+// The Offset can move of course:
 const xub_StrLen nNewOfst = ( IsInFtn() && ( !GetIndNext() || HasFollow() 
) ) ?
 rLine.FormatQuoVadis(nOffset) : nOffset;
 
 if( !(nMode & 1) )
 {
-// Wir klauen unseren Follows Textmasse, dabei kann es passieren,
-// dass wir einige Follows Joinen muessen.
+// We steal text mass from our Follows
+// It can happen that we have to join some of them
 while( GetFollow() && GetFollow()->GetFollow() &&
nNewOfst >= GetFollow()->GetFollow()->GetOfst() )
 {
@@ -585,7 +586,7 @@ void SwTxtFrm::_AdjustFollow( SwTxtFormatter &rLine,
 }
 }
 
-// Der Ofst hat sich verschoben.
+// The Offset moved
 if( GetFollow() )
 {
 #if OSL_DEBUG_LEVEL > 1
@@ -595,7 +596,7 @@ void SwTxtFrm::_AdjustFollow( SwTxtFormatter &rLine,
 if ( nMode )
 GetFollow()->ManipOfst( 0 );
 
-if ( CalcFollow( nNewOfst ) )   // CalcFollow erst zum Schluss, dort 
erfolgt ein SetOfst
+if ( CalcFollow( nNewOfst ) )   // CalcFollow only at the end, we do a 
SetOfst there
 rLine.SetOnceMore( sal_True );
 }
 }
@@ -611,8 +612,7 @@ SwCntntFrm *SwTxtFrm::JoinFrm()
 
 SwTxtFrm *pNxt = pFoll->GetFollow();
 
-// Alle Fussnoten des zu zerstoerenden Follows werden auf uns
-// umgehaengt.
+// All footnotes of the to-be-destroyed Follow are reloacted to us
 xub_StrLen nStart = pFoll->GetOfst();
 if ( pFoll->HasFtn() )
 {
@@ -684,8 +684,8 @@ SwCntntFrm *SwTxtFrm::SplitFrm( const xub_StrLen nTxtPos )
 {
 SWAP_IF_SWAPPED( this )
 
-// Durch das Paste wird ein Modify() an mich verschickt.
-// Damit meine Daten nicht verschwinden, locke ich mich.
+// The Paste sends a Modify() to me
+// I lock myself, so that my data does not disappear
 SwTxtFrmLocker aLock( this );
 SwTxtFrm *pNew = (SwTxtFrm *)(GetTxtNode()->MakeFrm( this ));
 
@@ -709,8 +709,8 @@ SwCntntFrm *SwTxtFrm::SplitFrm( const xub_StrLen nTxtPos )
 }
 }
 
-// Wenn durch unsere Aktionen Fussnoten in pNew landen,
-// so muessen sie umgemeldet werden.
+// If footnotes end up in pNew bz our actions, we need
+// to reregister them
 if ( HasFtn() )
 {
 const SwpHints *pHints = GetTxtNode()->GetpSwpHints();
@@ -751,7 +751,7 @@ SwCntntFrm *SwTxtFrm::SplitFrm( const xub_StrLen nT

[Libreoffice-commits] .: scp2/source

2012-05-11 Thread Tomáš Chvátal
 scp2/source/ooo/common_brand.scp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8e48af84384fb4f6db0de6f6920b6e9402c212ab
Author: Tomas Chvatal 
Date:   Fri May 11 13:56:37 2012 +0200

Actually distribute the nsplugin even without mozilla.

Change-Id: I8a44a2efc120763a278b9d758580430c20e10a85

diff --git a/scp2/source/ooo/common_brand.scp b/scp2/source/ooo/common_brand.scp
index 38cde79..77915b5 100644
--- a/scp2/source/ooo/common_brand.scp
+++ b/scp2/source/ooo/common_brand.scp
@@ -633,7 +633,7 @@ File gid_Brand_File_Bin_Libxml2
 End
 #endif
 
-#if !defined WITHOUT_MOZILLA && defined ENABLE_NSPLUGIN
+#if defined ENABLE_NSPLUGIN
 File gid_Brand_File_Lib_Npsoplugin
 BIN_FILE_BODY;
 Name = SPECIAL_NAME(npsoplugin);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[REVIEW 3-5] Allow keyword Append to be used as a variable. bnc#745930

2012-05-11 Thread Noel Power
please see 
http://cgit.freedesktop.org/libreoffice/core/commit/?id=634b211632847dcb04b31f478296e5e6d732ac73 
hopefully ripe for cherry-picking


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


[REVIEW 3-5] fdo#46889 ( handle unmatched End Sub/Function ) statements in imported vba

2012-05-11 Thread Noel Power
attached is a backport of 
master:24b402d67eb9acc7ff1f0afeee7237f6b3b14644 & 
master:1bd695d3ddcbce48899a70130b5e948c48541d17 squashed. Be good to get 
into 3-5


Noel
>From fbc9ac13bd2fb16b9851363a641d534fe1677432 Mon Sep 17 00:00:00 2001
From: Noel Power 
Date: Fri, 2 Mar 2012 13:04:18 +
Subject: [PATCH] weed out unmatched Sub/End Sub statements when importing VBA 
fdo#46889

fix mishandling of 'End Sub' is there is a trailing comment fod#46889
---
 oox/source/ole/vbamodule.cxx |   48 ++
 1 files changed, 48 insertions(+), 0 deletions(-)

diff --git a/oox/source/ole/vbamodule.cxx b/oox/source/ole/vbamodule.cxx
index daeb70d..6a6bacc 100644
--- a/oox/source/ole/vbamodule.cxx
+++ b/oox/source/ole/vbamodule.cxx
@@ -221,6 +221,7 @@ void VbaModule::createEmptyModule( const Reference< 
XNameContainer >& rxBasicLib
 OUString VbaModule::readSourceCode( StorageBase& rVbaStrg, const Reference< 
XNameContainer >& rxOleNameOverrides ) const
 {
 OUStringBuffer aSourceCode;
+const static rtl::OUString sUnmatchedRemovedTag( 
RTL_CONSTASCII_USTRINGPARAM( "Rem removed unmatched Sub/End: " ) );
 if( (maStreamName.getLength() > 0) && (mnOffset != SAL_MAX_UINT32) )
 {
 BinaryXInputStream aInStrm( rVbaStrg.openInputStream( maStreamName ), 
true );
@@ -234,6 +235,14 @@ OUString VbaModule::readSourceCode( StorageBase& rVbaStrg, 
const Reference< XNam
 VbaInputStream aVbaStrm( aInStrm );
 // load the source code line-by-line, with some more processing
 TextInputStream aVbaTextStrm( mxContext, aVbaStrm, meTextEnc );
+
+struct ProcedurePair
+{
+bool bInProcedure;
+sal_uInt32 nPos;
+ProcedurePair() : bInProcedure( false ), nPos( 0 ) {};
+} procInfo;
+
 while( !aVbaTextStrm.isEof() )
 {
 OUString aCodeLine = aVbaTextStrm.readLine();
@@ -275,6 +284,45 @@ OUString VbaModule::readSourceCode( StorageBase& rVbaStrg, 
const Reference< XNam
 }
 else
 {
+// Hack here to weed out any unmatched End Sub / Sub Foo 
statements.
+// The behaviour of the vba ide practically guarantees the 
case and
+// spacing of Sub statement(s). However, indentation can 
be arbitrary hence
+// the trim.
+rtl::OUString trimLine( aCodeLine.trim() );
+if ( mbExecutable && (
+  trimLine.matchAsciiL( RTL_CONSTASCII_STRINGPARAM("Sub ") 
) ||
+  trimLine.matchAsciiL( RTL_CONSTASCII_STRINGPARAM("Public 
Sub ") )  ||
+  trimLine.matchAsciiL( 
RTL_CONSTASCII_STRINGPARAM("Private Sub ") ) ||
+  trimLine.matchAsciiL( RTL_CONSTASCII_STRINGPARAM("Static 
Sub ") ) ) )
+{
+// this should never happen, basic doesn't support 
nested procedures
+// first Sub Foo must be bogus
+if ( procInfo.bInProcedure )
+{
+// comment out the line
+aSourceCode.insert( procInfo.nPos, 
sUnmatchedRemovedTag );
+// mark location of this Sub
+procInfo.nPos = aSourceCode.getLength();
+}
+else
+{
+procInfo.bInProcedure = true;
+procInfo.nPos = aSourceCode.getLength();
+}
+}
+else if ( mbExecutable && aCodeLine.trim().matchAsciiL( 
RTL_CONSTASCII_STRINGPARAM("End Sub")) )
+{
+// un-matched End Sub
+if ( !procInfo.bInProcedure )
+{
+aSourceCode.append( sUnmatchedRemovedTag );
+}
+else
+{
+procInfo.bInProcedure = false;
+procInfo.nPos = 0;
+}
+}
 // normal source code line
 if( !mbExecutable )
 aSourceCode.appendAscii( RTL_CONSTASCII_STRINGPARAM( 
"Rem " ) );
-- 
1.7.3.4

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


  1   2   >