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

2017-08-13 Thread Laurent Balland-Poirier
 sd/source/ui/dlg/copydlg.cxx|   19 +++
 sd/uiconfig/sdraw/ui/copydlg.ui |4 ++--
 2 files changed, 21 insertions(+), 2 deletions(-)

New commits:
commit 0b133fdb67cc56fba46ec355283144e611e8bf83
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Sat Apr 22 01:22:11 2017 +0200

tdf#61561 Increase limitation placement and enlargement

Limit placement to +/- page size
Limit enlargement to - object size/+ page size

Change-Id: I180dc8dfd3ce24e917b9e0893bb640aa9995293b
Reviewed-on: https://gerrit.libreoffice.org/36815
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sd/source/ui/dlg/copydlg.cxx b/sd/source/ui/dlg/copydlg.cxx
index 80209f44ddf1..fc39e1b5 100644
--- a/sd/source/ui/dlg/copydlg.cxx
+++ b/sd/source/ui/dlg/copydlg.cxx
@@ -124,6 +124,25 @@ void CopyDlg::dispose()
  */
 void CopyDlg::Reset()
 {
+// Set Min/Max values
+::tools::Rectangle aRect = mpView->GetAllMarkedRect();
+Size aPageSize = mpView->GetSdrPageView()->GetPage()->GetSize();
+SetMetricValue( *m_pMtrFldMoveX, Fraction(100L) / maUIScale, 
MapUnit::Map100thMM);
+double fScaleFactor = m_pMtrFldMoveX->GetValue()/100.0;
+
+long nPageWidth  = aPageSize.Width()  * fScaleFactor;
+long nPageHeight = aPageSize.Height() * fScaleFactor;
+long nRectWidth  = aRect.GetWidth()   * fScaleFactor;
+long nRectHeight = aRect.GetHeight()  * fScaleFactor;
+m_pMtrFldMoveX->SetMin( -nPageWidth );
+m_pMtrFldMoveX->SetMax(  nPageWidth );
+m_pMtrFldMoveY->SetMin( -nPageHeight );
+m_pMtrFldMoveY->SetMax(  nPageHeight );
+m_pMtrFldWidth->SetMin( -nRectWidth );
+m_pMtrFldWidth->SetMax(  nPageWidth );
+m_pMtrFldHeight->SetMin( -nRectHeight );
+m_pMtrFldHeight->SetMax(  nPageHeight );
+
 const SfxPoolItem* pPoolItem = nullptr;
 OUString aStr( GetExtraData() );
 
diff --git a/sd/uiconfig/sdraw/ui/copydlg.ui b/sd/uiconfig/sdraw/ui/copydlg.ui
index 87baa25e17ae..8ba01c9f8aa3 100644
--- a/sd/uiconfig/sdraw/ui/copydlg.ui
+++ b/sd/uiconfig/sdraw/ui/copydlg.ui
@@ -16,8 +16,8 @@
 10
   
   
--120
-120
+-100
+100
 0.10001
 1
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-05-26 Thread Laurent Balland-Poirier
 extras/source/templates/presnt/Alizarin.otp |binary
 extras/source/templates/presnt/BrightBlue.otp   |binary
 extras/source/templates/presnt/DNA.otp  |binary
 extras/source/templates/presnt/Focus.otp|binary
 extras/source/templates/presnt/Impress.otp  |binary
 extras/source/templates/presnt/Inspiration.otp  |binary
 extras/source/templates/presnt/LushGreen.otp|binary
 extras/source/templates/presnt/Metropolis.otp   |binary
 extras/source/templates/presnt/Midnightblue.otp |binary
 extras/source/templates/presnt/Pencil.otp   |binary
 extras/source/templates/presnt/Sunset.otp   |binary
 extras/source/templates/presnt/Vintage.otp  |binary
 extras/source/templates/presnt/Vivid.otp|binary
 13 files changed

New commits:
commit 49efc2d00a674e4fa16aa10c19cafbb10e1573ef
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Fri Apr 21 21:22:28 2017 +0200

tdf#107045 Change preview image in templates

thumbnail.png was modified in XML code for each Impress
template. Localized text was replaced with Lorem Ipsum
text

Change-Id: I67fbf9b957630a75227d1b595d9bdc4298ef791c
Reviewed-on: https://gerrit.libreoffice.org/36805
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>
(cherry picked from commit 5c16d16ed3db32f922b2aeaad49592d2615c7e2c)
Reviewed-on: https://gerrit.libreoffice.org/38087
Tested-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

diff --git a/extras/source/templates/presnt/Alizarin.otp 
b/extras/source/templates/presnt/Alizarin.otp
index 8a8252d5a0f0..7688482936f1 100644
Binary files a/extras/source/templates/presnt/Alizarin.otp and 
b/extras/source/templates/presnt/Alizarin.otp differ
diff --git a/extras/source/templates/presnt/BrightBlue.otp 
b/extras/source/templates/presnt/BrightBlue.otp
index f9f7a4536407..f1d187d26368 100644
Binary files a/extras/source/templates/presnt/BrightBlue.otp and 
b/extras/source/templates/presnt/BrightBlue.otp differ
diff --git a/extras/source/templates/presnt/DNA.otp 
b/extras/source/templates/presnt/DNA.otp
index 7640e9e1c2a2..212b6ae095e3 100644
Binary files a/extras/source/templates/presnt/DNA.otp and 
b/extras/source/templates/presnt/DNA.otp differ
diff --git a/extras/source/templates/presnt/Focus.otp 
b/extras/source/templates/presnt/Focus.otp
index d99618e841f8..953b6aa04180 100644
Binary files a/extras/source/templates/presnt/Focus.otp and 
b/extras/source/templates/presnt/Focus.otp differ
diff --git a/extras/source/templates/presnt/Impress.otp 
b/extras/source/templates/presnt/Impress.otp
index 9a33dcb7627c..ccd527332673 100644
Binary files a/extras/source/templates/presnt/Impress.otp and 
b/extras/source/templates/presnt/Impress.otp differ
diff --git a/extras/source/templates/presnt/Inspiration.otp 
b/extras/source/templates/presnt/Inspiration.otp
index 18ec2148c61a..9e16fad83519 100644
Binary files a/extras/source/templates/presnt/Inspiration.otp and 
b/extras/source/templates/presnt/Inspiration.otp differ
diff --git a/extras/source/templates/presnt/LushGreen.otp 
b/extras/source/templates/presnt/LushGreen.otp
index e2d6638e97dd..c56786ab4dbb 100644
Binary files a/extras/source/templates/presnt/LushGreen.otp and 
b/extras/source/templates/presnt/LushGreen.otp differ
diff --git a/extras/source/templates/presnt/Metropolis.otp 
b/extras/source/templates/presnt/Metropolis.otp
index f176ad79e9e9..93497a23c925 100644
Binary files a/extras/source/templates/presnt/Metropolis.otp and 
b/extras/source/templates/presnt/Metropolis.otp differ
diff --git a/extras/source/templates/presnt/Midnightblue.otp 
b/extras/source/templates/presnt/Midnightblue.otp
index 962bafa3f6f6..ca47b531002a 100644
Binary files a/extras/source/templates/presnt/Midnightblue.otp and 
b/extras/source/templates/presnt/Midnightblue.otp differ
diff --git a/extras/source/templates/presnt/Pencil.otp 
b/extras/source/templates/presnt/Pencil.otp
index fa12e50deaa5..fd870d0c057b 100644
Binary files a/extras/source/templates/presnt/Pencil.otp and 
b/extras/source/templates/presnt/Pencil.otp differ
diff --git a/extras/source/templates/presnt/Sunset.otp 
b/extras/source/templates/presnt/Sunset.otp
index b3d7b54077b6..381cdda6d8b8 100644
Binary files a/extras/source/templates/presnt/Sunset.otp and 
b/extras/source/templates/presnt/Sunset.otp differ
diff --git a/extras/source/templates/presnt/Vintage.otp 
b/extras/source/templates/presnt/Vintage.otp
index 7dbc4d4c9240..5230fbd3646e 100644
Binary files a/extras/source/templates/presnt/Vintage.otp and 
b/extras/source/templates/presnt/Vintage.otp differ
diff --git a/extras/source/templates/presnt/Vivid.otp 
b/extras/source/templates/presnt/Vivid.otp
index 5241ef42a983..a52c926414d1 100644
Binary files a/extras/source/templates/presnt/Vivid.otp and 
b/extras/source/templates/presnt/Vivid.otp differ
___
Libreoffice-commits maili

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

2017-05-26 Thread Laurent Balland-Poirier
 extras/source/templates/presnt/Alizarin.otp |binary
 extras/source/templates/presnt/BrightBlue.otp   |binary
 extras/source/templates/presnt/DNA.otp  |binary
 extras/source/templates/presnt/Focus.otp|binary
 extras/source/templates/presnt/Impress.otp  |binary
 extras/source/templates/presnt/Inspiration.otp  |binary
 extras/source/templates/presnt/LushGreen.otp|binary
 extras/source/templates/presnt/Metropolis.otp   |binary
 extras/source/templates/presnt/Midnightblue.otp |binary
 extras/source/templates/presnt/Pencil.otp   |binary
 extras/source/templates/presnt/Sunset.otp   |binary
 extras/source/templates/presnt/Vintage.otp  |binary
 extras/source/templates/presnt/Vivid.otp|binary
 13 files changed

New commits:
commit 5c16d16ed3db32f922b2aeaad49592d2615c7e2c
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Fri Apr 21 21:22:28 2017 +0200

tdf#107045 Change preview image in templates

thumbnail.png was modified in XML code for each Impress
template. Localized text was replaced with Lorem Ipsum
text

Change-Id: I67fbf9b957630a75227d1b595d9bdc4298ef791c
Reviewed-on: https://gerrit.libreoffice.org/36805
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

diff --git a/extras/source/templates/presnt/Alizarin.otp 
b/extras/source/templates/presnt/Alizarin.otp
index 8a8252d5a0f0..7688482936f1 100644
Binary files a/extras/source/templates/presnt/Alizarin.otp and 
b/extras/source/templates/presnt/Alizarin.otp differ
diff --git a/extras/source/templates/presnt/BrightBlue.otp 
b/extras/source/templates/presnt/BrightBlue.otp
index f9f7a4536407..f1d187d26368 100644
Binary files a/extras/source/templates/presnt/BrightBlue.otp and 
b/extras/source/templates/presnt/BrightBlue.otp differ
diff --git a/extras/source/templates/presnt/DNA.otp 
b/extras/source/templates/presnt/DNA.otp
index 7640e9e1c2a2..212b6ae095e3 100644
Binary files a/extras/source/templates/presnt/DNA.otp and 
b/extras/source/templates/presnt/DNA.otp differ
diff --git a/extras/source/templates/presnt/Focus.otp 
b/extras/source/templates/presnt/Focus.otp
index d99618e841f8..953b6aa04180 100644
Binary files a/extras/source/templates/presnt/Focus.otp and 
b/extras/source/templates/presnt/Focus.otp differ
diff --git a/extras/source/templates/presnt/Impress.otp 
b/extras/source/templates/presnt/Impress.otp
index 9a33dcb7627c..ccd527332673 100644
Binary files a/extras/source/templates/presnt/Impress.otp and 
b/extras/source/templates/presnt/Impress.otp differ
diff --git a/extras/source/templates/presnt/Inspiration.otp 
b/extras/source/templates/presnt/Inspiration.otp
index 18ec2148c61a..9e16fad83519 100644
Binary files a/extras/source/templates/presnt/Inspiration.otp and 
b/extras/source/templates/presnt/Inspiration.otp differ
diff --git a/extras/source/templates/presnt/LushGreen.otp 
b/extras/source/templates/presnt/LushGreen.otp
index e2d6638e97dd..c56786ab4dbb 100644
Binary files a/extras/source/templates/presnt/LushGreen.otp and 
b/extras/source/templates/presnt/LushGreen.otp differ
diff --git a/extras/source/templates/presnt/Metropolis.otp 
b/extras/source/templates/presnt/Metropolis.otp
index f176ad79e9e9..93497a23c925 100644
Binary files a/extras/source/templates/presnt/Metropolis.otp and 
b/extras/source/templates/presnt/Metropolis.otp differ
diff --git a/extras/source/templates/presnt/Midnightblue.otp 
b/extras/source/templates/presnt/Midnightblue.otp
index 962bafa3f6f6..ca47b531002a 100644
Binary files a/extras/source/templates/presnt/Midnightblue.otp and 
b/extras/source/templates/presnt/Midnightblue.otp differ
diff --git a/extras/source/templates/presnt/Pencil.otp 
b/extras/source/templates/presnt/Pencil.otp
index fa12e50deaa5..fd870d0c057b 100644
Binary files a/extras/source/templates/presnt/Pencil.otp and 
b/extras/source/templates/presnt/Pencil.otp differ
diff --git a/extras/source/templates/presnt/Sunset.otp 
b/extras/source/templates/presnt/Sunset.otp
index b3d7b54077b6..381cdda6d8b8 100644
Binary files a/extras/source/templates/presnt/Sunset.otp and 
b/extras/source/templates/presnt/Sunset.otp differ
diff --git a/extras/source/templates/presnt/Vintage.otp 
b/extras/source/templates/presnt/Vintage.otp
index 7dbc4d4c9240..5230fbd3646e 100644
Binary files a/extras/source/templates/presnt/Vintage.otp and 
b/extras/source/templates/presnt/Vintage.otp differ
diff --git a/extras/source/templates/presnt/Vivid.otp 
b/extras/source/templates/presnt/Vivid.otp
index 5241ef42a983..a52c926414d1 100644
Binary files a/extras/source/templates/presnt/Vivid.otp and 
b/extras/source/templates/presnt/Vivid.otp differ
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-05-20 Thread Laurent Balland-Poirier
 sd/source/ui/dlg/copydlg.cxx |   25 +
 1 file changed, 25 insertions(+)

New commits:
commit 25d7103f99c51ccad0ccfc56a4457f0b7db6853e
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Thu Apr 20 22:38:25 2017 +0200

tdf#104423 Restore saving of Duplicate dlg parameters

Saving of parameters in Duplicate dlg was removed by
ce82146a6be87b239a0bde0b59fddf8865290b99

Change-Id: Id7aaf0734132e3d2a5bd4f11f3a5a7abeaf64911
Reviewed-on: https://gerrit.libreoffice.org/36755
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Katarina Behrens <katarina.behr...@cib.de>

diff --git a/sd/source/ui/dlg/copydlg.cxx b/sd/source/ui/dlg/copydlg.cxx
index 6c679cd834bc..23f8b92d51cd 100644
--- a/sd/source/ui/dlg/copydlg.cxx
+++ b/sd/source/ui/dlg/copydlg.cxx
@@ -80,6 +80,31 @@ CopyDlg::~CopyDlg()
 
 void CopyDlg::dispose()
 {
+OUString& rStr = GetExtraData();
+
+rStr = OUString::number(m_pNumFldCopies->GetValue());
+rStr += OUString(TOKEN);
+
+rStr += OUString::number(m_pMtrFldMoveX->GetValue());
+rStr += OUString( TOKEN );
+
+rStr += OUString::number(m_pMtrFldMoveY->GetValue());
+rStr += OUString( TOKEN );
+
+rStr += OUString::number(m_pMtrFldAngle->GetValue());
+rStr += OUString( TOKEN );
+
+rStr += OUString::number(m_pMtrFldWidth->GetValue());
+rStr += OUString( TOKEN );
+
+rStr += OUString::number(m_pMtrFldHeight->GetValue());
+rStr += OUString( TOKEN );
+
+rStr += OUString::number( 
m_pLbStartColor->GetSelectEntryColor().GetColor() );
+rStr += OUString( TOKEN );
+
+rStr += OUString::number( m_pLbEndColor->GetSelectEntryColor().GetColor() 
);
+
 m_pNumFldCopies.clear();
 m_pBtnSetViewData.clear();
 m_pMtrFldMoveX.clear();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - helpcontent2

2017-05-19 Thread Laurent Balland-Poirier
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit df5d6abc284ecb13d68beb285145d367b1a71832
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Wed May 17 22:25:57 2017 +0200

Updated core
Project: help  06f78d9927f3d8bd56583fce3181eae19568e3e0

Basic: merge identical def and example Defxxx

Change-Id: I64abb89958c823d636c402ad4fee1f008742b491
Reviewed-on: https://gerrit.libreoffice.org/37789
Reviewed-by: Olivier Hallot <olivier.hal...@edx.srv.br>
Tested-by: Olivier Hallot <olivier.hal...@edx.srv.br>
(cherry picked from commit fc04019be5ce20fe8acd95e1cc41ba099dd51cb0)
Reviewed-on: https://gerrit.libreoffice.org/37828

diff --git a/helpcontent2 b/helpcontent2
index 3cb6c49b5254..06f78d9927f3 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 3cb6c49b52541dd5f0c650d79a201a69415d8054
+Subproject commit 06f78d9927f3d8bd56583fce3181eae19568e3e0
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: Branch 'libreoffice-5-4' - source/text

2017-05-19 Thread Laurent Balland-Poirier
 source/text/sbasic/shared/03101100.xhp |   10 +++---
 source/text/sbasic/shared/03101110.xhp |   27 +--
 source/text/sbasic/shared/03101120.xhp |   24 +++-
 source/text/sbasic/shared/03101130.xhp |   24 +++-
 source/text/sbasic/shared/03101140.xhp |   24 +++-
 source/text/sbasic/shared/03101300.xhp |   24 +++-
 source/text/sbasic/shared/03101400.xhp |   24 +++-
 source/text/sbasic/shared/03101500.xhp |   24 +++-
 source/text/sbasic/shared/03101600.xhp |   24 +++-
 source/text/sbasic/shared/03101700.xhp |   27 +--
 10 files changed, 38 insertions(+), 194 deletions(-)

New commits:
commit 06f78d9927f3d8bd56583fce3181eae19568e3e0
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Wed May 17 22:25:57 2017 +0200

Basic: merge identical def and example Defxxx

Change-Id: I64abb89958c823d636c402ad4fee1f008742b491
Reviewed-on: https://gerrit.libreoffice.org/37789
Reviewed-by: Olivier Hallot <olivier.hal...@edx.srv.br>
Tested-by: Olivier Hallot <olivier.hal...@edx.srv.br>
(cherry picked from commit fc04019be5ce20fe8acd95e1cc41ba099dd51cb0)
Reviewed-on: https://gerrit.libreoffice.org/37828

diff --git a/source/text/sbasic/shared/03101100.xhp 
b/source/text/sbasic/shared/03101100.xhp
index 4559a5ed8..75d19629b 100644
--- a/source/text/sbasic/shared/03101100.xhp
+++ b/source/text/sbasic/shared/03101100.xhp
@@ -27,17 +27,16 @@
 
 
 
-
 
 
   DefBool statement
 
 
-
 DefBool Statement [Runtime]
 If no 
type-declaration character or keyword is specified, the DefBool statement sets 
the default data type for variables, according to a letter range.
 
 
+
 Syntax:
 
 Defxxx 
Characterrange1[, Characterrange2[,...]]
@@ -47,8 +46,10 @@
  
Characterrange: Letters that specify the range of variables that 
you want to set the default data type for.
  
xxx: Keyword that defines the default variable type:
  
Keyword: Default variable type
+
  
DefBool: Boolean
 
+
 Example:
 
 ' Prefix 
definition for variable types:
@@ -59,10 +60,13 @@
 DefLng l
 DefObj o
 DefVar v
+
+
+
 Sub ExampleDefBool
 bOK=TRUE ' 
bOK is an implicit boolean variable
 End Sub
 
 
 
-
\ No newline at end of file
+
diff --git a/source/text/sbasic/shared/03101110.xhp 
b/source/text/sbasic/shared/03101110.xhp
index 71248ee41..184787d8a 100644
--- a/source/text/sbasic/shared/03101110.xhp
+++ b/source/text/sbasic/shared/03101110.xhp
@@ -35,34 +35,17 @@
 DefCur Statement 
[Runtime]
 If no 
type-declaration character or keyword is specified, the DefCur statement sets 
the default variable type, according to a letter range.
 
-Syntax:
-
-Defxxx 
Characterrange1[, Characterrange2[,...]]
-
-Parameters:
-
-Characterrange: Letters that specify the range of variables that 
you want to set a default data type for.
-
-xxx: Keyword that defines the default variable type:
-
-Keyword: Default variable type
+
+
 
 DefCur: Currency
-Example:
+
+
 
-REM Prefix 
definitions for variable types:
-DefBool b
-DefDate t
-DefDbL d
-DefInt i
-DefLng l
-DefObj o
-DefVar v
 DefCur c
 Sub ExampleDefCur
-cCur=Currency 
REM cCur is an implicit currency variable
+cCur=Currency 
' cCur is an implicit currency variable
 End Sub
 
 
 
-
diff --git a/source/text/sbasic/shared/03101120.xhp 
b/source/text/sbasic/shared/03101120.xhp
index fcaf086f8..cc1060d71 100644
--- a/source/text/sbasic/shared/03101120.xhp
+++ b/source/text/sbasic/shared/03101120.xhp
@@ -27,38 +27,20 @@
 
 
 
-
 
 
   DefErr statement
 
 
-
 DefErr Statement 
[Runtime]
 If no 
type-declaration character or keyword is specified, the DefErr statement sets 
the default variable type, according to a letter range.
 
 
-Syntax:
-
-Defxxx 
Characterrange1[, Characterrange2[,...]]
-
-
-Parameters:
- 
Characterrange: Letters that specify the range of variables that 
you want to set a default data type for.
- 
xxx: Keyword that defines the default variable type:
- 
Keyword: Default variable type
+
  
DefErr: Error
 
-Example:
+
 
-' Prefix 
definitions for variable types:
-DefBool b
-DefDate t
-DefDbl d
-DefInt i
-DefLng l
-DefObj o
-DefVar v
 DefErr e
 Sub ExampleDefErr
 eErr=Error ' 
eErr is an implicit error variable
@@ -66,4 +48,4 @@
 
 
 
-
\ No newline at end of file
+
diff --git a/source/text/sbasic/shared/03101130.xhp 
b/source/text/sbasic/shared/03101130.xhp
index 15f52373a..3e8991e8a 100644
--- a/source/text/sbasic/shared/03101130.xhp
+++ b/source/text/sbasic/shared/03101130.xhp
@@ -27,38 +27,20 @@
 
 
 
-
 
 
   DefSng statement
 
 
-
 DefSng Statement 
[Runtime]
 If no 
type-declaration character or keyword is specified, the DefSng statement sets 
the default variable type, according to a letter range.
 
 
-Syntax:
-
-Defxxx 
Characterrange1[, Characterrange2[,...]]
-
-
-Parameters:
- 
Characterrange: Letters that specify the range of variab

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

2017-05-19 Thread Laurent Balland-Poirier
 source/text/sbasic/shared/03101100.xhp |   10 +++---
 source/text/sbasic/shared/03101110.xhp |   27 +--
 source/text/sbasic/shared/03101120.xhp |   24 +++-
 source/text/sbasic/shared/03101130.xhp |   24 +++-
 source/text/sbasic/shared/03101140.xhp |   24 +++-
 source/text/sbasic/shared/03101300.xhp |   24 +++-
 source/text/sbasic/shared/03101400.xhp |   24 +++-
 source/text/sbasic/shared/03101500.xhp |   24 +++-
 source/text/sbasic/shared/03101600.xhp |   24 +++-
 source/text/sbasic/shared/03101700.xhp |   27 +--
 10 files changed, 38 insertions(+), 194 deletions(-)

New commits:
commit fc04019be5ce20fe8acd95e1cc41ba099dd51cb0
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Wed May 17 22:25:57 2017 +0200

Basic: merge identical def and example Defxxx

Change-Id: I64abb89958c823d636c402ad4fee1f008742b491
Reviewed-on: https://gerrit.libreoffice.org/37789
Reviewed-by: Olivier Hallot <olivier.hal...@edx.srv.br>
Tested-by: Olivier Hallot <olivier.hal...@edx.srv.br>

diff --git a/source/text/sbasic/shared/03101100.xhp 
b/source/text/sbasic/shared/03101100.xhp
index 4559a5ed8..75d19629b 100644
--- a/source/text/sbasic/shared/03101100.xhp
+++ b/source/text/sbasic/shared/03101100.xhp
@@ -27,17 +27,16 @@
 
 
 
-
 
 
   DefBool statement
 
 
-
 DefBool Statement [Runtime]
 If no 
type-declaration character or keyword is specified, the DefBool statement sets 
the default data type for variables, according to a letter range.
 
 
+
 Syntax:
 
 Defxxx 
Characterrange1[, Characterrange2[,...]]
@@ -47,8 +46,10 @@
  
Characterrange: Letters that specify the range of variables that 
you want to set the default data type for.
  
xxx: Keyword that defines the default variable type:
  
Keyword: Default variable type
+
  
DefBool: Boolean
 
+
 Example:
 
 ' Prefix 
definition for variable types:
@@ -59,10 +60,13 @@
 DefLng l
 DefObj o
 DefVar v
+
+
+
 Sub ExampleDefBool
 bOK=TRUE ' 
bOK is an implicit boolean variable
 End Sub
 
 
 
-
\ No newline at end of file
+
diff --git a/source/text/sbasic/shared/03101110.xhp 
b/source/text/sbasic/shared/03101110.xhp
index 71248ee41..184787d8a 100644
--- a/source/text/sbasic/shared/03101110.xhp
+++ b/source/text/sbasic/shared/03101110.xhp
@@ -35,34 +35,17 @@
 DefCur Statement 
[Runtime]
 If no 
type-declaration character or keyword is specified, the DefCur statement sets 
the default variable type, according to a letter range.
 
-Syntax:
-
-Defxxx 
Characterrange1[, Characterrange2[,...]]
-
-Parameters:
-
-Characterrange: Letters that specify the range of variables that 
you want to set a default data type for.
-
-xxx: Keyword that defines the default variable type:
-
-Keyword: Default variable type
+
+
 
 DefCur: Currency
-Example:
+
+
 
-REM Prefix 
definitions for variable types:
-DefBool b
-DefDate t
-DefDbL d
-DefInt i
-DefLng l
-DefObj o
-DefVar v
 DefCur c
 Sub ExampleDefCur
-cCur=Currency 
REM cCur is an implicit currency variable
+cCur=Currency 
' cCur is an implicit currency variable
 End Sub
 
 
 
-
diff --git a/source/text/sbasic/shared/03101120.xhp 
b/source/text/sbasic/shared/03101120.xhp
index fcaf086f8..cc1060d71 100644
--- a/source/text/sbasic/shared/03101120.xhp
+++ b/source/text/sbasic/shared/03101120.xhp
@@ -27,38 +27,20 @@
 
 
 
-
 
 
   DefErr statement
 
 
-
 DefErr Statement 
[Runtime]
 If no 
type-declaration character or keyword is specified, the DefErr statement sets 
the default variable type, according to a letter range.
 
 
-Syntax:
-
-Defxxx 
Characterrange1[, Characterrange2[,...]]
-
-
-Parameters:
- 
Characterrange: Letters that specify the range of variables that 
you want to set a default data type for.
- 
xxx: Keyword that defines the default variable type:
- 
Keyword: Default variable type
+
  
DefErr: Error
 
-Example:
+
 
-' Prefix 
definitions for variable types:
-DefBool b
-DefDate t
-DefDbl d
-DefInt i
-DefLng l
-DefObj o
-DefVar v
 DefErr e
 Sub ExampleDefErr
 eErr=Error ' 
eErr is an implicit error variable
@@ -66,4 +48,4 @@
 
 
 
-
\ No newline at end of file
+
diff --git a/source/text/sbasic/shared/03101130.xhp 
b/source/text/sbasic/shared/03101130.xhp
index 15f52373a..3e8991e8a 100644
--- a/source/text/sbasic/shared/03101130.xhp
+++ b/source/text/sbasic/shared/03101130.xhp
@@ -27,38 +27,20 @@
 
 
 
-
 
 
   DefSng statement
 
 
-
 DefSng Statement 
[Runtime]
 If no 
type-declaration character or keyword is specified, the DefSng statement sets 
the default variable type, according to a letter range.
 
 
-Syntax:
-
-Defxxx 
Characterrange1[, Characterrange2[,...]]
-
-
-Parameters:
- 
Characterrange: Letters that specify the range of variables that 
you want to set a default data type for.
- 
xxx: Keyword that defines the default variable type:
- 
Keyword: Def

[Libreoffice-commits] core.git: helpcontent2

2017-05-19 Thread Laurent Balland-Poirier
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d3cad5aa238f44d2aad93cccbfe4492e7a871669
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Wed May 17 22:25:57 2017 +0200

Updated core
Project: help  fc04019be5ce20fe8acd95e1cc41ba099dd51cb0

Basic: merge identical def and example Defxxx

Change-Id: I64abb89958c823d636c402ad4fee1f008742b491
Reviewed-on: https://gerrit.libreoffice.org/37789
Reviewed-by: Olivier Hallot <olivier.hal...@edx.srv.br>
Tested-by: Olivier Hallot <olivier.hal...@edx.srv.br>

diff --git a/helpcontent2 b/helpcontent2
index 3d5e0e547daa..fc04019be5ce 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 3d5e0e547daaed4c5587d403877a04916cf23eb9
+Subproject commit fc04019be5ce20fe8acd95e1cc41ba099dd51cb0
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - helpcontent2

2017-05-19 Thread Laurent Balland-Poirier
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 810898cbd255c6ebb8860363974c00c27e82ec83
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Tue Jan 17 21:15:13 2017 +0100

Updated core
Project: help  3cb6c49b52541dd5f0c650d79a201a69415d8054

Basic: beautify Examples with bascode tag

Correct many examples to use  tag to get colorised text
Merge some identical examples in section
Remove useless spaces
Remove ^M at end of line with 
Add localize="false" for pure Basic code

Add comments from Johnny_M
Treat 03101700.xhp in a different commit

Change-Id: I94a799ee13829ed9086127aa7d0e722ffe1dd90d
Reviewed-on: https://gerrit.libreoffice.org/33240
Reviewed-by: Olivier Hallot <olivier.hal...@edx.srv.br>
Tested-by: Olivier Hallot <olivier.hal...@edx.srv.br>
(cherry picked from commit 3d5e0e547daaed4c5587d403877a04916cf23eb9)
Reviewed-on: https://gerrit.libreoffice.org/37825

diff --git a/helpcontent2 b/helpcontent2
index 8c185e311871..3cb6c49b5254 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 8c185e311871e4eae877975dedf06444e547f0ec
+Subproject commit 3cb6c49b52541dd5f0c650d79a201a69415d8054
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: Branch 'libreoffice-5-4' - source/text

2017-05-19 Thread Laurent Balland-Poirier
 source/text/sbasic/shared/03030108.xhp |   11 ++-
 source/text/sbasic/shared/03030201.xhp |   17 +
 source/text/sbasic/shared/03030202.xhp |   17 +
 source/text/sbasic/shared/03090302.xhp |   31 +--
 source/text/sbasic/shared/03100400.xhp |   10 ++
 source/text/sbasic/shared/03100500.xhp |   13 ++---
 source/text/sbasic/shared/03100600.xhp |   13 ++---
 source/text/sbasic/shared/03100700.xhp |4 +---
 source/text/sbasic/shared/03103800.xhp |7 ---
 source/text/sbasic/shared/03103900.xhp |   20 ++--
 source/text/sbasic/shared/03104100.xhp |9 +
 source/text/sbasic/shared/03104200.xhp |   11 ++-
 source/text/sbasic/shared/03104300.xhp |7 ---
 source/text/sbasic/shared/03104400.xhp |7 ---
 source/text/sbasic/shared/03104600.xhp |   23 ---
 source/text/sbasic/shared/03120312.xhp |   17 ++---
 source/text/sbasic/shared/03120313.xhp |   10 ++
 source/text/sbasic/shared/03131500.xhp |7 ---
 source/text/sbasic/shared/03131700.xhp |   15 ---
 source/text/sbasic/shared/03131800.xhp |   23 +--
 source/text/sbasic/shared/03131900.xhp |   16 +---
 source/text/sbasic/shared/03132300.xhp |5 +
 22 files changed, 132 insertions(+), 161 deletions(-)

New commits:
commit 3cb6c49b52541dd5f0c650d79a201a69415d8054
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Tue Jan 17 21:15:13 2017 +0100

Basic: beautify Examples with bascode tag

Correct many examples to use  tag to get colorised text
Merge some identical examples in section
Remove useless spaces
Remove ^M at end of line with 
Add localize="false" for pure Basic code

Add comments from Johnny_M
Treat 03101700.xhp in a different commit

Change-Id: I94a799ee13829ed9086127aa7d0e722ffe1dd90d
Reviewed-on: https://gerrit.libreoffice.org/33240
Reviewed-by: Olivier Hallot <olivier.hal...@edx.srv.br>
Tested-by: Olivier Hallot <olivier.hal...@edx.srv.br>
(cherry picked from commit 3d5e0e547daaed4c5587d403877a04916cf23eb9)
Reviewed-on: https://gerrit.libreoffice.org/37825

diff --git a/source/text/sbasic/shared/03030108.xhp 
b/source/text/sbasic/shared/03030108.xhp
index 3e0a8f884..26313504b 100644
--- a/source/text/sbasic/shared/03030108.xhp
+++ b/source/text/sbasic/shared/03030108.xhp
@@ -1,6 +1,5 @@
 
 
-
 
-   
+
 
 
 
@@ -42,7 +41,7 @@
 
 Syntax:
 
-CDateFromIso(String)
+CDateFromIso(String)
 
 Return 
value:
 Internal date 
number
@@ -52,8 +51,10 @@
 
 
 Example:
-dateval = 
CDateFromIso("20021231")
-dateval = 
CDateFromIso("2002-12-31")
+
+dateval = CDateFromIso("20021231")
+dateval = CDateFromIso("2002-12-31")
+
 return both 
12/31/2002 in the date format of your system
 
 
diff --git a/source/text/sbasic/shared/03030201.xhp 
b/source/text/sbasic/shared/03030201.xhp
index de076c5f6..f5551ae7b 100644
--- a/source/text/sbasic/shared/03030201.xhp
+++ b/source/text/sbasic/shared/03030201.xhp
@@ -1,6 +1,6 @@
 
 
-   
+
 
- 
-   
+
 
   
  Hour Function [Runtime]
@@ -47,9 +46,11 @@
   returns 
the value 12.
   
   
-  Example:
-  Sub 
ExampleHour
-  Print 
"The current hour is "  Hour( Now )
-  End 
Sub
+  Example:
+  
+  Sub 
ExampleHour
+  Print 
"The current hour is "  Hour( Now )
+  End Sub
+  

-
\ No newline at end of file
+
diff --git a/source/text/sbasic/shared/03030202.xhp 
b/source/text/sbasic/shared/03030202.xhp
index 385e6c476..a03a4205b 100644
--- a/source/text/sbasic/shared/03030202.xhp
+++ b/source/text/sbasic/shared/03030202.xhp
@@ -1,6 +1,6 @@
 
 
-   
+
 
- 
-   
+
 
   
  Minute Function [Runtime]
@@ -47,9 +46,11 @@
   returns 
the value 30.
   
   
-  Example:
-  Sub 
ExampleMinute
-  MsgBox 
"The current minute is " Minute(Now) "."
-  end 
sub
+  Example:
+  
+  Sub 
ExampleMinute
+  MsgBox 
"The current minute is " Minute(Now) "."
+  End Sub
+  

-
\ No newline at end of file
+
diff --git a/source/text/sbasic/shared/03090302.xhp 
b/source/text/sbasic/shared/03090302.xhp
index 7fb24ce86..f01205c39 100644
--- a/source/text/sbasic/shared/03090302.xhp
+++ b/source/text/sbasic/shared/03090302.xhp
@@ -1,6 +1,5 @@
 
 
-
 
-   
+
 
 
 
@@ -37,24 +36,20 @@
 Continues 
program execution within a Sub or Function at the procedure line indicated by a 
label.
 
 Syntax:
+see 
Parameters
+Parameters:
 
-see 
Parameters
+Sub/Function
+statement 
block
+ 
Label1
+Label2:
+statement 
block
+Exit Sub
+Label1:
+statement 
block
+GoTo 
Label2
+End Sub/Function
 
-Parameters:
-Sub/

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

2017-05-19 Thread Laurent Balland-Poirier
 source/text/sbasic/shared/03030108.xhp |   11 ++-
 source/text/sbasic/shared/03030201.xhp |   17 +
 source/text/sbasic/shared/03030202.xhp |   17 +
 source/text/sbasic/shared/03090302.xhp |   31 +--
 source/text/sbasic/shared/03100400.xhp |   10 ++
 source/text/sbasic/shared/03100500.xhp |   13 ++---
 source/text/sbasic/shared/03100600.xhp |   13 ++---
 source/text/sbasic/shared/03100700.xhp |4 +---
 source/text/sbasic/shared/03103800.xhp |7 ---
 source/text/sbasic/shared/03103900.xhp |   20 ++--
 source/text/sbasic/shared/03104100.xhp |9 +
 source/text/sbasic/shared/03104200.xhp |   11 ++-
 source/text/sbasic/shared/03104300.xhp |7 ---
 source/text/sbasic/shared/03104400.xhp |7 ---
 source/text/sbasic/shared/03104600.xhp |   23 ---
 source/text/sbasic/shared/03120312.xhp |   17 ++---
 source/text/sbasic/shared/03120313.xhp |   10 ++
 source/text/sbasic/shared/03131500.xhp |7 ---
 source/text/sbasic/shared/03131700.xhp |   15 ---
 source/text/sbasic/shared/03131800.xhp |   23 +--
 source/text/sbasic/shared/03131900.xhp |   16 +---
 source/text/sbasic/shared/03132300.xhp |5 +
 22 files changed, 132 insertions(+), 161 deletions(-)

New commits:
commit 3d5e0e547daaed4c5587d403877a04916cf23eb9
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Tue Jan 17 21:15:13 2017 +0100

Basic: beautify Examples with bascode tag

Correct many examples to use  tag to get colorised text
Merge some identical examples in section
Remove useless spaces
Remove ^M at end of line with 
Add localize="false" for pure Basic code

Add comments from Johnny_M
Treat 03101700.xhp in a different commit

Change-Id: I94a799ee13829ed9086127aa7d0e722ffe1dd90d
Reviewed-on: https://gerrit.libreoffice.org/33240
Reviewed-by: Olivier Hallot <olivier.hal...@edx.srv.br>
Tested-by: Olivier Hallot <olivier.hal...@edx.srv.br>

diff --git a/source/text/sbasic/shared/03030108.xhp 
b/source/text/sbasic/shared/03030108.xhp
index 3e0a8f884..26313504b 100644
--- a/source/text/sbasic/shared/03030108.xhp
+++ b/source/text/sbasic/shared/03030108.xhp
@@ -1,6 +1,5 @@
 
 
-
 
-   
+
 
 
 
@@ -42,7 +41,7 @@
 
 Syntax:
 
-CDateFromIso(String)
+CDateFromIso(String)
 
 Return 
value:
 Internal date 
number
@@ -52,8 +51,10 @@
 
 
 Example:
-dateval = 
CDateFromIso("20021231")
-dateval = 
CDateFromIso("2002-12-31")
+
+dateval = CDateFromIso("20021231")
+dateval = CDateFromIso("2002-12-31")
+
 return both 
12/31/2002 in the date format of your system
 
 
diff --git a/source/text/sbasic/shared/03030201.xhp 
b/source/text/sbasic/shared/03030201.xhp
index de076c5f6..f5551ae7b 100644
--- a/source/text/sbasic/shared/03030201.xhp
+++ b/source/text/sbasic/shared/03030201.xhp
@@ -1,6 +1,6 @@
 
 
-   
+
 
- 
-   
+
 
   
  Hour Function [Runtime]
@@ -47,9 +46,11 @@
   returns 
the value 12.
   
   
-  Example:
-  Sub 
ExampleHour
-  Print 
"The current hour is "  Hour( Now )
-  End 
Sub
+  Example:
+  
+  Sub 
ExampleHour
+  Print 
"The current hour is "  Hour( Now )
+  End Sub
+  

-
\ No newline at end of file
+
diff --git a/source/text/sbasic/shared/03030202.xhp 
b/source/text/sbasic/shared/03030202.xhp
index 385e6c476..a03a4205b 100644
--- a/source/text/sbasic/shared/03030202.xhp
+++ b/source/text/sbasic/shared/03030202.xhp
@@ -1,6 +1,6 @@
 
 
-   
+
 
- 
-   
+
 
   
  Minute Function [Runtime]
@@ -47,9 +46,11 @@
   returns 
the value 30.
   
   
-  Example:
-  Sub 
ExampleMinute
-  MsgBox 
"The current minute is " Minute(Now) "."
-  end 
sub
+  Example:
+  
+  Sub 
ExampleMinute
+  MsgBox 
"The current minute is " Minute(Now) "."
+  End Sub
+  

-
\ No newline at end of file
+
diff --git a/source/text/sbasic/shared/03090302.xhp 
b/source/text/sbasic/shared/03090302.xhp
index 7fb24ce86..f01205c39 100644
--- a/source/text/sbasic/shared/03090302.xhp
+++ b/source/text/sbasic/shared/03090302.xhp
@@ -1,6 +1,5 @@
 
 
-
 
-   
+
 
 
 
@@ -37,24 +36,20 @@
 Continues 
program execution within a Sub or Function at the procedure line indicated by a 
label.
 
 Syntax:
+see 
Parameters
+Parameters:
 
-see 
Parameters
+Sub/Function
+statement 
block
+ 
Label1
+Label2:
+statement 
block
+Exit Sub
+Label1:
+statement 
block
+GoTo 
Label2
+End Sub/Function
 
-Parameters:
-Sub/Function
-statement 
block
- 
Label1
-
-Label2:
-
-statement 
block
-Exit 
Sub
-
-Label1:
-
-statement 
block
-GoTo 
Label2
-E

[Libreoffice-commits] core.git: helpcontent2

2017-05-19 Thread Laurent Balland-Poirier
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 94a4ad0c916b6299cee8982761251575562bf702
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Tue Jan 17 21:15:13 2017 +0100

Updated core
Project: help  3d5e0e547daaed4c5587d403877a04916cf23eb9

Basic: beautify Examples with bascode tag

Correct many examples to use  tag to get colorised text
Merge some identical examples in section
Remove useless spaces
Remove ^M at end of line with 
Add localize="false" for pure Basic code

Add comments from Johnny_M
Treat 03101700.xhp in a different commit

Change-Id: I94a799ee13829ed9086127aa7d0e722ffe1dd90d
Reviewed-on: https://gerrit.libreoffice.org/33240
Reviewed-by: Olivier Hallot <olivier.hal...@edx.srv.br>
Tested-by: Olivier Hallot <olivier.hal...@edx.srv.br>

diff --git a/helpcontent2 b/helpcontent2
index ee2a29423da1..3d5e0e547daa 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit ee2a29423da11c4f61ce4ca2176383d1a631ec84
+Subproject commit 3d5e0e547daaed4c5587d403877a04916cf23eb9
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-05-16 Thread Laurent Balland-Poirier
 source/text/sbasic/guide/sample_code.xhp |2 +-
 source/text/sbasic/shared/03030107.xhp   |2 --
 source/text/sbasic/shared/03030203.xhp   |7 +++
 source/text/sbasic/shared/03030302.xhp   |7 +++
 source/text/sbasic/shared/03030303.xhp   |6 ++
 source/text/sbasic/shared/03050100.xhp   |6 ++
 source/text/sbasic/shared/03050200.xhp   |2 +-
 source/text/sbasic/shared/03080201.xhp   |6 ++
 source/text/sbasic/shared/03090203.xhp   |3 +--
 source/text/sbasic/shared/03090404.xhp   |4 ++--
 source/text/sbasic/shared/03090408.xhp   |6 ++
 source/text/sbasic/shared/03102450.xhp   |3 +--
 source/text/sbasic/shared/03103200.xhp   |6 ++
 source/text/sbasic/shared/03103300.xhp   |6 ++
 source/text/sbasic/shared/03120201.xhp   |6 ++
 source/text/sbasic/shared/03130100.xhp   |2 +-
 source/text/sbasic/shared/03130700.xhp   |6 ++
 source/text/sbasic/shared/03131000.xhp   |6 ++
 source/text/sbasic/shared/03131300.xhp   |6 ++
 source/text/sbasic/shared/03131400.xhp   |6 ++
 source/text/sbasic/shared/03132100.xhp   |2 +-
 source/text/sbasic/shared/03132200.xhp   |6 ++
 22 files changed, 38 insertions(+), 68 deletions(-)

New commits:
commit 1d2c1291f700f729c28a209d2422a8d2f926e347
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Mon Jan 30 23:19:12 2017 +0100

Basic: add localize=false for some bascode lines

Change-Id: I78884c0421ef8ad935ca7214b9116fda29d2797f
update: remove duplicate empty line at end of files
Reviewed-on: https://gerrit.libreoffice.org/33766
Reviewed-by: Olivier Hallot <olivier.hal...@edx.srv.br>
Tested-by: Olivier Hallot <olivier.hal...@edx.srv.br>

diff --git a/source/text/sbasic/guide/sample_code.xhp 
b/source/text/sbasic/guide/sample_code.xhp
index a5141068d..334d88cd0 100644
--- a/source/text/sbasic/guide/sample_code.xhp
+++ b/source/text/sbasic/guide/sample_code.xhp
@@ -94,7 +94,7 @@
 MsgBox oCMD1.Dbg_Properties
 REM execute 
dialog
 oDialog1.Execute()
-End 
Sub
+End Sub
 
 Add an 
Entry to a ListBox
 
diff --git a/source/text/sbasic/shared/03030107.xhp 
b/source/text/sbasic/shared/03030107.xhp
index 31b5db488..4b50b0f65 100644
--- a/source/text/sbasic/shared/03030107.xhp
+++ b/source/text/sbasic/shared/03030107.xhp
@@ -27,13 +27,11 @@
 
 
 
-
 
 
   CdateToIso function
 
 
-
 CDateToIso Function [Runtime]
 Returns the 
date in ISO format without separators (MMDD) from a serial date number that 
is generated by the DateSerial or the DateValue or the CDateFromIso 
function.
 The year part 
consists of at least four digits, with leading zeros if the absolute value is 
less than 1000, it can be negative with a leading minus sign if the date passed 
denotes a year before the common era (BCE) and it can have more than four 
digits if the absolute value is greater than . The formatted string 
returned can be in the range "-327680101" to "327671231".
diff --git a/source/text/sbasic/shared/03030203.xhp 
b/source/text/sbasic/shared/03030203.xhp
index 07bdde963..162ace2eb 100644
--- a/source/text/sbasic/shared/03030203.xhp
+++ b/source/text/sbasic/shared/03030203.xhp
@@ -27,20 +27,18 @@
 
 
 
-
 
 
   Now function
 
 
-
 Now 
Function [Runtime]
 Returns the 
current system date and time as a Date value.
 
 
 Syntax:
 
-Now
+Now
 
 
 Return 
value:
@@ -54,4 +52,5 @@
 
 
 
-
\ No newline at end of file
+
+
diff --git a/source/text/sbasic/shared/03030302.xhp 
b/source/text/sbasic/shared/03030302.xhp
index 410d2acff..92f053cac 100644
--- a/source/text/sbasic/shared/03030302.xhp
+++ b/source/text/sbasic/shared/03030302.xhp
@@ -27,20 +27,18 @@
 
 
 
-
 
 
   Time statement
 
 
-
 Time Statement 
[Runtime]
 This function 
returns the current system time as a string in the format 
"HH:MM:SS".
 
 
 Syntax:
 
-Time
+Time
 
 
 Parameters:
@@ -54,4 +52,5 @@
 
 
 
-
\ No newline at end of file
+
+
diff --git a/source/text/sbasic/shared/03030303.xhp 
b/source/text/sbasic/shared/03030303.xhp
index bf440cf91..e50ce722a 100644
--- a/source/text/sbasic/shared/03030303.xhp
+++ b/source/text/sbasic/shared/03030303.xhp
@@ -27,13 +27,11 @@
 
 
 
-
 
 
   Timer function
 
 
-
 Timer 
Function [Runtime]
 Returns a 
value that specifies the number of seconds that have elapsed since 
midnight.
 
@@ -41,7 +39,7 @@
 
 Syntax:
 
-Timer
+Timer
 
 
 Return 
value:
@@ -62,4 +60,4 @@
 
 
 
-
\ No newline at end of file
+
diff --git a/source/text/sbasic/shared/03050100.xhp 
b/source/text/sbasic/shared/03050100.xhp
index 7ae49da66..19677a7b4 100644
--- a/source/text/sbasic/shared/03050100.xhp
+++ b/source/text/sbasic/shared/03050100.xhp
@@ -27,20 +27,18 @@
 
 
 
-
 
 
   Erl function
 
 
-
 Erl 
Function [Runtime]
 Returns the 
line number where an error occurred during program execution.
 
 
 Syntax:
 
-Erl
+Erl
 
 
 Return 
value:
@@ -67,4 +65,4 @@
 
 
 
-
\ No newline at end 

[Libreoffice-commits] core.git: helpcontent2

2017-05-16 Thread Laurent Balland-Poirier
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 96e145476b8ef1f0cb5299c470df2493ae689f60
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Mon Jan 30 23:19:12 2017 +0100

Updated core
Project: help  1d2c1291f700f729c28a209d2422a8d2f926e347

Basic: add localize=false for some bascode lines

Change-Id: I78884c0421ef8ad935ca7214b9116fda29d2797f
update: remove duplicate empty line at end of files
Reviewed-on: https://gerrit.libreoffice.org/33766
Reviewed-by: Olivier Hallot <olivier.hal...@edx.srv.br>
Tested-by: Olivier Hallot <olivier.hal...@edx.srv.br>

diff --git a/helpcontent2 b/helpcontent2
index c1b5c626539f..1d2c1291f700 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit c1b5c626539f3893c07c11380c5cfe94bc5f8d36
+Subproject commit 1d2c1291f700f729c28a209d2422a8d2f926e347
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-05-16 Thread Laurent Balland-Poirier
 source/text/schart/00/0004.xhp |2 +-
 source/text/schart/01/04050100.xhp |4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit f930a0c40fa65c778b9e6b2fa75d7581bb3f82dc
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Sat Feb 25 15:09:48 2017 +0100

Update menu entry for Insert Trend Line in chart

Add emph tag in the same way as other menu commands

Change-Id: I968b391485b1cb4fa8083704ca91fd44af087b1f
Reviewed-on: https://gerrit.libreoffice.org/34644
Reviewed-by: Olivier Hallot <olivier.hal...@edx.srv.br>
Tested-by: Olivier Hallot <olivier.hal...@edx.srv.br>

diff --git a/source/text/schart/00/0004.xhp 
b/source/text/schart/00/0004.xhp
index 2f105d1e6..816a88aca 100644
--- a/source/text/schart/00/0004.xhp
+++ b/source/text/schart/00/0004.xhp
@@ -89,7 +89,7 @@
 
 Choose Insert - X Error Bars  or Insert - Y 
Error Bars (Charts)
 
-Choose Insert - Trend Lines (Charts)
+Choose Insert - Trend Line (Charts)
 
 Choose Insert - Special Character (Charts)
 
diff --git a/source/text/schart/01/04050100.xhp 
b/source/text/schart/01/04050100.xhp
index 367cf541f..c0037b468 100644
--- a/source/text/schart/01/04050100.xhp
+++ b/source/text/schart/01/04050100.xhp
@@ -116,10 +116,10 @@
 
 
   
-To insert 
a trend line for a data series, select the data series in the chart. Choose 
Insert - Trend Lines, or right-click to open the 
context menu, and choose Insert - Trend 
Line.
+To insert 
a trend line for a data series, select the data series in the chart. Choose 
Insert - Trend Line, or right-click to open the 
context menu, and choose Insert Trend 
Line.
   
-  
 
+  
 Mean Value Lines are special trend lines that show the mean 
value. Use Insert - Mean Value Lines to insert 
mean value lines for data series.
 
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2017-05-16 Thread Laurent Balland-Poirier
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ad605e2e0606ee2c5c0fb23b84a0f011af62d124
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Sat Feb 25 15:09:48 2017 +0100

Updated core
Project: help  f930a0c40fa65c778b9e6b2fa75d7581bb3f82dc

Update menu entry for Insert Trend Line in chart

Add emph tag in the same way as other menu commands

Change-Id: I968b391485b1cb4fa8083704ca91fd44af087b1f
Reviewed-on: https://gerrit.libreoffice.org/34644
Reviewed-by: Olivier Hallot <olivier.hal...@edx.srv.br>
Tested-by: Olivier Hallot <olivier.hal...@edx.srv.br>

diff --git a/helpcontent2 b/helpcontent2
index 90643687005e..f930a0c40fa6 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 90643687005e1a21c4067f253cc6adeda0c421e0
+Subproject commit f930a0c40fa65c778b9e6b2fa75d7581bb3f82dc
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-05-16 Thread Laurent Balland-Poirier
 source/text/shared/01/05020301.xhp |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 90643687005e1a21c4067f253cc6adeda0c421e0
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Wed Mar 1 14:53:04 2017 +0100

Clarify examples for l10n using space as thousands separator

Number Format Code
In locale using space as thousands separator, some examples
may be not correctly interpreted.
This patch adds some text to explain how to solve this.

Beautify a little bit some examples.

Complete fraction description: any digit symbol (0, # or ?)
can be used to described any of the three parts of the fraction.

Change-Id: I5bab1da21b33cddfa0a63fbe5e3d53d64ed0103c
Reviewed-on: https://gerrit.libreoffice.org/34755
Reviewed-by: Olivier Hallot <olivier.hal...@edx.srv.br>
Tested-by: Olivier Hallot <olivier.hal...@edx.srv.br>

diff --git a/source/text/shared/01/05020301.xhp 
b/source/text/shared/01/05020301.xhp
index 9c5ba9834..d2db2494a 100644
--- a/source/text/shared/01/05020301.xhp
+++ b/source/text/shared/01/05020301.xhp
@@ -66,7 +66,7 @@
 
 Decimal 
Places and Significant Digits
 Use zero (0), 
the number sign (#) or the question mark (?) as placeholders in your number 
format code to represent numbers. The (#) only displays significant digits, 
while the (0) displays zeroes if there are fewer digits in the number than in 
the number format. The (?) works as the (#) but adds a space character to keep 
decimal alignment if there is a hidden non-significant zero.
-Use question 
marks (?) to represent the number of digits to include in the numerator and the 
denominator of a fraction. Fractions that do not fit the pattern that you 
define are displayed as floating point numbers.
+Use question 
marks (?), zeroes (0) or number signs (#) to represent the number of digits to 
include in the numerator and the denominator of a fraction. Fractions that do 
not fit the pattern that you define are displayed as floating point 
numbers.
 If a number 
contains more digits to the right of the decimal delimiter than there are 
placeholders in the format, the number is rounded accordingly. If a number 
contains more digits to the left of the decimal delimiter than there are 
placeholders in the format, the entire number is displayed. Use the following 
list as a guide for using placeholders when you create a number format 
code:
 
 
@@ -168,7 +168,7 @@
 
 
 Thousands Separator
-Depending on 
your language setting, you can use a comma, a period or a blank as a thousands 
separator. You can also use the separator to reduce the size of the number that 
is displayed by a multiple of 1000 for each separator.
+Depending on 
your language setting, you can use a comma, a period or a blank as a thousands 
separator. You can also use the separator to reduce the size of the number that 
is displayed by a multiple of 1000 for each separator. The examples below use 
comma as thousands separator:
 
 
   
@@ -201,7 +201,7 @@
 Including Text in Number Format Codes
 
 Text 
and Numbers
-To include 
text in a number format that is applied to a cell containing numbers, place a 
double quotation mark (") in front of and behind the text, or a backslash (\) 
before a single character. For example, enter #.# "meters" to 
display "3.5 meters" or #.# \m to display "3.5 m".
+To include 
text in a number format that is applied to a cell containing numbers, place a 
double quotation mark (") in front of and behind the text, or a backslash (\) 
before a single character. For example, enter #.# "meters" to 
display "3.5 meters" or #.# \m to display "3.5 m". If you use 
space as thousands separator, you need to insert spaces between quotes in the 
previous examples: #.#" meters" or #.#\ \m to get the 
correct result.
 
 Text 
and Text
 To include 
text in a number format that is applied to a cell that might contain text, 
enclose the text by double quotation marks (" "), and then add an at sign (@). 
For example, enter "Total for "@ to display "Total for 
December".
@@ -271,7 +271,7 @@
 To display 
numbers as percentages, add the percent sign (%) to the number 
format.
 
 Scientific Notation
-Scientific 
notation lets you write very large numbers or very small fractions in a compact 
form. For example, in scientific notation, 65 is written as 6.5 x 10^5, and 
0.65 as 6.5 x 10^-5. Translators: use the decimal delimiter of 
your language (period or comma) for all number format codes in 
Calc.In %PRODUCTNAME, these numbers 
are written as 6.5E+5 and 6.5E-5, respectively. To create a number format that 
displays numbers using scientific notation, enter a # or 0, and then one of the 
following codes E-, E+, e- or e+. If sign is omitted after E or e, it won't 
appear for positive value of exponent. To get engine

[Libreoffice-commits] core.git: helpcontent2

2017-05-16 Thread Laurent Balland-Poirier
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 963c1f40cdc0fa29027755c4dc0998cb8b286c4a
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Wed Mar 1 14:53:04 2017 +0100

Updated core
Project: help  90643687005e1a21c4067f253cc6adeda0c421e0

Clarify examples for l10n using space as thousands separator

Number Format Code
In locale using space as thousands separator, some examples
may be not correctly interpreted.
This patch adds some text to explain how to solve this.

Beautify a little bit some examples.

Complete fraction description: any digit symbol (0, # or ?)
can be used to described any of the three parts of the fraction.

Change-Id: I5bab1da21b33cddfa0a63fbe5e3d53d64ed0103c
Reviewed-on: https://gerrit.libreoffice.org/34755
Reviewed-by: Olivier Hallot <olivier.hal...@edx.srv.br>
Tested-by: Olivier Hallot <olivier.hal...@edx.srv.br>

diff --git a/helpcontent2 b/helpcontent2
index ab17f13c6d60..90643687005e 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit ab17f13c6d60d2d6ad7ff6ce3734ba81c77f881d
+Subproject commit 90643687005e1a21c4067f253cc6adeda0c421e0
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-05-02 Thread Laurent Balland-Poirier
 sd/source/ui/func/fucopy.cxx|2 +-
 sd/uiconfig/sdraw/ui/copydlg.ui |1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 8b56a5ceed41a1bb0a82af71c90973f50f54e4b8
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Sat Apr 22 15:41:16 2017 +0200

tdf#77816 Duplicate dlg: enable fractionnal angle

In Duplicate dialog of Draw:
Count angle in 100th of degree

Change-Id: If1af9a42e7c35d39edbdc3fa624489d7e38b42e1
Reviewed-on: https://gerrit.libreoffice.org/36816
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Katarina Behrens <katarina.behr...@cib.de>

diff --git a/sd/source/ui/func/fucopy.cxx b/sd/source/ui/func/fucopy.cxx
index 45490d68f8b3..0edd047c0fed 100644
--- a/sd/source/ui/func/fucopy.cxx
+++ b/sd/source/ui/func/fucopy.cxx
@@ -242,7 +242,7 @@ void FuCopy::DoExecute( SfxRequest& rReq )
 mpView->ResizeAllMarked( aRect.TopLeft(), aWidth, aHeight );
 
 if( mpView->IsRotateAllowed() )
-mpView->RotateAllMarked( aRect.Center(), lAngle * 100 );
+mpView->RotateAllMarked( aRect.Center(), lAngle );
 
 if( mpView->IsMoveAllowed() )
 mpView->MoveAllMarked( Size( lSizeX, lSizeY ) );
diff --git a/sd/uiconfig/sdraw/ui/copydlg.ui b/sd/uiconfig/sdraw/ui/copydlg.ui
index ddadc3fdcd77..07c1a506afda 100644
--- a/sd/uiconfig/sdraw/ui/copydlg.ui
+++ b/sd/uiconfig/sdraw/ui/copydlg.ui
@@ -273,6 +273,7 @@
 True
 ●
 adjustment2
+2
   
   
 1
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - extras/source

2017-04-21 Thread Laurent Balland-Poirier
 extras/source/templates/presnt/Alizarin.otp |binary
 extras/source/templates/presnt/BrightBlue.otp   |binary
 extras/source/templates/presnt/DNA.otp  |binary
 extras/source/templates/presnt/Focus.otp|binary
 extras/source/templates/presnt/Impress.otp  |binary
 extras/source/templates/presnt/Inspiration.otp  |binary
 extras/source/templates/presnt/LushGreen.otp|binary
 extras/source/templates/presnt/Metropolis.otp   |binary
 extras/source/templates/presnt/Midnightblue.otp |binary
 extras/source/templates/presnt/Pencil.otp   |binary
 extras/source/templates/presnt/Sunset.otp   |binary
 extras/source/templates/presnt/Vintage.otp  |binary
 extras/source/templates/presnt/Vivid.otp|binary
 13 files changed

New commits:
commit 37b91d3f3a332ae7540c556751d39836b1f3d622
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Thu Apr 20 21:28:01 2017 +0200

tdf#107027 Remove language specific tags in templates

For all templates:
 Modify XML code to:
  Remove Configuration2 directory
  Remove lang specific tags in:
   - settings.xml
   - styles.xml
  Remove printer and grid parameters

Alizarin.otp
 Change names of master slides
 Remove hard coded texts tdf#104087

BrightBlue.otp

DNA.otp
 Remove hard coded texts

Focus.otp
 Remove hard coded texts
 Change text "Your logo here" to "Logo" to be less lang specific

Impress.otp

Inspiration.otp

LushGreen.otp

Metropolis.otp
 Remove hard coded texts

Midnightblue.otp
 Remove Outline frame on page 3

Pencil.otp
 Remove hard coded texts
 Resize title to not overlap picture

Sunset.otp
 Remove hard coded texts
 Set title in bold
 Resize outline text zone to fit in page

Vintage.otp

Vivid.otp
 Remove texts in Notes page
 Remove hard coded texts

Change-Id: If16c6c65e6650c1b6600e6324c0f931009023074
Reviewed-on: https://gerrit.libreoffice.org/36752
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>
Tested-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>
(cherry picked from commit 59cf94fac8e53d7f098eb2fbdf59d3a6aff254ce)
Reviewed-on: https://gerrit.libreoffice.org/36773

diff --git a/extras/source/templates/presnt/Alizarin.otp 
b/extras/source/templates/presnt/Alizarin.otp
index dcd05bbd2320..8a8252d5a0f0 100644
Binary files a/extras/source/templates/presnt/Alizarin.otp and 
b/extras/source/templates/presnt/Alizarin.otp differ
diff --git a/extras/source/templates/presnt/BrightBlue.otp 
b/extras/source/templates/presnt/BrightBlue.otp
index 542fb259908a..f9f7a4536407 100644
Binary files a/extras/source/templates/presnt/BrightBlue.otp and 
b/extras/source/templates/presnt/BrightBlue.otp differ
diff --git a/extras/source/templates/presnt/DNA.otp 
b/extras/source/templates/presnt/DNA.otp
index eb400b47120d..7640e9e1c2a2 100644
Binary files a/extras/source/templates/presnt/DNA.otp and 
b/extras/source/templates/presnt/DNA.otp differ
diff --git a/extras/source/templates/presnt/Focus.otp 
b/extras/source/templates/presnt/Focus.otp
index 18b3ecae210f..d99618e841f8 100644
Binary files a/extras/source/templates/presnt/Focus.otp and 
b/extras/source/templates/presnt/Focus.otp differ
diff --git a/extras/source/templates/presnt/Impress.otp 
b/extras/source/templates/presnt/Impress.otp
index ddf9a7eeb2be..9a33dcb7627c 100644
Binary files a/extras/source/templates/presnt/Impress.otp and 
b/extras/source/templates/presnt/Impress.otp differ
diff --git a/extras/source/templates/presnt/Inspiration.otp 
b/extras/source/templates/presnt/Inspiration.otp
index 18a30cfa7c68..18ec2148c61a 100644
Binary files a/extras/source/templates/presnt/Inspiration.otp and 
b/extras/source/templates/presnt/Inspiration.otp differ
diff --git a/extras/source/templates/presnt/LushGreen.otp 
b/extras/source/templates/presnt/LushGreen.otp
index 040e3bf8bd78..e2d6638e97dd 100644
Binary files a/extras/source/templates/presnt/LushGreen.otp and 
b/extras/source/templates/presnt/LushGreen.otp differ
diff --git a/extras/source/templates/presnt/Metropolis.otp 
b/extras/source/templates/presnt/Metropolis.otp
index 2af7d8a0ab75..f176ad79e9e9 100644
Binary files a/extras/source/templates/presnt/Metropolis.otp and 
b/extras/source/templates/presnt/Metropolis.otp differ
diff --git a/extras/source/templates/presnt/Midnightblue.otp 
b/extras/source/templates/presnt/Midnightblue.otp
index 981704cf26e4..962bafa3f6f6 100644
Binary files a/extras/source/templates/presnt/Midnightblue.otp and 
b/extras/source/templates/presnt/Midnightblue.otp differ
diff --git a/extras/source/templates/presnt/Pencil.otp 
b/extras/source/templates/presnt/Pencil.otp
index 549714bef5e1..fa12e50deaa5 100644
Binary files a/extras/source/templates/presnt/Pencil.otp and 
b/extr

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

2017-04-21 Thread Laurent Balland-Poirier
 extras/source/templates/presnt/Alizarin.otp |binary
 extras/source/templates/presnt/BrightBlue.otp   |binary
 extras/source/templates/presnt/DNA.otp  |binary
 extras/source/templates/presnt/Focus.otp|binary
 extras/source/templates/presnt/Impress.otp  |binary
 extras/source/templates/presnt/Inspiration.otp  |binary
 extras/source/templates/presnt/LushGreen.otp|binary
 extras/source/templates/presnt/Metropolis.otp   |binary
 extras/source/templates/presnt/Midnightblue.otp |binary
 extras/source/templates/presnt/Pencil.otp   |binary
 extras/source/templates/presnt/Sunset.otp   |binary
 extras/source/templates/presnt/Vintage.otp  |binary
 extras/source/templates/presnt/Vivid.otp|binary
 13 files changed

New commits:
commit 59cf94fac8e53d7f098eb2fbdf59d3a6aff254ce
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Thu Apr 20 21:28:01 2017 +0200

tdf#107027 Remove language specific tags in templates

For all templates:
 Modify XML code to:
  Remove Configuration2 directory
  Remove lang specific tags in:
   - settings.xml
   - styles.xml
  Remove printer and grid parameters

Alizarin.otp
 Change names of master slides
 Remove hard coded texts tdf#104087

BrightBlue.otp

DNA.otp
 Remove hard coded texts

Focus.otp
 Remove hard coded texts
 Change text "Your logo here" to "Logo" to be less lang specific

Impress.otp

Inspiration.otp

LushGreen.otp

Metropolis.otp
 Remove hard coded texts

Midnightblue.otp
 Remove Outline frame on page 3

Pencil.otp
 Remove hard coded texts
 Resize title to not overlap picture

Sunset.otp
 Remove hard coded texts
 Set title in bold
 Resize outline text zone to fit in page

Vintage.otp

Vivid.otp
 Remove texts in Notes page
 Remove hard coded texts

Change-Id: If16c6c65e6650c1b6600e6324c0f931009023074
Reviewed-on: https://gerrit.libreoffice.org/36752
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>
Tested-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

diff --git a/extras/source/templates/presnt/Alizarin.otp 
b/extras/source/templates/presnt/Alizarin.otp
index dcd05bbd2320..8a8252d5a0f0 100644
Binary files a/extras/source/templates/presnt/Alizarin.otp and 
b/extras/source/templates/presnt/Alizarin.otp differ
diff --git a/extras/source/templates/presnt/BrightBlue.otp 
b/extras/source/templates/presnt/BrightBlue.otp
index 542fb259908a..f9f7a4536407 100644
Binary files a/extras/source/templates/presnt/BrightBlue.otp and 
b/extras/source/templates/presnt/BrightBlue.otp differ
diff --git a/extras/source/templates/presnt/DNA.otp 
b/extras/source/templates/presnt/DNA.otp
index eb400b47120d..7640e9e1c2a2 100644
Binary files a/extras/source/templates/presnt/DNA.otp and 
b/extras/source/templates/presnt/DNA.otp differ
diff --git a/extras/source/templates/presnt/Focus.otp 
b/extras/source/templates/presnt/Focus.otp
index 18b3ecae210f..d99618e841f8 100644
Binary files a/extras/source/templates/presnt/Focus.otp and 
b/extras/source/templates/presnt/Focus.otp differ
diff --git a/extras/source/templates/presnt/Impress.otp 
b/extras/source/templates/presnt/Impress.otp
index ddf9a7eeb2be..9a33dcb7627c 100644
Binary files a/extras/source/templates/presnt/Impress.otp and 
b/extras/source/templates/presnt/Impress.otp differ
diff --git a/extras/source/templates/presnt/Inspiration.otp 
b/extras/source/templates/presnt/Inspiration.otp
index 18a30cfa7c68..18ec2148c61a 100644
Binary files a/extras/source/templates/presnt/Inspiration.otp and 
b/extras/source/templates/presnt/Inspiration.otp differ
diff --git a/extras/source/templates/presnt/LushGreen.otp 
b/extras/source/templates/presnt/LushGreen.otp
index 040e3bf8bd78..e2d6638e97dd 100644
Binary files a/extras/source/templates/presnt/LushGreen.otp and 
b/extras/source/templates/presnt/LushGreen.otp differ
diff --git a/extras/source/templates/presnt/Metropolis.otp 
b/extras/source/templates/presnt/Metropolis.otp
index 2af7d8a0ab75..f176ad79e9e9 100644
Binary files a/extras/source/templates/presnt/Metropolis.otp and 
b/extras/source/templates/presnt/Metropolis.otp differ
diff --git a/extras/source/templates/presnt/Midnightblue.otp 
b/extras/source/templates/presnt/Midnightblue.otp
index 981704cf26e4..962bafa3f6f6 100644
Binary files a/extras/source/templates/presnt/Midnightblue.otp and 
b/extras/source/templates/presnt/Midnightblue.otp differ
diff --git a/extras/source/templates/presnt/Pencil.otp 
b/extras/source/templates/presnt/Pencil.otp
index 549714bef5e1..fa12e50deaa5 100644
Binary files a/extras/source/templates/presnt/Pencil.otp and 
b/extras/source/templates/presnt/Pencil.otp differ
diff --git a/extras/source/templates/presnt/Sunset.otp 
b/extras/source/te

[Libreoffice-commits] core.git: svl/qa

2017-04-10 Thread Laurent Balland-Poirier
 svl/qa/unit/svl.cxx |   40 +++-
 1 file changed, 39 insertions(+), 1 deletion(-)

New commits:
commit bac6141665049e53c01715a88d46ca04d678ddf0
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Fri Mar 17 19:44:10 2017 +0100

tdf#106190 Tests of fraction formats

Improve error message if test fails

Add more formats to test
Need https://gerrit.libreoffice.org/35320/

Change-Id: I89f5071e12ff87cdf1c03912922918390531e972
Reviewed-on: https://gerrit.libreoffice.org/35377
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Eike Rathke <er...@redhat.com>

diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx
index 8ac1dd722acc..99a1626f37cd 100644
--- a/svl/qa/unit/svl.cxx
+++ b/svl/qa/unit/svl.cxx
@@ -399,7 +399,16 @@ void Test::checkPreviewString(SvNumberFormatter& 
aFormatter,
 Color* pColor = nullptr;
 Color** ppColor = 
 if (!aFormatter.GetPreviewString(sCode, fPreviewNumber, sStr, ppColor, 
eLang))
-CPPUNIT_FAIL("GetPreviewString() failed");
+{
+rtl::OString aMessage = "GetPreviewString( \"";
+aMessage += rtl::OUStringToOString( sCode, RTL_TEXTENCODING_ASCII_US );
+aMessage += "\", ";
+aMessage += rtl::OString::number( fPreviewNumber );
+aMessage += ", sStr, ppColor, ";
+aMessage += rtl::OString::number( eLang );
+aMessage += " ) failed";
+CPPUNIT_FAIL( aMessage.getStr() );
+}
 CPPUNIT_ASSERT_EQUAL(sExpected, sStr);
 }
 
@@ -1204,10 +1213,39 @@ void Test::testUserDefinedNumberFormats()
 sExpected = "before 1.2inside3E+0middle4 after";
 checkPreviewString(aFormatter, sCode, 12345.667, eLang, sExpected);
 }
+{  // tdf#106190: text after fraction bar
+sCode = "?/ ?";
+sExpected = "11/ 9";
+checkPreviewString(aFormatter, sCode, 1.2345667, eLang, sExpected);
+sCode = "?/ 12";
+sExpected = "15/ 12";
+checkPreviewString(aFormatter, sCode, 1.2345667, eLang, sExpected);
+sCode = "# ?/\" divisor \"?";
+sExpected = "1 2/ divisor 9";
+checkPreviewString(aFormatter, sCode, 1.2345667, eLang, sExpected);
+sCode = "# ?/\"divided by \"?";
+sExpected = "1 2/divided by 9";
+checkPreviewString(aFormatter, sCode, 1.2345667, eLang, sExpected);
+sCode = "?/\" \"12";
+sExpected = "15/ 12";
+checkPreviewString(aFormatter, sCode, 1.2345667, eLang, sExpected);
+sCode = "?/\\ 12";
+sExpected = "15/ 12";
+checkPreviewString(aFormatter, sCode, 1.2345667, eLang, sExpected);
+sCode = "# ?/ ???";
+sExpected = "3 1/ 2  ";
+checkPreviewString(aFormatter, sCode, 3.5, eLang, sExpected);
+}
 {  // Display 1.96 as 2 and not 1 1/1
 sCode = "# ?/?";
 sExpected = "2";
 checkPreviewString(aFormatter, sCode, 1.96, eLang, sExpected);
+sCode = "# ?/ ?";
+sExpected = "2 ";
+checkPreviewString(aFormatter, sCode, 1.96, eLang, sExpected);
+sCode = "# #/#";
+sExpected = "2";
+checkPreviewString(aFormatter, sCode, 1.96, eLang, sExpected);
 }
 {  // tdf#79399 tdf#101462 Native Number Formats
 sCode = "[NatNum5][$-0404]General\\ ";
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - include/svl sc/source

2017-04-10 Thread Laurent Balland-Poirier
 include/svl/zformat.hxx  |6 ++
 sc/source/core/data/documen4.cxx |6 ++
 2 files changed, 12 insertions(+)

New commits:
commit 506b228992ccb5a12486e2a8607ee3c81e3467a1
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Sun Mar 12 14:11:36 2017 +0100

tdf#106253 Precision as shown for thousand dividor

Info().nThousand contains number of thousands dividors
after which digits are not displayed, i.e. 12345 is displayed
as 12 with format 0, (in en_US)

Change-Id: Ifa5540f2efd8ab006a07eade53f7aa0d31a19eac
Reviewed-on: https://gerrit.libreoffice.org/35097
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Eike Rathke <er...@redhat.com>
(cherry picked from commit 60d7644a46970e6eaee882e0c5d65692da206c24)
Reviewed-on: https://gerrit.libreoffice.org/35204

diff --git a/include/svl/zformat.hxx b/include/svl/zformat.hxx
index 4d108815d9a7..ebd652c5e2ec 100644
--- a/include/svl/zformat.hxx
+++ b/include/svl/zformat.hxx
@@ -226,6 +226,12 @@ public:
 sal_uInt16 GetFormatIntegerDigits( sal_uInt16 nIx = 0 ) const
 { return NumFor[nIx].Info().nCntPre; }
 
+/** Count of hidden integer digits with thousands dividor:
+ * formats like "0," to show only thousands
+ */
+sal_uInt16 GetThousandDivisorPrecision( sal_uInt16 nIx = 0 ) const
+{ return NumFor[nIx].Info().nThousand * 3; }
+
 //! Read/write access on a special sal_uInt16 component, may only be used 
on the
 //! standard format 0, 5000, ... and only by the number formatter!
 sal_uInt16 GetLastInsertKey() const
diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx
index 6bb280b20d91..1cdc777fcd91 100644
--- a/sc/source/core/data/documen4.cxx
+++ b/sc/source/core/data/documen4.cxx
@@ -692,6 +692,12 @@ double ScDocument::RoundValueAsShown( double fVal, 
sal_uInt32 nFormat ) const
 {
 return pFormat->GetRoundFractionValue( fVal );
 }
+case css::util::NumberFormat::NUMBER:
+case css::util::NumberFormat::CURRENCY:
+{   // tdf#106253 Thousands dividors for format "0,"
+nPrecision -=  pFormat->GetThousandDivisorPrecision( nIdx 
);
+break;
+}
 }
 }
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - 2 commits - include/svl sc/qa sc/source

2017-04-10 Thread Laurent Balland-Poirier
 include/svl/zformat.hxx  |3 
 sc/qa/unit/ucalc.cxx |  156 +++
 sc/qa/unit/ucalc.hxx |4 +
 sc/source/core/data/documen4.cxx |   20 -
 4 files changed, 179 insertions(+), 4 deletions(-)

New commits:
commit 3c68b6520e743e8ed9afa908a461f766952e030f
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Fri Mar 3 21:51:26 2017 +0100

tdf#106252 Engineering notation for Precision as shown

with more tests

Reviewed-on: https://gerrit.libreoffice.org/35089
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Eike Rathke <er...@redhat.com>
(cherry picked from commit 5f2db66ad0de6fbbae309850516e17eaa17934cb)

Change-Id: Ifc77b847af4eaaa3c85e904e46c2663b6d768241
Reviewed-on: https://gerrit.libreoffice.org/36369
Reviewed-by: Eike Rathke <er...@redhat.com>
Tested-by: Jenkins <c...@libreoffice.org>

diff --git a/include/svl/zformat.hxx b/include/svl/zformat.hxx
index 34525acad43e..4d108815d9a7 100644
--- a/include/svl/zformat.hxx
+++ b/include/svl/zformat.hxx
@@ -223,7 +223,8 @@ public:
 { return NumFor[nIx].Info().nCntPost; }
 
 /// Count of integer digits
-sal_uInt16 GetFormatIntegerDigits() const { return 
NumFor[0].Info().nCntPre; }
+sal_uInt16 GetFormatIntegerDigits( sal_uInt16 nIx = 0 ) const
+{ return NumFor[nIx].Info().nCntPre; }
 
 //! Read/write access on a special sal_uInt16 component, may only be used 
on the
 //! standard format 0, 5000, ... and only by the number formatter!
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index dbdd549b3ba6..ea44ff7d4f3d 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -6434,12 +6434,14 @@ void Test::testPrecisionAsShown()
 aCode = "0.00";
 fValue = 1.0/3.0;
 fExpectedRoundVal = 0.33;
-checkPrecisionAsShown( aCode, fValue, fExpectedRoundVal );
-fValue = -10.001;
-fExpectedRoundVal = -10.0;
-checkPrecisionAsShown( aCode, fValue, fExpectedRoundVal );
+checkPrecisionAsShown( aCode,  fValue,  fExpectedRoundVal );
+checkPrecisionAsShown( aCode, -fValue, -fExpectedRoundVal );
+fValue = 10.001;
+fExpectedRoundVal = 10.0;
+checkPrecisionAsShown( aCode,  fValue,  fExpectedRoundVal );
+checkPrecisionAsShown( aCode, -fValue, -fExpectedRoundVal );
 }
-{   // thousand rounding buguous tdf#106253
+{   // thousand rounding bogus tdf#106253
 aCode = "0,,";
 fValue = 4.0e9 / 7.0;
 fExpectedRoundVal = 571e6; // actual is 571428571
@@ -6452,54 +6454,105 @@ void Test::testPrecisionAsShown()
 aCode = "0.00%";
 fValue = 4.0 / 7.0;
 fExpectedRoundVal = 0.5714;
-checkPrecisionAsShown( aCode, fValue, fExpectedRoundVal );
-fValue = -4.0 / 7.0;
-fExpectedRoundVal = -0.5714;
-checkPrecisionAsShown( aCode, fValue, fExpectedRoundVal );
+checkPrecisionAsShown( aCode,  fValue,  fExpectedRoundVal );
+checkPrecisionAsShown( aCode, -fValue, -fExpectedRoundVal );
+fValue = 40.0 / 7.0;
+fExpectedRoundVal = 5.7143;
+checkPrecisionAsShown( aCode,  fValue,  fExpectedRoundVal );
+checkPrecisionAsShown( aCode, -fValue, -fExpectedRoundVal );
 }
 {   // scientific rounding
 aCode = "0.00E0";
 fValue = 40.0 / 7.0;
 fExpectedRoundVal = 57100.0;
-checkPrecisionAsShown( aCode, fValue, fExpectedRoundVal );
+checkPrecisionAsShown( aCode,  fValue,  fExpectedRoundVal );
+checkPrecisionAsShown( aCode, -fValue, -fExpectedRoundVal );
 fValue = 4.0 / 7.0;
 fExpectedRoundVal = 5.71e-5;
-checkPrecisionAsShown( aCode, fValue, fExpectedRoundVal );
-// engineering rounding bugous!!! tdf#106252
+checkPrecisionAsShown( aCode,  fValue,  fExpectedRoundVal );
+checkPrecisionAsShown( aCode, -fValue, -fExpectedRoundVal );
+// engineering rounding tdf#106252
 aCode = "##0.000E0";
 fValue = 40.0 / 7.0;
-fExpectedRoundVal = 57143.0; // actual is 57140
-//checkPrecisionAsShown( aCode, fValue, fExpectedRoundVal );
+fExpectedRoundVal = 57.143e3;
+checkPrecisionAsShown( aCode,  fValue,  fExpectedRoundVal );
+checkPrecisionAsShown( aCode, -fValue, -fExpectedRoundVal );
+fValue = 400.0 / 7.0;
+fExpectedRoundVal = 571.429e3;
+checkPrecisionAsShown( aCode,  fValue,  fExpectedRoundVal );
+checkPrecisionAsShown( aCode, -fValue, -fExpectedRoundVal );
+fValue = 4000.0 / 7.0;
+fExpectedRoundVal = 5.714e6;
+checkPrecisionAsShown( aCode,  fValue,  fExpectedRoundVal );
+checkPrecisionAsShown( aCode, -fValue, -fExpectedRoundVal );
 fValue

[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - include/svl sc/source svl/source

2017-04-10 Thread Laurent Balland-Poirier
 include/svl/zforlist.hxx |3 +++
 include/svl/zformat.hxx  |3 ++-
 sc/source/core/data/documen4.cxx |2 +-
 svl/source/numbers/zforlist.cxx  |   12 
 4 files changed, 18 insertions(+), 2 deletions(-)

New commits:
commit 09478b2211bbc9ec34d8de8452e30cf1254a250c
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Thu Feb 16 22:15:37 2017 +0100

tdf#106052 Treat SubFormat for "Precision as shown"

Get precision from the correct subformat

Change-Id: I458e5b3d1fb515864f19499ac9ac529e1d68a267
Reviewed-on: https://gerrit.libreoffice.org/34505
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Eike Rathke <er...@redhat.com>
(cherry picked from commit e7f769bc67d3f132b477b3c253f8065243b9b8ac)
Reviewed-on: https://gerrit.libreoffice.org/36367

diff --git a/include/svl/zforlist.hxx b/include/svl/zforlist.hxx
index 36e468726a64..f03a79e0aa45 100644
--- a/include/svl/zforlist.hxx
+++ b/include/svl/zforlist.hxx
@@ -517,6 +517,9 @@ public:
 /// Count of decimals
 sal_uInt16 GetFormatPrecision( sal_uInt32 nFormat ) const;
 
+/// Count of decimals with correct subformat according to fValue
+sal_uInt16 GetFormatPrecision( sal_uInt32 nFormat, double fValue ) const;
+
 /// Count of integer digits
 sal_uInt16 GetFormatIntegerDigits( sal_uInt32 nFormat ) const;
 
diff --git a/include/svl/zformat.hxx b/include/svl/zformat.hxx
index dbfa04858c28..34525acad43e 100644
--- a/include/svl/zformat.hxx
+++ b/include/svl/zformat.hxx
@@ -219,7 +219,8 @@ public:
 sal_uInt16 GetSubformatIndex( double fNumber ) const;
 
 /// Count of decimal precision
-sal_uInt16 GetFormatPrecision() const   { return 
NumFor[0].Info().nCntPost; }
+sal_uInt16 GetFormatPrecision( sal_uInt16 nIx = 0 ) const
+{ return NumFor[nIx].Info().nCntPost; }
 
 /// Count of integer digits
 sal_uInt16 GetFormatIntegerDigits() const { return 
NumFor[0].Info().nCntPre; }
diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx
index fed6c0d043f0..6a1110b6cd80 100644
--- a/sc/source/core/data/documen4.cxx
+++ b/sc/source/core/data/documen4.cxx
@@ -660,7 +660,7 @@ double ScDocument::RoundValueAsShown( double fVal, 
sal_uInt32 nFormat ) const
 short nPrecision;
 if ((nFormat % SV_COUNTRY_LANGUAGE_OFFSET) != 0)
 {
-nPrecision = (short)pFormat->GetFormatPrecision();
+nPrecision = (short)GetFormatTable()->GetFormatPrecision( nFormat, 
fVal );
 switch ( nType )
 {
 case css::util::NumberFormat::PERCENT:  // 0.41% == 0.0041
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index 659e1b5b340d..108babe2da50 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -1981,6 +1981,18 @@ sal_uInt16 SvNumberFormatter::GetFormatPrecision( 
sal_uInt32 nFormat ) const
 return pFormatScanner->GetStandardPrec();
 }
 
+sal_uInt16 SvNumberFormatter::GetFormatPrecision( sal_uInt32 nFormat, double 
fValue ) const
+{
+const SvNumberformat* pFormat = GetFormatEntry( nFormat );
+if ( pFormat )
+{
+sal_uInt16 nIx = pFormat->GetSubformatIndex( fValue );
+return pFormat->GetFormatPrecision( nIx );
+}
+else
+return pFormatScanner->GetStandardPrec();
+}
+
 sal_uInt16 SvNumberFormatter::GetFormatIntegerDigits( sal_uInt32 nFormat ) 
const
 {
 const SvNumberformat* pFormat = GetFormatEntry( nFormat );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - include/svl sc/source svl/source

2017-04-10 Thread Laurent Balland-Poirier
 include/svl/zforlist.hxx |3 
 include/svl/zformat.hxx  |   19 +
 sc/source/core/data/documen4.cxx |4 +
 svl/source/numbers/zforlist.cxx  |9 ++
 svl/source/numbers/zformat.cxx   |  147 ++-
 5 files changed, 119 insertions(+), 63 deletions(-)

New commits:
commit 9f70f8761a8cc180171022ffcffc0094c4957057
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Wed Feb 15 23:27:34 2017 +0100

tdf#105657 Treat "Precision as shown" for fractions

For Option "Precision as shown",
 fraction must specificly be treated
ImpGetFractionElements retrieves values of each part
of fraction (integer, numerator, denominator)
independently from its exact representation
Update: avoid include of zformat.hxx in document4.cxx

Change-Id: Ia3ea2322f3d311c04ef71f3260730c7154c3dc15
Reviewed-on: https://gerrit.libreoffice.org/34331
Reviewed-by: Eike Rathke <er...@redhat.com>
Tested-by: Eike Rathke <er...@redhat.com>
(cherry picked from commit 5706b29974c1c3ab0ba5a23685accf2fbebc3e06)
Reviewed-on: https://gerrit.libreoffice.org/36365
Tested-by: Jenkins <c...@libreoffice.org>

diff --git a/include/svl/zforlist.hxx b/include/svl/zforlist.hxx
index ab7dd90f1426..36e468726a64 100644
--- a/include/svl/zforlist.hxx
+++ b/include/svl/zforlist.hxx
@@ -531,6 +531,9 @@ public:
  sal_uInt16& nPrecision, sal_uInt16& 
nAnzLeading,
  LanguageType eLnge = LANGUAGE_DONTKNOW );
 
+/// Get round value with fraction representation
+double GetRoundFractionValue( sal_uInt32 nFormat, double fValue ) const;
+
 /// Check if format code string may be deleted by user
 bool IsUserDefined( const OUString& sStr, LanguageType eLnge = 
LANGUAGE_DONTKNOW );
 
diff --git a/include/svl/zformat.hxx b/include/svl/zformat.hxx
index ceba6a4993ca..f798d4090638 100644
--- a/include/svl/zformat.hxx
+++ b/include/svl/zformat.hxx
@@ -212,6 +212,9 @@ public:
   sal_uInt16& nPrecision,
   sal_uInt16& nAnzLeading) const;
 
+/// Get index of subformat (0..3) according to conditions and fNumber value
+sal_uInt16 GetSubformatIndex( double fNumber ) const;
+
 /// Count of decimal precision
 sal_uInt16 GetFormatPrecision() const   { return 
NumFor[0].Info().nCntPost; }
 
@@ -242,6 +245,9 @@ public:
 OUString GetDenominatorString( sal_uInt16 nNumFor ) const;
 OUString GetNumeratorString( sal_uInt16 nNumFor ) const;
 OUString GetIntegerFractionDelimiterString( sal_uInt16 nNumFor ) const;
+/// Round fNumber to its fraction representation
+double GetRoundFractionValue ( double fNumber ) const;
+
 /** If the count of string elements (substrings, ignoring [modifiers] and
 so on) in a subformat code nNumFor (0..3) is equal to the given number.
 Used by ImpSvNumberInputScan::IsNumberFormatMain() to detect a matched
@@ -580,6 +586,19 @@ private:
  sal_uInt16 nIx,
  bool bInteger );
 
+/** Calculate each element of fraction:
+ * integer part, numerator part, denominator part
+ * @param fNumber value to be represented as fraction. Will contain 
absolute fractional part
+ * @param nIx subformat number 0..3
+ * @param fIntPart integral part of fraction
+ * @param nFrac numerator of fraction
+ * @param nDic denominator of fraction
+ */
+SVL_DLLPRIVATE void ImpGetFractionElements( double& fNumber,
+sal_uInt16 nIx,
+double& fIntPart,
+sal_uInt64& nFrac,
+sal_uInt64& nDiv ) const;
 SVL_DLLPRIVATE bool ImpGetFractionOutput(double fNumber,
  sal_uInt16 nIx,
  OUStringBuffer& OutString);
diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx
index c503b2fa6137..09b7c543e7e8 100644
--- a/sc/source/core/data/documen4.cxx
+++ b/sc/source/core/data/documen4.cxx
@@ -672,6 +672,10 @@ double ScDocument::RoundValueAsShown( double fVal, 
sal_uInt32 nFormat ) const
 nPrecision = sal::static_int_cast( nPrecision - 
(short)floor( log10( -fVal ) ) );
 break;
 }
+case css::util::NumberFormat::FRACTION: // get value of 
fraction representation
+{
+return GetFormatTable()->GetRoundFractionValue( nFormat, 
fVal );
+}
 }
 }
 else
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index c2617a534

[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - include/svl svl/source

2017-04-07 Thread Laurent Balland-Poirier
 include/svl/zformat.hxx|3 ++-
 svl/source/numbers/zformat.cxx |   29 +++--
 2 files changed, 13 insertions(+), 19 deletions(-)

New commits:
commit 693c929c1a475e6b4bd737e50d09d6f390700812
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Thu Mar 16 23:45:13 2017 +0100

tdf#106190 Fix (again) left alignment of denominator

Instead of moving spaces from left to right, like it was done
previously, this patch insert spaces directly on right
when in denominator
This avoid complex calculation when user enter such (stupid)
format:
 # ?/ ???
or
 # ?/" hello world "???

In SvNumberformat::ImpNumberFill, for NF_SYMBOLTYPE_FRAC_FDIV
you need at least to move in sBuf, to insert text at the
expected place for (stupid) format like
 # ?/ 100
or
 # ?/" hello world "100

All these formats works, but are stored in ODF with text
after fraction

Change-Id: I296e60643e93242b8006848a643135219ad4ad0c
Reviewed-on: https://gerrit.libreoffice.org/35320
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Eike Rathke <er...@redhat.com>
(cherry picked from commit 2fd110a78d03510d031c4c6cf6ad380d82899df8)
Reviewed-on: https://gerrit.libreoffice.org/36232

diff --git a/include/svl/zformat.hxx b/include/svl/zformat.hxx
index ce632ae04920..ceba6a4993ca 100644
--- a/include/svl/zformat.hxx
+++ b/include/svl/zformat.hxx
@@ -553,7 +553,8 @@ private:
 sal_Int32& k,
 sal_uInt16& j,
 sal_uInt16 nIx,
-short eSymbolType );
+short eSymbolType,
+bool bInsertRightBlank = false );
 
 // Helper function to fill in the integer part and the group (AKA 
thousand) separators
 SVL_DLLPRIVATE bool ImpNumberFillWithThousands( OUStringBuffer& sStr,
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index ac622bf4cc45..2c018f662784 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -2212,7 +2212,8 @@ OUString lcl_GetDenominatorString(const 
ImpSvNumberformatInfo , sal_uInt16
 {
 if( rInfo.nTypeArray[i] == NF_SYMBOLTYPE_FRAC )
 {
-while ( ( ++i < nAnz ) && rInfo.nTypeArray[i] == 
NF_SYMBOLTYPE_STRING );
+while ( ( ++i < nAnz ) && rInfo.nTypeArray[i] != 
NF_SYMBOLTYPE_FRAC_FDIV
+   && rInfo.nTypeArray[i] != 
NF_SYMBOLTYPE_DIGIT );
 for( ; i < nAnz; i++ )
 {
 if( rInfo.nTypeArray[i] == NF_SYMBOLTYPE_FRAC_FDIV || 
rInfo.nTypeArray[i] == NF_SYMBOLTYPE_DIGIT )
@@ -2815,21 +2816,7 @@ bool SvNumberformat::ImpGetFractionOutput(double fNumber,
 sal_uInt16 j = nAnz-1; // Last symbol -> backwards
 sal_Int32 k;   // Denominator
 
-bRes |= ImpNumberFill(sDiv, fNumber, k, j, nIx, NF_SYMBOLTYPE_FRAC);
-if ( !bHideFraction &&  sDenominatorFormat.getLength() > 0 )
-{
-// Guard against a (theoretical?) endless loop of blanks only.
-sal_Int32 n = sDiv.getLength();
-sal_Int32 nDenominatorLen = sDenominatorFormat.getLength();
-while ( n-- > 0 && sDiv[0] == ' ' ) // left align denominator
-{
-if (sDiv.getLength() <= nDenominatorLen)
-sDiv.append(" ");
-else
-sDiv.insert( nDenominatorLen, " " );
-sDiv.remove( 0, 1 );
-}
-}
+bRes |= ImpNumberFill(sDiv, fNumber, k, j, nIx, NF_SYMBOLTYPE_FRAC, true);
 
 bool bCont = true;
 if (rInfo.nTypeArray[j] == NF_SYMBOLTYPE_FRAC)
@@ -4484,7 +4471,8 @@ bool SvNumberformat::ImpNumberFill( OUStringBuffer& 
sBuff, // number string
 sal_Int32& k,  // position within 
string
 sal_uInt16& j, // symbol index 
within format code
 sal_uInt16 nIx,// subformat index
-short eSymbolType )// type of stop 
condition
+short eSymbolType, // type of stop 
condition
+bool bInsertRightBlank)// insert blank on 
right for denominator (default = false)
 {
 bool bRes = false;
 bool bStop = false;
@@ -4536,6 +4524,7 @@ bool SvNumberformat::ImpNumberFill( OUStringBuffer& 
sBuff, // number string
 case NF_SYMBOLTYPE_DIGIT:
 {
 bFoundNumber = true;
+sal_uInt16 nPosInsertBlank = bInsertRightBlank ? k : 0; // left 
alignment of denominator
 const OUString& rStr = rInfo.sStrArray[j];
 const sal_Unicode* p1 = rStr.getStr();
 const sal_Unicode* p = p1 + rStr.getL

[Libreoffice-commits] core.git: include/svl svl/source

2017-04-06 Thread Laurent Balland-Poirier
 include/svl/zformat.hxx|3 ++-
 svl/source/numbers/zformat.cxx |   29 +++--
 2 files changed, 13 insertions(+), 19 deletions(-)

New commits:
commit 2fd110a78d03510d031c4c6cf6ad380d82899df8
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Thu Mar 16 23:45:13 2017 +0100

tdf#106190 Fix (again) left alignment of denominator

Instead of moving spaces from left to right, like it was done
previously, this patch insert spaces directly on right
when in denominator
This avoid complex calculation when user enter such (stupid)
format:
 # ?/ ???
or
 # ?/" hello world "???

In SvNumberformat::ImpNumberFill, for NF_SYMBOLTYPE_FRAC_FDIV
you need at least to move in sBuf, to insert text at the
expected place for (stupid) format like
 # ?/ 100
or
 # ?/" hello world "100

All these formats works, but are stored in ODF with text
after fraction

Change-Id: I296e60643e93242b8006848a643135219ad4ad0c
Reviewed-on: https://gerrit.libreoffice.org/35320
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Eike Rathke <er...@redhat.com>

diff --git a/include/svl/zformat.hxx b/include/svl/zformat.hxx
index 9bee5ca38370..d5086d7a7fc2 100644
--- a/include/svl/zformat.hxx
+++ b/include/svl/zformat.hxx
@@ -571,7 +571,8 @@ private:
 sal_Int32& k,
 sal_uInt16& j,
 sal_uInt16 nIx,
-short eSymbolType );
+short eSymbolType,
+bool bInsertRightBlank = false );
 
 // Helper function to fill in the integer part and the group (AKA 
thousand) separators
 SVL_DLLPRIVATE bool ImpNumberFillWithThousands( OUStringBuffer& sStr,
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 3b85e192adfa..505e3c06df9a 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -2211,7 +2211,8 @@ OUString lcl_GetDenominatorString(const 
ImpSvNumberformatInfo , sal_uInt16
 {
 if( rInfo.nTypeArray[i] == NF_SYMBOLTYPE_FRAC )
 {
-while ( ( ++i < nAnz ) && rInfo.nTypeArray[i] == 
NF_SYMBOLTYPE_STRING );
+while ( ( ++i < nAnz ) && rInfo.nTypeArray[i] != 
NF_SYMBOLTYPE_FRAC_FDIV
+   && rInfo.nTypeArray[i] != 
NF_SYMBOLTYPE_DIGIT );
 for( ; i < nAnz; i++ )
 {
 if( rInfo.nTypeArray[i] == NF_SYMBOLTYPE_FRAC_FDIV || 
rInfo.nTypeArray[i] == NF_SYMBOLTYPE_DIGIT )
@@ -2835,21 +2836,7 @@ bool SvNumberformat::ImpGetFractionOutput(double fNumber,
 sal_uInt16 j = nAnz-1; // Last symbol -> backwards
 sal_Int32 k;   // Denominator
 
-bRes |= ImpNumberFill(sDiv, fNumber, k, j, nIx, NF_SYMBOLTYPE_FRAC);
-if ( !bHideFraction &&  sDenominatorFormat.getLength() > 0 )
-{
-// Guard against a (theoretical?) endless loop of blanks only.
-sal_Int32 n = sDiv.getLength();
-sal_Int32 nDenominatorLen = sDenominatorFormat.getLength();
-while ( n-- > 0 && sDiv[0] == ' ' ) // left align denominator
-{
-if (sDiv.getLength() <= nDenominatorLen)
-sDiv.append(" ");
-else
-sDiv.insert( nDenominatorLen, " " );
-sDiv.remove( 0, 1 );
-}
-}
+bRes |= ImpNumberFill(sDiv, fNumber, k, j, nIx, NF_SYMBOLTYPE_FRAC, true);
 
 bool bCont = true;
 if (rInfo.nTypeArray[j] == NF_SYMBOLTYPE_FRAC)
@@ -4504,7 +4491,8 @@ bool SvNumberformat::ImpNumberFill( OUStringBuffer& 
sBuff, // number string
 sal_Int32& k,  // position within 
string
 sal_uInt16& j, // symbol index 
within format code
 sal_uInt16 nIx,// subformat index
-short eSymbolType )// type of stop 
condition
+short eSymbolType, // type of stop 
condition
+bool bInsertRightBlank)// insert blank on 
right for denominator (default = false)
 {
 bool bRes = false;
 bool bStop = false;
@@ -4556,6 +4544,7 @@ bool SvNumberformat::ImpNumberFill( OUStringBuffer& 
sBuff, // number string
 case NF_SYMBOLTYPE_DIGIT:
 {
 bFoundNumber = true;
+sal_uInt16 nPosInsertBlank = bInsertRightBlank ? k : 0; // left 
alignment of denominator
 const OUString& rStr = rInfo.sStrArray[j];
 const sal_Unicode* p1 = rStr.getStr();
 const sal_Unicode* p = p1 + rStr.getLength();
@@ -4573,7 +4562,7 @@ bool SvNumberformat::ImpNumberFill( OUStringBuffer& 
sBuff, // number s

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - 14 commits - filter/source hwpfilter/source include/vcl jvmfwk/inc jvmfwk/plugins lotuswordpro/source sc/source svl/source sw/source

2017-03-16 Thread Laurent Balland-Poirier
 filter/source/graphicfilter/itiff/itiff.cxx |   65 
 hwpfilter/source/drawing.h  |4 -
 hwpfilter/source/hgzip.cxx  |8 +-
 hwpfilter/source/hgzip.h|2 
 hwpfilter/source/hiodev.cxx |   48 +++---
 hwpfilter/source/hiodev.h   |   22 +++---
 include/vcl/menu.hxx|1 
 jvmfwk/inc/vendorbase.hxx   |2 
 jvmfwk/inc/vendorplugin.hxx |1 
 jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx |6 +
 jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx|   26 +++-
 lotuswordpro/source/filter/lwpgrfobj.cxx|8 ++
 lotuswordpro/source/filter/lwpobjstrm.cxx   |9 ++
 lotuswordpro/source/filter/lwpobjstrm.hxx   |1 
 sc/source/core/data/grouptokenconverter.cxx |4 +
 sc/source/core/tool/interpr4.cxx|6 +
 sc/source/filter/oox/condformatcontext.cxx  |4 -
 sc/source/ui/view/cellsh1.cxx   |1 
 svl/source/numbers/zformat.cxx  |   13 +++-
 svl/source/numbers/zforscan.cxx |   33 +-
 sw/source/uibase/dbui/dbmgr.cxx |7 +-
 vcl/source/window/menu.cxx  |   11 ++-
 vcl/unx/gtk/gtksalmenu.cxx  |   28 +++-
 vcl/unx/gtk3/gtk3gtkframe.cxx   |2 
 24 files changed, 213 insertions(+), 99 deletions(-)

New commits:
commit 2f8b1a85a9803b94b57b5671beb70d8252f5c532
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Sun Mar 12 23:33:24 2017 +0100

Following tdf#106190 Treat blank after fraction bar

To consider that denominator is found (bDenom=true)
there must be some digits found after fraction bar

Dummy format # ?/ ? can now work again (even with
blank as thousands delimiter).
However such format can not be saved (except in XLS)

Change-Id: I657e97e09a6ae4c08a29ad6d0b586c85a9968e3d
Reviewed-on: https://gerrit.libreoffice.org/35111
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Eike Rathke <er...@redhat.com>
(cherry picked from commit 4e1448d43e08d3f0a6ff67e75346e9559ad2af09)
Reviewed-on: https://gerrit.libreoffice.org/35196
(cherry picked from commit f1a108f4dfd3d82dd39a9606f54a25a076ac516d)

diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index be19e338d2a1..ac622bf4cc45 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -2212,7 +2212,8 @@ OUString lcl_GetDenominatorString(const 
ImpSvNumberformatInfo , sal_uInt16
 {
 if( rInfo.nTypeArray[i] == NF_SYMBOLTYPE_FRAC )
 {
-for( i++; i < nAnz; i++ )
+while ( ( ++i < nAnz ) && rInfo.nTypeArray[i] == 
NF_SYMBOLTYPE_STRING );
+for( ; i < nAnz; i++ )
 {
 if( rInfo.nTypeArray[i] == NF_SYMBOLTYPE_FRAC_FDIV || 
rInfo.nTypeArray[i] == NF_SYMBOLTYPE_DIGIT )
 aDenominatorString.append( rInfo.sStrArray[i] );
diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx
index 1cceda79d3ad..363a6219137e 100644
--- a/svl/source/numbers/zforscan.cxx
+++ b/svl/source/numbers/zforscan.cxx
@@ -1670,7 +1670,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& 
rString )
 }
 else if ( sStrArray[i][0] == ' ' )
 nTypeArray[i] = NF_SYMBOLTYPE_FRACBLANK;
-else if ( bFrac )
+else if ( bFrac && ( nCounter > 0 ) )
 bDenomin = true; // following elements are no more 
part of denominator
 }
 else if (nTypeArray[i] == NF_KEY_THAI_T)
@@ -1714,7 +1714,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& 
rString )
 }
 else
 {
-if ( bFrac )
+if ( bFrac && ( nCounter > 0 ) )
 bDenomin = true;// next content should be treated 
as outside denominator
 nTypeArray[i] = NF_SYMBOLTYPE_STRING;
 }
@@ -1834,7 +1834,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& 
rString )
 else
 {
 nTypeArray[i] = NF_SYMBOLTYPE_STRING;
-if ( bFrac )
+if ( bFrac && (nCounter > 0) )
 bDenomin = true; // end of denominator
 }
 }
@@ -2002,7 +2002,7 @@ sal_Int32 ImpSvNumberformatScan::Fin

[Libreoffice-commits] core.git: sc/qa

2017-03-14 Thread Laurent Balland-Poirier
 sc/qa/unit/ucalc.cxx |   15 +--
 1 file changed, 9 insertions(+), 6 deletions(-)

New commits:
commit 152e9869f8c32fb2c353bfae22db214eba342507
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Sun Mar 12 15:17:30 2017 +0100

tdf#106253 Test Precision as shown for thousand separators

Change-Id: I2e07667884d072a875b7bf5e5c7cf4c3e5d98332
Reviewed-on: https://gerrit.libreoffice.org/35098
Reviewed-by: Eike Rathke <er...@redhat.com>
Tested-by: Jenkins <c...@libreoffice.org>

diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 86aa877..13d163e 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -6780,14 +6780,17 @@ void Test::testPrecisionAsShown()
 checkPrecisionAsShown( aCode,  fValue,  fExpectedRoundVal );
 checkPrecisionAsShown( aCode, -fValue, -fExpectedRoundVal );
 }
-{   // thousand rounding bogus tdf#106253
+{   // thousand rounding tdf#106253
 aCode = "0,,";
 fValue = 4.0e9 / 7.0;
-fExpectedRoundVal = 571e6; // actual is 571428571
-//checkPrecisionAsShown( aCode, fValue, fExpectedRoundVal );
-fValue = -4.0e8 / 7.0;
-fExpectedRoundVal = -57e6; // actual is 57142857
-//checkPrecisionAsShown( aCode, fValue, fExpectedRoundVal );
+fExpectedRoundVal = 571e6;
+checkPrecisionAsShown( aCode,  fValue,  fExpectedRoundVal );
+checkPrecisionAsShown( aCode, -fValue, -fExpectedRoundVal );
+aCode = "\"k\"[$$-409]* #,;[RED]-\"k\"[$$-409]* #,";
+fValue = 4.0e8 / 7.0;
+fExpectedRoundVal = 57.143e6;
+checkPrecisionAsShown( aCode,  fValue,  fExpectedRoundVal );
+checkPrecisionAsShown( aCode, -fValue, -fExpectedRoundVal );
 }
 {   // percent rounding
 aCode = "0.00%";
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - svl/source

2017-03-14 Thread Laurent Balland-Poirier
 svl/source/numbers/zformat.cxx  |3 ++-
 svl/source/numbers/zforscan.cxx |   10 +-
 2 files changed, 7 insertions(+), 6 deletions(-)

New commits:
commit f1a108f4dfd3d82dd39a9606f54a25a076ac516d
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Sun Mar 12 23:33:24 2017 +0100

Following tdf#106190 Treat blank after fraction bar

To consider that denominator is found (bDenom=true)
there must be some digits found after fraction bar

Dummy format # ?/ ? can now work again (even with
blank as thousands delimiter).
However such format can not be saved (except in XLS)

Change-Id: I657e97e09a6ae4c08a29ad6d0b586c85a9968e3d
Reviewed-on: https://gerrit.libreoffice.org/35111
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Eike Rathke <er...@redhat.com>
(cherry picked from commit 4e1448d43e08d3f0a6ff67e75346e9559ad2af09)
Reviewed-on: https://gerrit.libreoffice.org/35196

diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index be19e33..ac622bf 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -2212,7 +2212,8 @@ OUString lcl_GetDenominatorString(const 
ImpSvNumberformatInfo , sal_uInt16
 {
 if( rInfo.nTypeArray[i] == NF_SYMBOLTYPE_FRAC )
 {
-for( i++; i < nAnz; i++ )
+while ( ( ++i < nAnz ) && rInfo.nTypeArray[i] == 
NF_SYMBOLTYPE_STRING );
+for( ; i < nAnz; i++ )
 {
 if( rInfo.nTypeArray[i] == NF_SYMBOLTYPE_FRAC_FDIV || 
rInfo.nTypeArray[i] == NF_SYMBOLTYPE_DIGIT )
 aDenominatorString.append( rInfo.sStrArray[i] );
diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx
index 1cceda7..363a621 100644
--- a/svl/source/numbers/zforscan.cxx
+++ b/svl/source/numbers/zforscan.cxx
@@ -1670,7 +1670,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& 
rString )
 }
 else if ( sStrArray[i][0] == ' ' )
 nTypeArray[i] = NF_SYMBOLTYPE_FRACBLANK;
-else if ( bFrac )
+else if ( bFrac && ( nCounter > 0 ) )
 bDenomin = true; // following elements are no more 
part of denominator
 }
 else if (nTypeArray[i] == NF_KEY_THAI_T)
@@ -1714,7 +1714,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& 
rString )
 }
 else
 {
-if ( bFrac )
+if ( bFrac && ( nCounter > 0 ) )
 bDenomin = true;// next content should be treated 
as outside denominator
 nTypeArray[i] = NF_SYMBOLTYPE_STRING;
 }
@@ -1834,7 +1834,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& 
rString )
 else
 {
 nTypeArray[i] = NF_SYMBOLTYPE_STRING;
-if ( bFrac )
+if ( bFrac && (nCounter > 0) )
 bDenomin = true; // end of denominator
 }
 }
@@ -2002,7 +2002,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& 
rString )
 nCntPre = nCounter;
 nCounter = 0;
 }
-if ( bFrac )
+if ( bFrac && (nCounter > 0) )
 bDenomin = true; // next content is not part 
of denominator
 nTypeArray[i] = NF_SYMBOLTYPE_STRING;
 nPos = nPos + sStrArray[i].getLength();
@@ -2010,7 +2010,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& 
rString )
 else
 {
 nTypeArray[i] = NF_SYMBOLTYPE_STRING;
-if ( bFrac )
+if ( bFrac && (nCounter > 0) )
 bDenomin = true; // next content is not part 
of denominator
 nPos = nPos + rStr.getLength();
 i++;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/svl sc/source

2017-03-14 Thread Laurent Balland-Poirier
 include/svl/zformat.hxx  |6 ++
 sc/source/core/data/documen4.cxx |6 ++
 2 files changed, 12 insertions(+)

New commits:
commit 60d7644a46970e6eaee882e0c5d65692da206c24
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Sun Mar 12 14:11:36 2017 +0100

tdf#106253 Precision as shown for thousand dividor

Info().nThousand contains number of thousands dividors
after which digits are not displayed, i.e. 12345 is displayed
as 12 with format 0, (in en_US)

Change-Id: Ifa5540f2efd8ab006a07eade53f7aa0d31a19eac
Reviewed-on: https://gerrit.libreoffice.org/35097
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Eike Rathke <er...@redhat.com>

diff --git a/include/svl/zformat.hxx b/include/svl/zformat.hxx
index 1dd05d2..2f382d8 100644
--- a/include/svl/zformat.hxx
+++ b/include/svl/zformat.hxx
@@ -226,6 +226,12 @@ public:
 sal_uInt16 GetFormatIntegerDigits( sal_uInt16 nIx = 0 ) const
 { return NumFor[nIx].Info().nCntPre; }
 
+/** Count of hidden integer digits with thousands dividor:
+ * formats like "0," to show only thousands
+ */
+sal_uInt16 GetThousandDivisorPrecision( sal_uInt16 nIx = 0 ) const
+{ return NumFor[nIx].Info().nThousand * 3; }
+
 //! Read/write access on a special sal_uInt16 component, may only be used 
on the
 //! standard format 0, 1, ... and only by the number formatter!
 struct FormatterPrivateAccess { friend SvNumberFormatter; private: 
FormatterPrivateAccess() {} };
diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx
index 6bb280b..1cdc777 100644
--- a/sc/source/core/data/documen4.cxx
+++ b/sc/source/core/data/documen4.cxx
@@ -692,6 +692,12 @@ double ScDocument::RoundValueAsShown( double fVal, 
sal_uInt32 nFormat ) const
 {
 return pFormat->GetRoundFractionValue( fVal );
 }
+case css::util::NumberFormat::NUMBER:
+case css::util::NumberFormat::CURRENCY:
+{   // tdf#106253 Thousands dividors for format "0,"
+nPrecision -=  pFormat->GetThousandDivisorPrecision( nIdx 
);
+break;
+}
 }
 }
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-14 Thread Laurent Balland-Poirier
 svl/source/numbers/zformat.cxx  |3 ++-
 svl/source/numbers/zforscan.cxx |   10 +-
 2 files changed, 7 insertions(+), 6 deletions(-)

New commits:
commit 4e1448d43e08d3f0a6ff67e75346e9559ad2af09
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Sun Mar 12 23:33:24 2017 +0100

Following tdf#106190 Treat blank after fraction bar

To consider that denominator is found (bDenom=true)
there must be some digits found after fraction bar

Dummy format # ?/ ? can now work again (even with
blank as thousands delimiter).
However such format can not be saved (except in XLS)

Change-Id: I657e97e09a6ae4c08a29ad6d0b586c85a9968e3d
Reviewed-on: https://gerrit.libreoffice.org/35111
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Eike Rathke <er...@redhat.com>

diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 4bd1a9e..2d1f874 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -2212,7 +2212,8 @@ OUString lcl_GetDenominatorString(const 
ImpSvNumberformatInfo , sal_uInt16
 {
 if( rInfo.nTypeArray[i] == NF_SYMBOLTYPE_FRAC )
 {
-for( i++; i < nAnz; i++ )
+while ( ( ++i < nAnz ) && rInfo.nTypeArray[i] == 
NF_SYMBOLTYPE_STRING );
+for( ; i < nAnz; i++ )
 {
 if( rInfo.nTypeArray[i] == NF_SYMBOLTYPE_FRAC_FDIV || 
rInfo.nTypeArray[i] == NF_SYMBOLTYPE_DIGIT )
 aDenominatorString.append( rInfo.sStrArray[i] );
diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx
index 5644c2b..788cd42 100644
--- a/svl/source/numbers/zforscan.cxx
+++ b/svl/source/numbers/zforscan.cxx
@@ -1670,7 +1670,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& 
rString )
 }
 else if ( sStrArray[i][0] == ' ' )
 nTypeArray[i] = NF_SYMBOLTYPE_FRACBLANK;
-else if ( bFrac )
+else if ( bFrac && ( nCounter > 0 ) )
 bDenomin = true; // following elements are no more 
part of denominator
 }
 else if (nTypeArray[i] == NF_KEY_THAI_T)
@@ -1714,7 +1714,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& 
rString )
 }
 else
 {
-if ( bFrac )
+if ( bFrac && ( nCounter > 0 ) )
 bDenomin = true;// next content should be treated 
as outside denominator
 nTypeArray[i] = NF_SYMBOLTYPE_STRING;
 }
@@ -1834,7 +1834,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& 
rString )
 else
 {
 nTypeArray[i] = NF_SYMBOLTYPE_STRING;
-if ( bFrac )
+if ( bFrac && (nCounter > 0) )
 bDenomin = true; // end of denominator
 }
 }
@@ -2002,7 +2002,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& 
rString )
 nCntPre = nCounter;
 nCounter = 0;
 }
-if ( bFrac )
+if ( bFrac && (nCounter > 0) )
 bDenomin = true; // next content is not part 
of denominator
 nTypeArray[i] = NF_SYMBOLTYPE_STRING;
 nPos = nPos + sStrArray[i].getLength();
@@ -2010,7 +2010,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& 
rString )
 else
 {
 nTypeArray[i] = NF_SYMBOLTYPE_STRING;
-if ( bFrac )
+if ( bFrac && (nCounter > 0) )
 bDenomin = true; // next content is not part 
of denominator
 nPos = nPos + rStr.getLength();
 i++;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/svl sc/qa sc/source

2017-03-14 Thread Laurent Balland-Poirier
 include/svl/zformat.hxx  |3 -
 sc/qa/unit/ucalc.cxx |  103 +--
 sc/source/core/data/documen4.cxx |   20 ++-
 3 files changed, 97 insertions(+), 29 deletions(-)

New commits:
commit 5f2db66ad0de6fbbae309850516e17eaa17934cb
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Fri Mar 3 21:51:26 2017 +0100

tdf#106252 Engineering notation for Precision as shown

with more tests

Change-Id: Ifc77b847af4eaaa3c85e904e46c2663b6d768241
Reviewed-on: https://gerrit.libreoffice.org/35089
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Eike Rathke <er...@redhat.com>

diff --git a/include/svl/zformat.hxx b/include/svl/zformat.hxx
index 85250ac..1dd05d2 100644
--- a/include/svl/zformat.hxx
+++ b/include/svl/zformat.hxx
@@ -223,7 +223,8 @@ public:
 { return NumFor[nIx].Info().nCntPost; }
 
 /// Count of integer digits
-sal_uInt16 GetFormatIntegerDigits() const { return 
NumFor[0].Info().nCntPre; }
+sal_uInt16 GetFormatIntegerDigits( sal_uInt16 nIx = 0 ) const
+{ return NumFor[nIx].Info().nCntPre; }
 
 //! Read/write access on a special sal_uInt16 component, may only be used 
on the
 //! standard format 0, 1, ... and only by the number formatter!
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 9a51d92..86aa877 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -6773,10 +6773,12 @@ void Test::testPrecisionAsShown()
 aCode = "0.00";
 fValue = 1.0/3.0;
 fExpectedRoundVal = 0.33;
-checkPrecisionAsShown( aCode, fValue, fExpectedRoundVal );
-fValue = -10.001;
-fExpectedRoundVal = -10.0;
-checkPrecisionAsShown( aCode, fValue, fExpectedRoundVal );
+checkPrecisionAsShown( aCode,  fValue,  fExpectedRoundVal );
+checkPrecisionAsShown( aCode, -fValue, -fExpectedRoundVal );
+fValue = 10.001;
+fExpectedRoundVal = 10.0;
+checkPrecisionAsShown( aCode,  fValue,  fExpectedRoundVal );
+checkPrecisionAsShown( aCode, -fValue, -fExpectedRoundVal );
 }
 {   // thousand rounding bogus tdf#106253
 aCode = "0,,";
@@ -6791,54 +6793,105 @@ void Test::testPrecisionAsShown()
 aCode = "0.00%";
 fValue = 4.0 / 7.0;
 fExpectedRoundVal = 0.5714;
-checkPrecisionAsShown( aCode, fValue, fExpectedRoundVal );
-fValue = -4.0 / 7.0;
-fExpectedRoundVal = -0.5714;
-checkPrecisionAsShown( aCode, fValue, fExpectedRoundVal );
+checkPrecisionAsShown( aCode,  fValue,  fExpectedRoundVal );
+checkPrecisionAsShown( aCode, -fValue, -fExpectedRoundVal );
+fValue = 40.0 / 7.0;
+fExpectedRoundVal = 5.7143;
+checkPrecisionAsShown( aCode,  fValue,  fExpectedRoundVal );
+checkPrecisionAsShown( aCode, -fValue, -fExpectedRoundVal );
 }
 {   // scientific rounding
 aCode = "0.00E0";
 fValue = 40.0 / 7.0;
 fExpectedRoundVal = 57100.0;
-checkPrecisionAsShown( aCode, fValue, fExpectedRoundVal );
+checkPrecisionAsShown( aCode,  fValue,  fExpectedRoundVal );
+checkPrecisionAsShown( aCode, -fValue, -fExpectedRoundVal );
 fValue = 4.0 / 7.0;
 fExpectedRoundVal = 5.71e-5;
-checkPrecisionAsShown( aCode, fValue, fExpectedRoundVal );
-// engineering rounding bogus!!! tdf#106252
+checkPrecisionAsShown( aCode,  fValue,  fExpectedRoundVal );
+checkPrecisionAsShown( aCode, -fValue, -fExpectedRoundVal );
+// engineering rounding tdf#106252
 aCode = "##0.000E0";
 fValue = 40.0 / 7.0;
-fExpectedRoundVal = 57143.0; // actual is 57140
-//checkPrecisionAsShown( aCode, fValue, fExpectedRoundVal );
+fExpectedRoundVal = 57.143e3;
+checkPrecisionAsShown( aCode,  fValue,  fExpectedRoundVal );
+checkPrecisionAsShown( aCode, -fValue, -fExpectedRoundVal );
+fValue = 400.0 / 7.0;
+fExpectedRoundVal = 571.429e3;
+checkPrecisionAsShown( aCode,  fValue,  fExpectedRoundVal );
+checkPrecisionAsShown( aCode, -fValue, -fExpectedRoundVal );
+fValue = 4000.0 / 7.0;
+fExpectedRoundVal = 5.714e6;
+checkPrecisionAsShown( aCode,  fValue,  fExpectedRoundVal );
+checkPrecisionAsShown( aCode, -fValue, -fExpectedRoundVal );
 fValue = 4.0 / 7.0;
-fExpectedRoundVal = 5.7143e-5; // actual is 5.714e-05
-//checkPrecisionAsShown( aCode, fValue, fExpectedRoundVal );
+fExpectedRoundVal = 57.143e-6;
+checkPrecisionAsShown( aCode,  fValue,  fExpectedRoundVal );
+checkPrecisionAsShown( aCode, -fValue, -fExpectedRoundVal );
+fValue = 4.0 / 7000.0;
+fExpectedRoundVal = 571.429e-6;
+checkPrecisionAsShown( aCode,  fValue, 

[Libreoffice-commits] core.git: Branch 'libreoffice-5-3-1' - svl/source

2017-03-07 Thread Laurent Balland-Poirier
 svl/source/numbers/zformat.cxx  |4 +--
 svl/source/numbers/zforscan.cxx |   43 +---
 svl/source/numbers/zforscan.hxx |1 
 3 files changed, 35 insertions(+), 13 deletions(-)

New commits:
commit 8eb29021352dd7d92f3fa225e18a85cd780e04db
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Sun Feb 26 19:40:30 2017 +0100

tdf#106190 fix left alignment of denominator

The bug was introduced with left aligment of denominator.
Non feasable denominators were not tested and create infinite loop
while inserting and removing the same space.

This patch detects
- if denominator starts just after fraction bar.
  Otherwise, format is faulty.
- if a non digit is detected in the denominator,
  next part of format is treated as text
This patch is changing behavior of some formats:
"# ?/foo??" is treated as faulty format while it was considered as valid
"# ?/??E?" is treated with 2 digits in denominator and "E?" at the end,
 while it was considered as faulty

Change-Id: I0379a398dff79b6e21a44776c0d4356d066cdeab
Reviewed-on: https://gerrit.libreoffice.org/34659
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Eike Rathke <er...@redhat.com>
(cherry picked from commit b2738c6f67cb650ac32228f3cd20b9dfe4b41c9c)
Reviewed-on: https://gerrit.libreoffice.org/34826
Reviewed-by: Michael Stahl <mst...@redhat.com>
Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
Tested-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>

diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index ac0c608..09e024e 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -2815,9 +2815,9 @@ bool SvNumberformat::ImpGetFractionOutput(double fNumber,
 sal_Int32 k;   // Denominator
 
 bRes |= ImpNumberFill(sDiv, fNumber, k, j, nIx, NF_SYMBOLTYPE_FRAC);
-if ( !bHideFraction )
+if ( !bHideFraction &&  sDenominatorFormat.getLength() > 0 )
 {
-while ( sDiv[0] == ' ' )
+while ( sDiv[0] == ' ' ) // left align denominator
 {
 sDiv.insert( sDenominatorFormat.getLength(), " " );
 sDiv.remove( 0, 1 );
diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx
index 0542cf3..5529dcc 100644
--- a/svl/source/numbers/zforscan.cxx
+++ b/svl/source/numbers/zforscan.cxx
@@ -1079,6 +1079,7 @@ void ImpSvNumberformatScan::Reset()
 nCntExp = 0;
 bFrac = false;
 bBlank = false;
+bDenomin = false;
 nNatNumModifier = 0;
 }
 
@@ -1666,6 +1667,8 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& 
rString )
 }
 else if ( sStrArray[i][0] == ' ' )
 nTypeArray[i] = NF_SYMBOLTYPE_FRACBLANK;
+else if ( bFrac )
+bDenomin = true; // following elements are no more 
part of denominator
 }
 else if (nTypeArray[i] == NF_KEY_THAI_T)
 {
@@ -1673,7 +1676,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& 
rString )
 sStrArray[i] = sKeyword[nTypeArray[i]];
 }
 else if (sStrArray[i][0] >= '0' &&
- sStrArray[i][0] <= '9')
+ sStrArray[i][0] <= '9' && !bDenomin) // denominator 
was not yet found
 {
 OUString sDiv;
 sal_uInt16 j = i;
@@ -1702,10 +1705,14 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& 
rString )
 {
 nCntPre++;
 }
+if ( bFrac )
+bDenomin = true; // next content should be treated 
as outside denominator
 }
 }
 else
 {
+if ( bFrac )
+bDenomin = true;// next content should be treated 
as outside denominator
 nTypeArray[i] = NF_SYMBOLTYPE_STRING;
 }
 nPos = nPos + sStrArray[i].getLength();
@@ -1741,19 +1748,27 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& 
rString )
 {
 return nPos;// Error
 }
-nTypeArray[i] = NF_SYMBOLTYPE_DIGIT;
-nPos = nPos + rStr.getLength();
-i++;
-nCounter++;
-while (i < nAnzStrings &&
-   (sStrArray[i][0] == '#' ||
-sStrArray[i][0] == '0' ||
-sStrArray[i][0] == '?'))
+

[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - svl/source

2017-03-06 Thread Laurent Balland-Poirier
 svl/source/numbers/zforscan.cxx |2 +-
 svl/source/numbers/zforscan.hxx |1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 439c820e873b6f6c1c9ce189d05ea7426c102b46
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Mon Mar 6 06:47:32 2017 +0100

tdf#106190 Move meber variable to local

Update b2738c6f67cb650ac32228f3cd20b9dfe4b41c9c

Change-Id: I8417dcf948e72376c7e67bee78df56c3021b55de
Reviewed-on: https://gerrit.libreoffice.org/34913
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Eike Rathke <er...@redhat.com>
(cherry picked from commit 90cf564324ed9421f52742a0955bacab9407a872)
Reviewed-on: https://gerrit.libreoffice.org/34921

diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx
index 5529dcc..34137cb 100644
--- a/svl/source/numbers/zforscan.cxx
+++ b/svl/source/numbers/zforscan.cxx
@@ -1079,7 +1079,6 @@ void ImpSvNumberformatScan::Reset()
 nCntExp = 0;
 bFrac = false;
 bBlank = false;
-bDenomin = false;
 nNatNumModifier = 0;
 }
 
@@ -1562,6 +1561,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& 
rString )
 bDecSep = false;   // reset in case already used in 
TypeCheck
 bool bThaiT = false;   // Thai T NatNum modifier present
 bool bTimePart = false;
+bool bDenomin = false; // Set when reading end of 
denominator
 
 switch (eScannedType)
 {
diff --git a/svl/source/numbers/zforscan.hxx b/svl/source/numbers/zforscan.hxx
index e0cec64..001abe6 100644
--- a/svl/source/numbers/zforscan.hxx
+++ b/svl/source/numbers/zforscan.hxx
@@ -174,7 +174,6 @@ private: // Private section
 bool bExp;  // Set when reading E
 bool bFrac; // Set when reading /
 bool bBlank;// Set when reading ' ' 
(Fraction)
-bool bDenomin;  // Set when reading end of 
denominator
 bool bDecSep;   // Set on first ,
 mutable bool bKeywordsNeedInit; // Locale dependent keywords 
need to be initialized
 mutable bool bCompatCurNeedInit;// Locale dependent 
compatibility currency need to be initialized
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-06 Thread Laurent Balland-Poirier
 svl/source/numbers/zforscan.cxx |2 +-
 svl/source/numbers/zforscan.hxx |1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 90cf564324ed9421f52742a0955bacab9407a872
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Mon Mar 6 06:47:32 2017 +0100

tdf#106190 Move meber variable to local

Update b2738c6f67cb650ac32228f3cd20b9dfe4b41c9c

Change-Id: I8417dcf948e72376c7e67bee78df56c3021b55de
Reviewed-on: https://gerrit.libreoffice.org/34913
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Eike Rathke <er...@redhat.com>

diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx
index 485ec405..7dbbb99 100644
--- a/svl/source/numbers/zforscan.cxx
+++ b/svl/source/numbers/zforscan.cxx
@@ -1079,7 +1079,6 @@ void ImpSvNumberformatScan::Reset()
 nCntExp = 0;
 bFrac = false;
 bBlank = false;
-bDenomin = false;
 nNatNumModifier = 0;
 }
 
@@ -1562,6 +1561,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& 
rString )
 bDecSep = false;   // reset in case already used in 
TypeCheck
 bool bThaiT = false;   // Thai T NatNum modifier present
 bool bTimePart = false;
+bool bDenomin = false; // Set when reading end of 
denominator
 
 switch (eScannedType)
 {
diff --git a/svl/source/numbers/zforscan.hxx b/svl/source/numbers/zforscan.hxx
index 62a6629..30fc838 100644
--- a/svl/source/numbers/zforscan.hxx
+++ b/svl/source/numbers/zforscan.hxx
@@ -174,7 +174,6 @@ private: // Private section
 bool bExp;  // Set when reading E
 bool bFrac; // Set when reading /
 bool bBlank;// Set when reading ' ' 
(Fraction)
-bool bDenomin;  // Set when reading end of 
denominator
 bool bDecSep;   // Set on first ,
 mutable bool bKeywordsNeedInit; // Locale dependent keywords 
need to be initialized
 mutable bool bCompatCurNeedInit;// Locale dependent 
compatibility currency need to be initialized
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - svl/source

2017-03-02 Thread Laurent Balland-Poirier
 svl/source/numbers/zformat.cxx  |4 +--
 svl/source/numbers/zforscan.cxx |   43 +---
 svl/source/numbers/zforscan.hxx |1 
 3 files changed, 35 insertions(+), 13 deletions(-)

New commits:
commit 5be9863007d28ce543b0030ffef4c7d955a8e283
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Sun Feb 26 19:40:30 2017 +0100

tdf#106190 fix left alignment of denominator

The bug was introduced with left aligment of denominator.
Non feasable denominators were not tested and create infinite loop
while inserting and removing the same space.

This patch detects
- if denominator starts just after fraction bar.
  Otherwise, format is faulty.
- if a non digit is detected in the denominator,
  next part of format is treated as text
This patch is changing behavior of some formats:
"# ?/foo??" is treated as faulty format while it was considered as valid
"# ?/??E?" is treated with 2 digits in denominator and "E?" at the end,
 while it was considered as faulty

Change-Id: I0379a398dff79b6e21a44776c0d4356d066cdeab
Reviewed-on: https://gerrit.libreoffice.org/34659
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Eike Rathke <er...@redhat.com>
(cherry picked from commit b2738c6f67cb650ac32228f3cd20b9dfe4b41c9c)
Reviewed-on: https://gerrit.libreoffice.org/34825

diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index ac0c608..09e024e 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -2815,9 +2815,9 @@ bool SvNumberformat::ImpGetFractionOutput(double fNumber,
 sal_Int32 k;   // Denominator
 
 bRes |= ImpNumberFill(sDiv, fNumber, k, j, nIx, NF_SYMBOLTYPE_FRAC);
-if ( !bHideFraction )
+if ( !bHideFraction &&  sDenominatorFormat.getLength() > 0 )
 {
-while ( sDiv[0] == ' ' )
+while ( sDiv[0] == ' ' ) // left align denominator
 {
 sDiv.insert( sDenominatorFormat.getLength(), " " );
 sDiv.remove( 0, 1 );
diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx
index 0542cf3..5529dcc 100644
--- a/svl/source/numbers/zforscan.cxx
+++ b/svl/source/numbers/zforscan.cxx
@@ -1079,6 +1079,7 @@ void ImpSvNumberformatScan::Reset()
 nCntExp = 0;
 bFrac = false;
 bBlank = false;
+bDenomin = false;
 nNatNumModifier = 0;
 }
 
@@ -1666,6 +1667,8 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& 
rString )
 }
 else if ( sStrArray[i][0] == ' ' )
 nTypeArray[i] = NF_SYMBOLTYPE_FRACBLANK;
+else if ( bFrac )
+bDenomin = true; // following elements are no more 
part of denominator
 }
 else if (nTypeArray[i] == NF_KEY_THAI_T)
 {
@@ -1673,7 +1676,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& 
rString )
 sStrArray[i] = sKeyword[nTypeArray[i]];
 }
 else if (sStrArray[i][0] >= '0' &&
- sStrArray[i][0] <= '9')
+ sStrArray[i][0] <= '9' && !bDenomin) // denominator 
was not yet found
 {
 OUString sDiv;
 sal_uInt16 j = i;
@@ -1702,10 +1705,14 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& 
rString )
 {
 nCntPre++;
 }
+if ( bFrac )
+bDenomin = true; // next content should be treated 
as outside denominator
 }
 }
 else
 {
+if ( bFrac )
+bDenomin = true;// next content should be treated 
as outside denominator
 nTypeArray[i] = NF_SYMBOLTYPE_STRING;
 }
 nPos = nPos + sStrArray[i].getLength();
@@ -1741,19 +1748,27 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& 
rString )
 {
 return nPos;// Error
 }
-nTypeArray[i] = NF_SYMBOLTYPE_DIGIT;
-nPos = nPos + rStr.getLength();
-i++;
-nCounter++;
-while (i < nAnzStrings &&
-   (sStrArray[i][0] == '#' ||
-sStrArray[i][0] == '0' ||
-sStrArray[i][0] == '?'))
+if ( !bDenomin )
 {
 nTypeArray[i] = NF_SYMBOLTYPE_DIGIT;
-nPos = nPos + sStrArray[i].getLength();
-nCounter++;

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

2017-03-02 Thread Laurent Balland-Poirier
 svl/source/numbers/zformat.cxx  |4 +--
 svl/source/numbers/zforscan.cxx |   43 +---
 svl/source/numbers/zforscan.hxx |1 
 3 files changed, 35 insertions(+), 13 deletions(-)

New commits:
commit b2738c6f67cb650ac32228f3cd20b9dfe4b41c9c
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Sun Feb 26 19:40:30 2017 +0100

tdf#106190 fix left alignment of denominator

The bug was introduced with left aligment of denominator.
Non feasable denominators were not tested and create infinite loop
while inserting and removing the same space.

This patch detects
- if denominator starts just after fraction bar.
  Otherwise, format is faulty.
- if a non digit is detected in the denominator,
  next part of format is treated as text
This patch is changing behavior of some formats:
"# ?/foo??" is treated as faulty format while it was considered as valid
"# ?/??E?" is treated with 2 digits in denominator and "E?" at the end,
 while it was considered as faulty

Change-Id: I0379a398dff79b6e21a44776c0d4356d066cdeab
Reviewed-on: https://gerrit.libreoffice.org/34659
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Eike Rathke <er...@redhat.com>

diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 5d5349e..1de8ffc 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -2836,9 +2836,9 @@ bool SvNumberformat::ImpGetFractionOutput(double fNumber,
 sal_Int32 k;   // Denominator
 
 bRes |= ImpNumberFill(sDiv, fNumber, k, j, nIx, NF_SYMBOLTYPE_FRAC);
-if ( !bHideFraction )
+if ( !bHideFraction &&  sDenominatorFormat.getLength() > 0 )
 {
-while ( sDiv[0] == ' ' )
+while ( sDiv[0] == ' ' ) // left align denominator
 {
 sDiv.insert( sDenominatorFormat.getLength(), " " );
 sDiv.remove( 0, 1 );
diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx
index 6b20938..485ec405 100644
--- a/svl/source/numbers/zforscan.cxx
+++ b/svl/source/numbers/zforscan.cxx
@@ -1079,6 +1079,7 @@ void ImpSvNumberformatScan::Reset()
 nCntExp = 0;
 bFrac = false;
 bBlank = false;
+bDenomin = false;
 nNatNumModifier = 0;
 }
 
@@ -1666,6 +1667,8 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& 
rString )
 }
 else if ( sStrArray[i][0] == ' ' )
 nTypeArray[i] = NF_SYMBOLTYPE_FRACBLANK;
+else if ( bFrac )
+bDenomin = true; // following elements are no more 
part of denominator
 }
 else if (nTypeArray[i] == NF_KEY_THAI_T)
 {
@@ -1673,7 +1676,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& 
rString )
 sStrArray[i] = sKeyword[nTypeArray[i]];
 }
 else if (sStrArray[i][0] >= '0' &&
- sStrArray[i][0] <= '9')
+ sStrArray[i][0] <= '9' && !bDenomin) // denominator 
was not yet found
 {
 OUString sDiv;
 sal_uInt16 j = i;
@@ -1702,10 +1705,14 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& 
rString )
 {
 nCntPre++;
 }
+if ( bFrac )
+bDenomin = true; // next content should be treated 
as outside denominator
 }
 }
 else
 {
+if ( bFrac )
+bDenomin = true;// next content should be treated 
as outside denominator
 nTypeArray[i] = NF_SYMBOLTYPE_STRING;
 }
 nPos = nPos + sStrArray[i].getLength();
@@ -1741,19 +1748,27 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& 
rString )
 {
 return nPos;// Error
 }
-nTypeArray[i] = NF_SYMBOLTYPE_DIGIT;
-nPos = nPos + rStr.getLength();
-i++;
-nCounter++;
-while (i < nAnzStrings &&
-   (sStrArray[i][0] == '#' ||
-sStrArray[i][0] == '0' ||
-sStrArray[i][0] == '?'))
+if ( !bDenomin )
 {
 nTypeArray[i] = NF_SYMBOLTYPE_DIGIT;
-nPos = nPos + sStrArray[i].getLength();
-nCounter++;
+nPos = nPos + rStr.getLength();
 i++;
+

[Libreoffice-commits] core.git: sc/qa

2017-03-02 Thread Laurent Balland-Poirier
 sc/qa/unit/ucalc.cxx |  103 +++
 sc/qa/unit/ucalc.hxx |4 +
 2 files changed, 107 insertions(+)

New commits:
commit 7496f7d3cae8a932dc43ede8a30a99289366a264
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Wed Mar 1 08:56:58 2017 +0100

Tests for "Precision as shown" following tdf#105657 tdf#106052

I was unabled to add these test svl/qa/unit/svl.cxx because
they required ScDocument::RoundValueAsShown()

Found that other formats are not supported by
"Precision as shown" option:
- engineering tdf#106252
- thousand tdf#106253

Change-Id: Iaf98c404cabec0f5c69f94f2bf863351487fe9d7
Reviewed-on: https://gerrit.libreoffice.org/34750
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Eike Rathke <er...@redhat.com>

diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index cf0e984..9e52977 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -6660,6 +6660,109 @@ void Test::setCalcAsShown(ScDocument* pDoc, bool 
bCalcAsShown)
 pDoc->SetDocOptions(aOpt);
 }
 
+void Test::checkPrecisionAsShown( OUString& rCode, double fValue, double 
fExpectedRoundVal )
+{
+SvNumberFormatter* pFormatter = m_pDoc->GetFormatTable();
+sal_uInt32 nFormat = pFormatter->GetEntryKey( rCode );
+if ( nFormat == NUMBERFORMAT_ENTRY_NOT_FOUND )
+{
+sal_Int32 nCheckPos = 0;
+short nType;
+pFormatter->PutEntry( rCode, nCheckPos, nType, nFormat );
+CPPUNIT_ASSERT_EQUAL( nCheckPos, sal_Int32(0) );
+}
+double fRoundValue = m_pDoc->RoundValueAsShown( fValue, nFormat );
+rtl::OString aMessage = "Format \"";
+aMessage += rtl::OUStringToOString( rCode, RTL_TEXTENCODING_ASCII_US );
+aMessage += "\" is not correctly rounded";
+CPPUNIT_ASSERT_EQUAL_MESSAGE( aMessage.getStr(), fExpectedRoundVal, 
fRoundValue );
+}
+
+void Test::testPrecisionAsShown()
+{
+m_pDoc->InsertTab(0, "Test");
+
+// Turn on "precision as shown" option.
+setCalcAsShown( m_pDoc, true);
+
+OUString aCode;
+double fValue, fExpectedRoundVal;
+{   // decimal rounding
+aCode = "0.00";
+fValue = 1.0/3.0;
+fExpectedRoundVal = 0.33;
+checkPrecisionAsShown( aCode, fValue, fExpectedRoundVal );
+fValue = -10.001;
+fExpectedRoundVal = -10.0;
+checkPrecisionAsShown( aCode, fValue, fExpectedRoundVal );
+}
+{   // thousand rounding buguous tdf#106253
+aCode = "0,,";
+fValue = 4.0e9 / 7.0;
+fExpectedRoundVal = 571e6; // actual is 571428571
+//checkPrecisionAsShown( aCode, fValue, fExpectedRoundVal );
+fValue = -4.0e8 / 7.0;
+fExpectedRoundVal = -57e6; // actual is 57142857
+//checkPrecisionAsShown( aCode, fValue, fExpectedRoundVal );
+}
+{   // percent rounding
+aCode = "0.00%";
+fValue = 4.0 / 7.0;
+fExpectedRoundVal = 0.5714;
+checkPrecisionAsShown( aCode, fValue, fExpectedRoundVal );
+fValue = -4.0 / 7.0;
+fExpectedRoundVal = -0.5714;
+checkPrecisionAsShown( aCode, fValue, fExpectedRoundVal );
+}
+{   // scientific rounding
+aCode = "0.00E0";
+fValue = 40.0 / 7.0;
+fExpectedRoundVal = 57100.0;
+checkPrecisionAsShown( aCode, fValue, fExpectedRoundVal );
+fValue = 4.0 / 7.0;
+fExpectedRoundVal = 5.71e-5;
+checkPrecisionAsShown( aCode, fValue, fExpectedRoundVal );
+// engineering rounding bugous!!! tdf#106252
+aCode = "##0.000E0";
+fValue = 40.0 / 7.0;
+fExpectedRoundVal = 57143.0; // actual is 57140
+//checkPrecisionAsShown( aCode, fValue, fExpectedRoundVal );
+fValue = 4.0 / 7.0;
+fExpectedRoundVal = 5.7143e-5; // actual is 5.714e-05
+//checkPrecisionAsShown( aCode, fValue, fExpectedRoundVal );
+}
+{   // fraction rounding tdf#105657
+aCode = "# ?/?";
+fValue = 0.35;
+fExpectedRoundVal = 1.0/3.0;
+checkPrecisionAsShown( aCode, fValue, fExpectedRoundVal );
+fValue = -0.35;
+fExpectedRoundVal = -1.0/3.0;
+checkPrecisionAsShown( aCode, fValue, fExpectedRoundVal );
+}
+{   // exact fraction
+aCode = "# ?/??";
+fValue = 0.35;
+fExpectedRoundVal = 0.35;
+checkPrecisionAsShown( aCode, fValue, fExpectedRoundVal );
+fValue = -0.35;
+fExpectedRoundVal = -0.35;
+checkPrecisionAsShown( aCode, fValue, fExpectedRoundVal );
+}
+{   // several sub-formats tdf#106052
+aCode = "0.00;-0.000";
+fValue = 1.0/3.0;
+fExpectedRoundVal = 0.33;
+checkPrecisionAsShown( aCode, fValue, fExpect

[Libreoffice-commits] core.git: include/svl svl/source

2017-02-21 Thread Laurent Balland-Poirier
 include/svl/zforlist.hxx|3 ---
 svl/source/numbers/zforlist.cxx |9 -
 2 files changed, 12 deletions(-)

New commits:
commit 52b464f31a162c2e90cb5482ffa2a7ff8dd386d5
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Tue Feb 21 08:31:07 2017 +0100

Remove unused function. Following tdf#105657

Change-Id: I7890d76b35bcf5eb9a965fb90ae1a106913548e8
Reviewed-on: https://gerrit.libreoffice.org/34506
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Eike Rathke <er...@redhat.com>

diff --git a/include/svl/zforlist.hxx b/include/svl/zforlist.hxx
index 81c57d7..dfdd8eb 100644
--- a/include/svl/zforlist.hxx
+++ b/include/svl/zforlist.hxx
@@ -533,9 +533,6 @@ public:
  sal_uInt16& nPrecision, sal_uInt16& 
nAnzLeading,
  LanguageType eLnge = LANGUAGE_DONTKNOW );
 
-/// Get round value with fraction representation
-double GetRoundFractionValue( sal_uInt32 nFormat, double fValue ) const;
-
 /// Check if format code string may be deleted by user
 bool IsUserDefined( const OUString& sStr, LanguageType eLnge = 
LANGUAGE_DONTKNOW );
 
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index b4621bc..c9dab53 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -1962,15 +1962,6 @@ void SvNumberFormatter::GetFormatSpecialInfo(sal_uInt32 
nFormat,
 }
 }
 
-double SvNumberFormatter::GetRoundFractionValue( sal_uInt32 nFormat, double 
fValue ) const
-{
-const SvNumberformat* pFormat = GetFormatEntry( nFormat );
-if ( pFormat )
-return pFormat->GetRoundFractionValue( fValue );
-else
-return fValue;
-}
-
 sal_uInt16 SvNumberFormatter::GetFormatPrecision( sal_uInt32 nFormat ) const
 {
 const SvNumberformat* pFormat = GetFormatEntry( nFormat );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/svl sc/source svl/source

2017-02-21 Thread Laurent Balland-Poirier
 include/svl/zforlist.hxx |3 +++
 include/svl/zformat.hxx  |3 ++-
 sc/source/core/data/documen4.cxx |2 +-
 svl/source/numbers/zforlist.cxx  |   12 
 4 files changed, 18 insertions(+), 2 deletions(-)

New commits:
commit e7f769bc67d3f132b477b3c253f8065243b9b8ac
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Thu Feb 16 22:15:37 2017 +0100

tdf#106052 Treat SubFormat for "Precision as shown"

Get precision from the correct subformat

Change-Id: I458e5b3d1fb515864f19499ac9ac529e1d68a267
Reviewed-on: https://gerrit.libreoffice.org/34505
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Eike Rathke <er...@redhat.com>

diff --git a/include/svl/zforlist.hxx b/include/svl/zforlist.hxx
index fdc0062..81c57d7 100644
--- a/include/svl/zforlist.hxx
+++ b/include/svl/zforlist.hxx
@@ -516,6 +516,9 @@ public:
 /// Count of decimals
 sal_uInt16 GetFormatPrecision( sal_uInt32 nFormat ) const;
 
+/// Count of decimals with correct subformat according to fValue
+sal_uInt16 GetFormatPrecision( sal_uInt32 nFormat, double fValue ) const;
+
 /// Count of integer digits
 sal_uInt16 GetFormatIntegerDigits( sal_uInt32 nFormat ) const;
 
diff --git a/include/svl/zformat.hxx b/include/svl/zformat.hxx
index a50281b..cfb3e3a 100644
--- a/include/svl/zformat.hxx
+++ b/include/svl/zformat.hxx
@@ -219,7 +219,8 @@ public:
 sal_uInt16 GetSubformatIndex( double fNumber ) const;
 
 /// Count of decimal precision
-sal_uInt16 GetFormatPrecision() const   { return 
NumFor[0].Info().nCntPost; }
+sal_uInt16 GetFormatPrecision( sal_uInt16 nIx = 0 ) const
+{ return NumFor[nIx].Info().nCntPost; }
 
 /// Count of integer digits
 sal_uInt16 GetFormatIntegerDigits() const { return 
NumFor[0].Info().nCntPre; }
diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx
index fed6c0d..6a1110b 100644
--- a/sc/source/core/data/documen4.cxx
+++ b/sc/source/core/data/documen4.cxx
@@ -660,7 +660,7 @@ double ScDocument::RoundValueAsShown( double fVal, 
sal_uInt32 nFormat ) const
 short nPrecision;
 if ((nFormat % SV_COUNTRY_LANGUAGE_OFFSET) != 0)
 {
-nPrecision = (short)pFormat->GetFormatPrecision();
+nPrecision = (short)GetFormatTable()->GetFormatPrecision( nFormat, 
fVal );
 switch ( nType )
 {
 case css::util::NumberFormat::PERCENT:  // 0.41% == 0.0041
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index 2ddd642..b4621bc 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -1980,6 +1980,18 @@ sal_uInt16 SvNumberFormatter::GetFormatPrecision( 
sal_uInt32 nFormat ) const
 return pFormatScanner->GetStandardPrec();
 }
 
+sal_uInt16 SvNumberFormatter::GetFormatPrecision( sal_uInt32 nFormat, double 
fValue ) const
+{
+const SvNumberformat* pFormat = GetFormatEntry( nFormat );
+if ( pFormat )
+{
+sal_uInt16 nIx = pFormat->GetSubformatIndex( fValue );
+return pFormat->GetFormatPrecision( nIx );
+}
+else
+return pFormatScanner->GetStandardPrec();
+}
+
 sal_uInt16 SvNumberFormatter::GetFormatIntegerDigits( sal_uInt32 nFormat ) 
const
 {
 const SvNumberformat* pFormat = GetFormatEntry( nFormat );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/svl sc/source svl/source

2017-02-20 Thread Laurent Balland-Poirier
 include/svl/zforlist.hxx |3 
 include/svl/zformat.hxx  |   19 +
 sc/source/core/data/documen4.cxx |4 +
 svl/source/numbers/zforlist.cxx  |9 ++
 svl/source/numbers/zformat.cxx   |  147 ++-
 5 files changed, 119 insertions(+), 63 deletions(-)

New commits:
commit 5706b29974c1c3ab0ba5a23685accf2fbebc3e06
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Wed Feb 15 23:27:34 2017 +0100

tdf#105657 Treat "Precision as shown" for fractions

For Option "Precision as shown",
 fraction must specificly be treated
ImpGetFractionElements retrieves values of each part
of fraction (integer, numerator, denominator)
independently from its exact representation
Update: avoid include of zformat.hxx in document4.cxx

Change-Id: Ia3ea2322f3d311c04ef71f3260730c7154c3dc15
Reviewed-on: https://gerrit.libreoffice.org/34331
Reviewed-by: Eike Rathke <er...@redhat.com>
Tested-by: Eike Rathke <er...@redhat.com>

diff --git a/include/svl/zforlist.hxx b/include/svl/zforlist.hxx
index 37c2b26..fdc0062 100644
--- a/include/svl/zforlist.hxx
+++ b/include/svl/zforlist.hxx
@@ -530,6 +530,9 @@ public:
  sal_uInt16& nPrecision, sal_uInt16& 
nAnzLeading,
  LanguageType eLnge = LANGUAGE_DONTKNOW );
 
+/// Get round value with fraction representation
+double GetRoundFractionValue( sal_uInt32 nFormat, double fValue ) const;
+
 /// Check if format code string may be deleted by user
 bool IsUserDefined( const OUString& sStr, LanguageType eLnge = 
LANGUAGE_DONTKNOW );
 
diff --git a/include/svl/zformat.hxx b/include/svl/zformat.hxx
index ce632ae..d68a100 100644
--- a/include/svl/zformat.hxx
+++ b/include/svl/zformat.hxx
@@ -212,6 +212,9 @@ public:
   sal_uInt16& nPrecision,
   sal_uInt16& nAnzLeading) const;
 
+/// Get index of subformat (0..3) according to conditions and fNumber value
+sal_uInt16 GetSubformatIndex( double fNumber ) const;
+
 /// Count of decimal precision
 sal_uInt16 GetFormatPrecision() const   { return 
NumFor[0].Info().nCntPost; }
 
@@ -242,6 +245,9 @@ public:
 OUString GetDenominatorString( sal_uInt16 nNumFor ) const;
 OUString GetNumeratorString( sal_uInt16 nNumFor ) const;
 OUString GetIntegerFractionDelimiterString( sal_uInt16 nNumFor ) const;
+/// Round fNumber to its fraction representation
+double GetRoundFractionValue ( double fNumber ) const;
+
 /** If the count of string elements (substrings, ignoring [modifiers] and
 so on) in a subformat code nNumFor (0..3) is equal to the given number.
 Used by ImpSvNumberInputScan::IsNumberFormatMain() to detect a matched
@@ -579,6 +585,19 @@ private:
  sal_uInt16 nIx,
  bool bInteger );
 
+/** Calculate each element of fraction:
+ * integer part, numerator part, denominator part
+ * @param fNumber value to be represented as fraction. Will contain 
absolute fractional part
+ * @param nIx subformat number 0..3
+ * @param fIntPart integral part of fraction
+ * @param nFrac numerator of fraction
+ * @param nDic denominator of fraction
+ */
+SVL_DLLPRIVATE void ImpGetFractionElements( double& fNumber,
+sal_uInt16 nIx,
+double& fIntPart,
+sal_uInt64& nFrac,
+sal_uInt64& nDiv ) const;
 SVL_DLLPRIVATE bool ImpGetFractionOutput(double fNumber,
  sal_uInt16 nIx,
  OUStringBuffer& OutString);
diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx
index c503b2f..09b7c54 100644
--- a/sc/source/core/data/documen4.cxx
+++ b/sc/source/core/data/documen4.cxx
@@ -672,6 +672,10 @@ double ScDocument::RoundValueAsShown( double fVal, 
sal_uInt32 nFormat ) const
 nPrecision = sal::static_int_cast( nPrecision - 
(short)floor( log10( -fVal ) ) );
 break;
 }
+case css::util::NumberFormat::FRACTION: // get value of 
fraction representation
+{
+return GetFormatTable()->GetRoundFractionValue( nFormat, 
fVal );
+}
 }
 }
 else
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index 964abdc..71a0718 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -1963,6 +1963,15 @@ void SvNumberFormatter::GetFormatSpecialInfo(sal_uInt32 
nFormat,
 }
 }
 
+double SvN

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

2017-02-18 Thread Laurent Balland-Poirier
 sc/source/core/tool/interpr1.cxx |   20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 22c9828f1d61af976133bf517431862126496d30
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Thu Feb 16 21:48:36 2017 +0100

Translate German comments in interpr1.cxx

Change-Id: Ie9a8693af9f8bb6413c7feecf45f20d971209da7
Reviewed-on: https://gerrit.libreoffice.org/34344
Reviewed-by: Lukas Röllin <lsroel...@gmail.com>
Reviewed-by: Katarina Behrens <katarina.behr...@cib.de>
Tested-by: Katarina Behrens <katarina.behr...@cib.de>

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index bc0407e..da43d6e 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -6403,7 +6403,7 @@ void ScInterpreter::CalculateLookup(bool bHLookup)
 
 if (!pMat)
 {
-nZIndex += nRow1;   // Wertzeile
+nZIndex += nRow1;   // value row
 nSpIndex = sal::static_int_cast( nSpIndex + nCol1 ); // 
value column
 }
 
@@ -6419,12 +6419,12 @@ void ScInterpreter::CalculateLookup(bool bHLookup)
 if ( bHLookup )
 {
 aParam.nCol2 = nCol2;
-aParam.nRow2 = nRow1; // nur in der ersten Zeile suchen
+aParam.nRow2 = nRow1; // search only in the first row
 aParam.bByRow = false;
 }
 else
 {
-aParam.nCol2 = nCol1; // nur in der ersten Spalte suchen
+aParam.nCol2 = nCol1; // search only in the first column
 aParam.nRow2 = nRow2;
 aParam.nTab  = nTab1;
 }
@@ -7891,9 +7891,9 @@ void ScInterpreter::ScCurrency()
 OUString sFormatString = pFormatter->GenerateFormat(
nIndex,
ScGlobal::eLnge,
-   true,// mit 
Tausenderpunkt
-   false,   // nicht rot
-  (sal_uInt16) fDec);// 
Nachkommastellen
+   true,// with 
thousands separator
+   false,   // not red
+  (sal_uInt16) fDec);// 
decimal places
 if (!pFormatter->GetPreviewString(sFormatString,
   fVal,
   aStr,
@@ -7945,7 +7945,7 @@ void ScInterpreter::ScFixed()
 double fDec;
 bool bThousand;
 if (nParamCount == 3)
-bThousand = !GetBool(); // Param TRUE: keine Tausenderpunkte
+bThousand = !GetBool(); // Param true: no thousands separator
 else
 bThousand = true;
 if (nParamCount >= 2)
@@ -7978,9 +7978,9 @@ void ScInterpreter::ScFixed()
 OUString sFormatString = pFormatter->GenerateFormat(
nIndex,
ScGlobal::eLnge,
-   bThousand,   // mit 
Tausenderpunkt
-   false,   // nicht rot
-   (sal_uInt16) fDec);// 
Nachkommastellen
+   bThousand,   // with thousands 
separator
+   false,   // not red
+   (sal_uInt16) fDec);// decimal 
places
 if (!pFormatter->GetPreviewString(sFormatString,
   fVal,
   aStr,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-01-25 Thread Laurent Balland-Poirier
 source/text/sbasic/shared/03030101.xhp |8 
 source/text/sbasic/shared/03030102.xhp |8 
 source/text/sbasic/shared/03030103.xhp |8 
 source/text/sbasic/shared/03030104.xhp |8 
 source/text/sbasic/shared/03030105.xhp |8 
 source/text/sbasic/shared/03030106.xhp |8 
 source/text/sbasic/shared/03050200.xhp |8 
 source/text/sbasic/shared/03050300.xhp |8 
 source/text/sbasic/shared/03090103.xhp |8 
 source/text/sbasic/shared/03090203.xhp |9 -
 source/text/sbasic/shared/03090401.xhp |8 
 source/text/sbasic/shared/03090411.xhp |8 
 source/text/sbasic/shared/03100050.xhp |8 
 source/text/sbasic/shared/03100060.xhp |8 
 source/text/sbasic/shared/03100070.xhp |8 
 source/text/sbasic/shared/03100080.xhp |8 
 source/text/sbasic/shared/03101110.xhp |8 
 source/text/sbasic/shared/03102450.xhp |8 
 source/text/sbasic/shared/03102800.xhp |8 
 source/text/sbasic/shared/03104000.xhp |8 
 source/text/sbasic/shared/03104700.xhp |8 
 source/text/sbasic/shared/03120105.xhp |8 
 source/text/sbasic/shared/03120315.xhp |8 
 source/text/sbasic/shared/03120402.xhp |8 
 source/text/sbasic/shared/03130100.xhp |8 
 source/text/sbasic/shared/03130600.xhp |8 
 source/text/sbasic/shared/03132100.xhp |   10 +-
 27 files changed, 109 insertions(+), 110 deletions(-)

New commits:
commit 7b98ed0680a6573ec9b5710ffceeac8df60e684e
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Sun Jan 22 10:26:20 2017 +0100

Basic: remove ^M

Remove ^M characters at end of line
remove tabulation characters

Change-Id: I96345f88c732ad5c40a6143437cccf064aca0738
Reviewed-on: https://gerrit.libreoffice.org/33387
Reviewed-by: Olivier Hallot <olivier.hal...@edx.srv.br>
Tested-by: Olivier Hallot <olivier.hal...@edx.srv.br>

diff --git a/source/text/sbasic/shared/03030101.xhp 
b/source/text/sbasic/shared/03030101.xhp
index 435dc6e..eaa589f 100644
--- a/source/text/sbasic/shared/03030101.xhp
+++ b/source/text/sbasic/shared/03030101.xhp
@@ -1,6 +1,5 @@
 
 
-
 
-   
+
 
 
 
@@ -37,8 +36,8 @@
 Returns a Date value for a specified year, month, or 
day.
 
 Syntax:
-
-DateSerial (year, month, day)
+
+DateSerial (year, month, day)
 
 Return value:
 Date
@@ -68,3 +67,4 @@
 
 
 
+
diff --git a/source/text/sbasic/shared/03030102.xhp 
b/source/text/sbasic/shared/03030102.xhp
index 009e03f..c84b257 100644
--- a/source/text/sbasic/shared/03030102.xhp
+++ b/source/text/sbasic/shared/03030102.xhp
@@ -1,6 +1,5 @@
 
 
-
 
-   
+
 
 
 
@@ -37,8 +36,8 @@
 Returns a date value from a date string. The date string is a 
complete date in a single numeric value. You can also use this serial number to 
determine the difference between two dates.
 
 Syntax:
-
-DateValue [(date)]
+
+DateValue [(date)]
 
 Return value:
 Datei66764
@@ -58,3 +57,4 @@
 
 
 
+
diff --git a/source/text/sbasic/shared/03030103.xhp 
b/source/text/sbasic/shared/03030103.xhp
index f9ed0f7..4ba4cb0 100644
--- a/source/text/sbasic/shared/03030103.xhp
+++ b/source/text/sbasic/shared/03030103.xhp
@@ -1,6 +1,5 @@
 
 
-
 
-   
+
 
 
 
@@ -37,8 +36,8 @@
 Returns a value that represents the day of the month based on a 
serial date number generated by DateSerial or 
DateValue.
 
 Syntax:
-
-Day 
(Number)
+
+Day 
(Number)
 
 Return value:
 Integer
@@ -60,3 +59,4 @@
 
 
 
+
diff --git a/source/text/sbasic/shared/03030104.xhp 
b/source/text/sbasic/shared/03030104.xhp
index 5f1d275..58c81a9 100644
--- a/source/text/sbasic/shared/03030104.xhp
+++ b/source/text/sbasic/shared/03030104.xhp
@@ -1,6 +1,5 @@
 
 
-
 
-   
+
 
 
 
@@ -37,8 +36,8 @@
 Returns the month of a year from a serial date that is generated by 
the DateSerial or the DateValue function.
 
 Syntax:
-
-Month 
(Number)
+
+Month 
(Number)
 
 Return value:
 Integer
@@ -60,3 +59,4 @@
 
 
 
+
diff --git a/source/text/sbasic/shared/03030105.xhp 
b/source/text/sbasic/shared/03030105.xhp
index 225a784..5fe29f1 100644
--- a/source/text/sbasic/shared/03030105.xhp
+++ b/source/text/sbasic/shared/03030105.xhp
@@ -1,6 +1,5 @@
 
 
-
 
-   
+
 
 
 
@@ -37,8 +36,8 @@
 Returns the number corresponding to the weekday represented by a 
serial date number that is generated by the DateSerial or the DateValue 
function.
 
 Syntax:
-
-WeekDay (Number)
+
+WeekDay (Number)
 
 Return value:
 Integer
@@ -74,3 +73,4 @@
 
 
 
+
diff --git a/source/text/sbasic/shared/03030106.xhp 
b/source/text/sbasic/shared/03030106.xhp
index 37747ea..eff0c7d 100644
--- a/source/text/sbasic/shared/03030106.xhp
+++ b/source/text/sbasic/shared/03030106.xhp
@@ -1,6 +1,5 @@
 
 
-
 
-   
+
 
 
 
@@ -37,8 +36,8 @@
 Returns the year from a serial date number that is generated by the 
DateSerial or the 

[Libreoffice-commits] core.git: helpcontent2

2017-01-25 Thread Laurent Balland-Poirier
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6db2027647b2a6a5517bd0e8f958bb6865d4ecb0
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Sun Jan 22 10:26:20 2017 +0100

Updated core
Project: help  7b98ed0680a6573ec9b5710ffceeac8df60e684e

Basic: remove ^M

Remove ^M characters at end of line
remove tabulation characters

Change-Id: I96345f88c732ad5c40a6143437cccf064aca0738
Reviewed-on: https://gerrit.libreoffice.org/33387
Reviewed-by: Olivier Hallot <olivier.hal...@edx.srv.br>
Tested-by: Olivier Hallot <olivier.hal...@edx.srv.br>

diff --git a/helpcontent2 b/helpcontent2
index ec31230..7b98ed0 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit ec3123033ab3ea3eace5dd7b53047dcd4daa4ece
+Subproject commit 7b98ed0680a6573ec9b5710ffceeac8df60e684e
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: basic/qa

2017-01-06 Thread Laurent Balland-Poirier
/test_weekday_method.vb 
|   18 ++
 basic/qa/basic_coverage/test_year_method.vb
|   18 ++
 112 files changed, 1698 insertions(+), 363 deletions(-)

New commits:
commit 060c2b9b1b0d3c9cf27f1b289a620cfa82b5b060
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Fri Dec 30 21:10:26 2016 +0100

QA Basic: split tests of methods in different files

Following resolution of "Missing TAN method" [1]
as discussed on dev list [2]
a large majority of methods are now tested
with (almost) one method per file

Missing methods:
- colors failed: RED, GREEN, BLUE
- file methods: DIR, CHDRIVE, EOF,...
- financial methods calling Calc functions: IPmt, IRR,...
- not totaly implemented methods (?): ROUND, WAITUNTIL...

[1] https://bugs.documentfoundation.org/show_bug.cgi?id=102872
[2] 
http://nabble.documentfoundation.org/QA-test-for-BASIC-functions-tt4202257.html

Change-Id: I2b2824b5b18a2cfbbee2bbc5369e9e2b9e5c930b
Reviewed-on: https://gerrit.libreoffice.org/32519
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk>

diff --git a/basic/qa/basic_coverage/test_abs_method.vb 
b/basic/qa/basic_coverage/test_abs_method.vb
new file mode 100644
index 000..b79b9bc
--- /dev/null
+++ b/basic/qa/basic_coverage/test_abs_method.vb
@@ -0,0 +1,17 @@
+' This file is part of the LibreOffice project.
+'
+' This Source Code Form is subject to the terms of the Mozilla Public
+' License, v. 2.0. If a copy of the MPL was not distributed with this
+' file, You can obtain one at http://mozilla.org/MPL/2.0/.
+'
+
+Function doUnitTest as Integer
+' ABS
+If (Abs(-3.5) <> 3.5) Then
+doUnitTest = 0
+ElseIf (Abs(3.5) <> 3.5) Then
+doUnitTest = 0
+Else
+doUnitTest = 1
+End If
+End Function
diff --git a/basic/qa/basic_coverage/test_array_method.vb 
b/basic/qa/basic_coverage/test_array_method.vb
new file mode 100644
index 000..42f10a2
--- /dev/null
+++ b/basic/qa/basic_coverage/test_array_method.vb
@@ -0,0 +1,20 @@
+'
+' This file is part of the LibreOffice project.
+'
+' This Source Code Form is subject to the terms of the Mozilla Public
+' License, v. 2.0. If a copy of the MPL was not distributed with this
+' file, You can obtain one at http://mozilla.org/MPL/2.0/.
+'
+
+Function doUnitTest as Integer
+dim aVector as Variant
+' ARRAY
+aVector = Array( "Hello", -3.14)
+If (aVector(0) <> "Hello") Then
+doUnitTest = 0
+ElseIf ( aVector(1) <> -3.14 ) Then
+doUnitTest = 0
+Else
+doUnitTest = 1
+End If
+End Function
diff --git a/basic/qa/basic_coverage/test_array_methods.vb 
b/basic/qa/basic_coverage/test_array_methods.vb
deleted file mode 100644
index 53b2c87..000
--- a/basic/qa/basic_coverage/test_array_methods.vb
+++ /dev/null
@@ -1,33 +0,0 @@
-'
-' This file is part of the LibreOffice project.
-'
-' This Source Code Form is subject to the terms of the Mozilla Public
-' License, v. 2.0. If a copy of the MPL was not distributed with this
-' file, You can obtain one at http://mozilla.org/MPL/2.0/.
-'
-
-Function doUnitTest as Integer
-dim aVector as Variant
-' ARRAY
-aVector = Array( Date(), Time(), "Hello", -3.14)
-If (aVector(2) <> "Hello") Then
-doUnitTest = 0
-' LBOUND
-ElseIf ( LBound( aVector() ) <> 0 ) Then
-doUnitTest = 0
-' TYPELEN
-ElseIf ( TypeLen(aVector(2)) <> 5 ) Then
-doUnitTest = 0
-' TYPENAME
-ElseIf ( TypeName(aVector(2)) <> "String" ) Then
-doUnitTest = 0
-' UBOUND already tested
-'ElseIf ( UBound( aVector() ) <> 3 ) Then
-'doUnitTest = 0
-' VARTYPE
-ElseIf ( VarType(aVector(2)) <> 8 ) Then
-doUnitTest = 0
-Else
-doUnitTest = 1
-End If
-End Function
diff --git a/basic/qa/basic_coverage/test_asc_method.vb 
b/basic/qa/basic_coverage/test_asc_method.vb
new file mode 100644
index 000..48b8893
--- /dev/null
+++ b/basic/qa/basic_coverage/test_asc_method.vb
@@ -0,0 +1,15 @@
+' This file is part of the LibreOffice project.
+'
+' This Source Code Form is subject to the terms of the Mozilla Public
+' License, v. 2.0. If a copy of the MPL was not distributed with this
+' file, You can obtain one at http://mozilla.org/MPL/2.0/.
+'
+
+Function doUnitTest as Integer
+' ASC
+If (Asc("€a") <> 8364) Then
+doUnitTest = 0
+Else
+doUnitTest = 1
+End If
+End Function
diff --git a/basic/qa/basic_coverage/test_atn_method.vb 
b/basic/qa/basic_coverage/test_atn_method.vb
new file mode 100644
index 000..7717141
--- /dev/null
+++ b/basic/qa/basic_coverage/test_atn_method.vb
@@ -0,0 +1,15 @@
+' This file is part of the LibreOffice project.
+'
+' T

[Libreoffice-commits] core.git: basic/qa

2016-12-24 Thread Laurent Balland-Poirier
 basic/qa/basic_coverage/test_array_methods.vb  |   19 +---
 basic/qa/basic_coverage/test_conversion_methods.vb |   36 +++-
 basic/qa/basic_coverage/test_datetime_methods.vb   |   43 +++---
 basic/qa/basic_coverage/test_logic_methods.vb  |   24 +
 basic/qa/basic_coverage/test_math_methods.vb   |6 -
 basic/qa/basic_coverage/test_string_methods.vb |   90 +++--
 basic/qa/basic_coverage/test_system_methods.vb |   12 +-
 7 files changed, 84 insertions(+), 146 deletions(-)

New commits:
commit 40578897d39c4eb0b528cff04ce82f5becbecc3f
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Sun Dec 11 13:43:07 2016 +0100

basic: cleanup test_*_methods

cleanup
remove duplicate test with other tests

Change-Id: I4c82ad9f226f25080199ac0dc3815492fc4c265a
Reviewed-on: https://gerrit.libreoffice.org/31860
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Arnaud Versini <arnaud.vers...@libreoffice.org>

diff --git a/basic/qa/basic_coverage/test_array_methods.vb 
b/basic/qa/basic_coverage/test_array_methods.vb
index 093867a..53b2c87 100644
--- a/basic/qa/basic_coverage/test_array_methods.vb
+++ b/basic/qa/basic_coverage/test_array_methods.vb
@@ -13,26 +13,21 @@ Function doUnitTest as Integer
 If (aVector(2) <> "Hello") Then
 doUnitTest = 0
 ' LBOUND
-Else If ( LBound( aVector() ) <> 0 ) Then
+ElseIf ( LBound( aVector() ) <> 0 ) Then
 doUnitTest = 0
 ' TYPELEN
-Else If ( TypeLen(aVector(2)) <> 5 ) Then
+ElseIf ( TypeLen(aVector(2)) <> 5 ) Then
 doUnitTest = 0
 ' TYPENAME
-Else If ( TypeName(aVector(2)) <> "String" ) Then
-doUnitTest = 0
-' UBOUND
-Else If ( UBound( aVector() ) <> 3 ) Then
+ElseIf ( TypeName(aVector(2)) <> "String" ) Then
 doUnitTest = 0
+' UBOUND already tested
+'ElseIf ( UBound( aVector() ) <> 3 ) Then
+'doUnitTest = 0
 ' VARTYPE
-Else If ( VarType(aVector(2)) <> 8 ) Then
+ElseIf ( VarType(aVector(2)) <> 8 ) Then
 doUnitTest = 0
 Else
 doUnitTest = 1
 End If
-End If
-End If
-End If
-End If
-End If
 End Function
diff --git a/basic/qa/basic_coverage/test_conversion_methods.vb 
b/basic/qa/basic_coverage/test_conversion_methods.vb
index 7790cbc..6d441e0 100644
--- a/basic/qa/basic_coverage/test_conversion_methods.vb
+++ b/basic/qa/basic_coverage/test_conversion_methods.vb
@@ -14,46 +14,36 @@ Function doUnitTest as Integer
 If (CBool(3) <> True) Then
 doUnitTest = 0
 ' CBYTE
-Else If (CByte("3") <> 3) Then
+ElseIf (CByte("3") <> 3) Then
 doUnitTest = 0
 ' CCUR
-Else If (CCur("100") <> 100) Then
+ElseIf (CCur("100") <> 100) Then
 doUnitTest = 0
 ' CDATE
-Else If (CDate(100) <> 100) Then
+ElseIf (CDate(100) <> 100) Then
 doUnitTest = 0
-' CDEC
-'Else If (CDec("100") <> 100) Then
+' CDEC already tested
+'ElseIf (CDec("100") <> 100) Then
 'doUnitTest = 0
 ' CDBL
-Else If (CDbl("100") <> 100) Then
+ElseIf (CDbl("100") <> 100) Then
 doUnitTest = 0
 ' CINT
-Else If (CInt("100") <> 100) Then
-doUnitTest = 0
-' CLNG
-Else If (CLng("100") <> 100) Then
+ElseIf (CInt("100") <> 100) Then
 doUnitTest = 0
+' CLNG already tested
+'ElseIf (CLng("100") <> 100) Then
+ '   doUnitTest = 0
 ' CSNG
-Else If (CSng("100") <> 100) Then
+ElseIf (CSng("100") <> 100) Then
 doUnitTest = 0
 ' CSTR
-Else If (CStr(100) <> "100") Then
+ElseIf (CStr(100) <> "100") Then
 doUnitTest = 0
 ' VAL
-Else If ( Val("4") <> 4 ) Then
+ElseIf ( Val("4") <> 4 ) Then
 doUnitTest = 0
 Else
 doUnitTest = 1
 End If
-End If
-End If
-End If
-End If
-End If
-End If
-End If
-End If
-End If
-'End If
 End Function
diff --git a/basic/qa/basic_coverage/test_datetime_methods.vb 
b/basic/qa/basic_coverage/test_datetime_methods.vb
index 679e129..0ef990c 100644
--- a/basic/qa/basic_coverage/test_datetime_methods.vb
+++ b/basic/qa/basic_coverage/test_datetime_methods.vb
@@ -19,59 +19,46 @@ Function doUnitTest as Integer
 If ( CDateToIso( CDateFromIso("20161016") ) <> "20161016" ) Then
 doUnitTest = 0
 ' DATE DATEDIFF DATEADD
-Else If ( DateDiff( "d", aVector(0), DateAdd("d", 1, aVector(0)) ) <> 1 ) 
Then
+ElseIf ( DateDiff( "d", 

[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - nlpsolver/src

2016-12-22 Thread Laurent Balland-Poirier
 
nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/EvolutionarySolverStatusUno.java
 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d9ff86c9cf90925d0344b9572c651301847ca78c
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Wed Nov 30 21:50:06 2016 +0100

tdf#104268 NLPSolver: Improve display of solution

Format "%.2f" is not optimal for large or small values.
Format "%g" should be prefered.

Change-Id: I92899d80564b9000b1f3e049221c456f8e1176a9
Reviewed-on: https://gerrit.libreoffice.org/31445
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
Tested-by: Noel Grandin <noel.gran...@collabora.co.uk>
(cherry picked from commit 0412d863d144344b4c6c04b22209c0c57f1d6fb8)
Reviewed-on: https://gerrit.libreoffice.org/31939
Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>

diff --git 
a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/EvolutionarySolverStatusUno.java
 
b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/EvolutionarySolverStatusUno.java
index da8dbb2..e3695a0 100644
--- 
a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/EvolutionarySolverStatusUno.java
+++ 
b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/EvolutionarySolverStatusUno.java
@@ -177,7 +177,7 @@ public class EvolutionarySolverStatusUno extends BaseDialog
 }
 
 public void setBestSolution(double solution, boolean feasible) {
-lblSolutionValue.setLabel(String.format("%.2f", solution));
+lblSolutionValue.setLabel(String.format("%g", solution));
 if (feasible)
 lblSolutionValue.setTextColor(defaultTextColor);
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: nlpsolver/src

2016-12-12 Thread Laurent Balland-Poirier
 
nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/EvolutionarySolverStatusUno.java
 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0412d863d144344b4c6c04b22209c0c57f1d6fb8
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Wed Nov 30 21:50:06 2016 +0100

tdf#104268 NLPSolver: Improve display of solution

Format "%.2f" is not optimal for large or small values.
Format "%g" should be prefered.

Change-Id: I92899d80564b9000b1f3e049221c456f8e1176a9
Reviewed-on: https://gerrit.libreoffice.org/31445
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
Tested-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git 
a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/EvolutionarySolverStatusUno.java
 
b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/EvolutionarySolverStatusUno.java
index da8dbb2..e3695a0 100644
--- 
a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/EvolutionarySolverStatusUno.java
+++ 
b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/EvolutionarySolverStatusUno.java
@@ -177,7 +177,7 @@ public class EvolutionarySolverStatusUno extends BaseDialog
 }
 
 public void setBestSolution(double solution, boolean feasible) {
-lblSolutionValue.setLabel(String.format("%.2f", solution));
+lblSolutionValue.setLabel(String.format("%g", solution));
 if (feasible)
 lblSolutionValue.setTextColor(defaultTextColor);
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2016-11-22 Thread Laurent Balland-Poirier
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c895cb32fa8d1cf7fa82cebbde9d8259e68e66f6
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Sun Oct 23 17:28:52 2016 +0200

Updated core
Project: help  576f344764a89a1533d39d1424d3bd4176af1aae

tdf#36038 Help for Extended LCID

Change-Id: Icc2f31b88bcc37dd0d90226de2513531673c8707
Reviewed-on: https://gerrit.libreoffice.org/30180
Reviewed-by: jan iversen <j...@documentfoundation.org>
Tested-by: jan iversen <j...@documentfoundation.org>

diff --git a/helpcontent2 b/helpcontent2
index b429143..576f344 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit b429143c2cbedbc28b9b8c9cc07cd76cd69b68c6
+Subproject commit 576f344764a89a1533d39d1424d3bd4176af1aae
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-11-22 Thread Laurent Balland-Poirier
 source/text/shared/01/05020301.xhp |  682 +++--
 1 file changed, 654 insertions(+), 28 deletions(-)

New commits:
commit 576f344764a89a1533d39d1424d3bd4176af1aae
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Sun Oct 23 17:28:52 2016 +0200

tdf#36038 Help for Extended LCID

Change-Id: Icc2f31b88bcc37dd0d90226de2513531673c8707
Reviewed-on: https://gerrit.libreoffice.org/30180
Reviewed-by: jan iversen <j...@documentfoundation.org>
Tested-by: jan iversen <j...@documentfoundation.org>

diff --git a/source/text/shared/01/05020301.xhp 
b/source/text/shared/01/05020301.xhp
index df8c1f5..54e2654 100644
--- a/source/text/shared/01/05020301.xhp
+++ b/source/text/shared/01/05020301.xhp
@@ -41,6 +41,8 @@
   scientific notation, formats
   engineering notation, formats
   fraction, formats
+  native numeral
+  LCID, extended
 
 mw made "time formats" a two level entry and deleted 2x 
"formats;"
 
@@ -269,7 +271,7 @@
 To display 
numbers as percentages, add the percent sign (%) to the number 
format.
 
 Scientific Notation
-Scientific 
notation lets you write very large numbers or very small fractions in a compact 
form. For example, in scientific notation, 65 is written as 6.5 x 10^5, and 
0.65 as 6.5 x 10^-5. Translators: use the decimal delimiter of 
your language (period or comma) for all number format codes in 
Calc.In %PRODUCTNAME, these numbers 
are written as 6.5E+5 and 6.5E-5, respectively. To create a number format that 
displays numbers using scientific notation, enter a # or 0, and then one of the 
following codes E-, E+, e- or e+. If sign is omitted after E or e, it won't 
appear for positive value of exponent. To get engineering notation, enter 3 
digits (0 or #) in the integer part.For instance: ###.##E+00
+Scientific 
notation lets you write very large numbers or very small fractions in a compact 
form. For example, in scientific notation, 65 is written as 6.5 x 10^5, and 
0.65 as 6.5 x 10^-5. Translators: use the decimal delimiter of 
your language (period or comma) for all number format codes in 
Calc.In %PRODUCTNAME, these numbers 
are written as 6.5E+5 and 6.5E-5, respectively. To create a number format that 
displays numbers using scientific notation, enter a # or 0, and then one of the 
following codes E-, E+, e- or e+. If sign is omitted after E or e, it won't 
appear for positive value of exponent. To get engineering notation, enter 3 
digits (0 or #) in the integer part. For instance: ###.##E+00
 
 Fraction Representation
 To represent a 
value as a fraction, format consists of two or three parts: integer optional 
part, numerator and denominator. Integer and numerator are separated by a blank 
or any quoted text. Numerator and denominator are separated by a slash 
character. Each part can consist of a combination of #, ? and 0 as 
placeholders.
@@ -716,9 +718,10 @@
 
 Entering Dates
 To enter a 
date in a cell, use the Gregorian calendar format. For example, in an English 
locale, enter 1/2/2002 for Jan 2, 2002.
-All date 
formats are dependent on the locale that is set in %PRODUCTNAME - Preferences
+All date 
formats are dependent on the locale that is set in %PRODUCTNAME - Preferences 
 Tools - 
Options - Language settings - 
Languages. For example, if your locale is set to 'Japanese', then the 
Gengou calendar is used. The default date format in %PRODUCTNAME uses the Gregorian Calendar.
 To specify a 
calendar format that is independent of the locale, add a modifier in front of 
the date format. For example, to display a date using the Jewish calendar 
format in a non-Hebrew locale, enter: [~jewish]DD/MM/.
+The 
specified calendar is exported to MS-Excel using extended LCID. Extended LCID 
can also be used in the format string. It will be converted to a calendar 
modifier if it is supported. See Extended LCID section 
below.
 
 
   
@@ -787,7 +790,7 @@
   
 
 
-If you perform a calculation that 
involves one or more cells using a date format, the result is formatted 
according to the following mappings:
+If you perform a calculation that 
involves one or more cells using a date format, the result is formatted 
according to the following mappings: 
 
 
 
@@ -885,7 +888,7 @@
 
 
 
-The DateTime format displays the 
date and time that an entry was made to a cell with this format.
+The DateTime format displays the 
date and time that an entry was made to a cell with this format. 
 
 
 
@@ -985,16 +988,16 @@
 If a time is 
entered in the form 02:03.45 or 01:02:03.45 or 25:01:02, the following formats 
are assigned if no other time format has been specified: MM:SS.00 or 
[HH]:MM:SS.00 or [HH]:MM:SSTranslators: use the decimal delimiter of 
your language (period or comma) for all number format codes in 
Calc.
 
 Displaying Numbers Using Native Characters
+
+NatNum modifiers
 To display 
numbers using native number characters, use a [NatNum1

[Libreoffice-commits] core.git: basic/qa

2016-11-22 Thread Laurent Balland-Poirier
 basic/qa/basic_coverage/test_array_methods.vb  |   38 +++
 basic/qa/basic_coverage/test_conversion_methods.vb |   59 +++
 basic/qa/basic_coverage/test_datetime_methods.vb   |   77 +++
 basic/qa/basic_coverage/test_logic_methods.vb  |   56 ++
 basic/qa/basic_coverage/test_math_methods.vb   |   73 ++
 basic/qa/basic_coverage/test_string_methods.vb |  107 +
 basic/qa/basic_coverage/test_system_methods.vb |   29 +
 7 files changed, 439 insertions(+)

New commits:
commit 8a50ea54546a51fc7a2a28174031e7351dbed10e
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Sat Oct 22 21:54:37 2016 +0200

tdf#102872 Add qa unit test for BASIC methods

Add test if several methods still works

Change-Id: I8d26e5e3555dbbc0f07152138e1bc0cd65d90998
Reviewed-on: https://gerrit.libreoffice.org/30166
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: jan iversen <j...@documentfoundation.org>
Tested-by: jan iversen <j...@documentfoundation.org>
Reviewed-by: Laurent BP <laurent.balland-poir...@laposte.net>

diff --git a/basic/qa/basic_coverage/test_array_methods.vb 
b/basic/qa/basic_coverage/test_array_methods.vb
new file mode 100644
index 000..093867a
--- /dev/null
+++ b/basic/qa/basic_coverage/test_array_methods.vb
@@ -0,0 +1,38 @@
+'
+' This file is part of the LibreOffice project.
+'
+' This Source Code Form is subject to the terms of the Mozilla Public
+' License, v. 2.0. If a copy of the MPL was not distributed with this
+' file, You can obtain one at http://mozilla.org/MPL/2.0/.
+'
+
+Function doUnitTest as Integer
+dim aVector as Variant
+' ARRAY
+aVector = Array( Date(), Time(), "Hello", -3.14)
+If (aVector(2) <> "Hello") Then
+doUnitTest = 0
+' LBOUND
+Else If ( LBound( aVector() ) <> 0 ) Then
+doUnitTest = 0
+' TYPELEN
+Else If ( TypeLen(aVector(2)) <> 5 ) Then
+doUnitTest = 0
+' TYPENAME
+Else If ( TypeName(aVector(2)) <> "String" ) Then
+doUnitTest = 0
+' UBOUND
+Else If ( UBound( aVector() ) <> 3 ) Then
+doUnitTest = 0
+' VARTYPE
+Else If ( VarType(aVector(2)) <> 8 ) Then
+doUnitTest = 0
+Else
+doUnitTest = 1
+End If
+End If
+End If
+End If
+End If
+End If
+End Function
diff --git a/basic/qa/basic_coverage/test_conversion_methods.vb 
b/basic/qa/basic_coverage/test_conversion_methods.vb
new file mode 100644
index 000..7790cbc
--- /dev/null
+++ b/basic/qa/basic_coverage/test_conversion_methods.vb
@@ -0,0 +1,59 @@
+'
+' This file is part of the LibreOffice project.
+'
+' This Source Code Form is subject to the terms of the Mozilla Public
+' License, v. 2.0. If a copy of the MPL was not distributed with this
+' file, You can obtain one at http://mozilla.org/MPL/2.0/.
+'
+
+Function doUnitTest as Integer
+Randomize 42
+dim aVector as Variant
+aVector = Array( Date(), Time(), "Hello", -3.14)
+' CBOOL
+If (CBool(3) <> True) Then
+doUnitTest = 0
+' CBYTE
+Else If (CByte("3") <> 3) Then
+doUnitTest = 0
+' CCUR
+Else If (CCur("100") <> 100) Then
+doUnitTest = 0
+' CDATE
+Else If (CDate(100) <> 100) Then
+doUnitTest = 0
+' CDEC
+'Else If (CDec("100") <> 100) Then
+'doUnitTest = 0
+' CDBL
+Else If (CDbl("100") <> 100) Then
+doUnitTest = 0
+' CINT
+Else If (CInt("100") <> 100) Then
+doUnitTest = 0
+' CLNG
+Else If (CLng("100") <> 100) Then
+doUnitTest = 0
+' CSNG
+Else If (CSng("100") <> 100) Then
+doUnitTest = 0
+' CSTR
+Else If (CStr(100) <> "100") Then
+doUnitTest = 0
+' VAL
+Else If ( Val("4") <> 4 ) Then
+doUnitTest = 0
+Else
+doUnitTest = 1
+End If
+End If
+End If
+End If
+End If
+End If
+End If
+End If
+End If
+End If
+'End If
+End Function
diff --git a/basic/qa/basic_coverage/test_datetime_methods.vb 
b/basic/qa/basic_coverage/test_datetime_methods.vb
new file mode 100644
index 000..679e129
--- /dev/null
+++ b/basic/qa/basic_coverage/test_datetime_methods.vb
@@ -0,0 +1,77 @@
+'
+' This file is part of the LibreOffice project.
+'
+' This Source Code Form is subject to the terms of the Mozilla Public
+' License, v. 2.0. If a copy of the MPL was not distributed with this
+' file, You can obtain one at http://mozilla.org/MPL/2.0/.
+'
+
+Function doUnitTest as Integer
+dim aVector as Variant
+aVector = Array( Date(), Time(), "Hello", -3.14)
+' CDateFromUnoDate
+' CDateTomUnoDate
+' CDateFromUnoTi

[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sfx2/classification sfx2/Package_classification.mk

2016-11-11 Thread Laurent Balland-Poirier
 sfx2/Package_classification.mk|3 +
 sfx2/classification/example_ca-ES.xml |   71 
 sfx2/classification/example_fr-FR.xml |   84 ++
 sfx2/classification/example_nl-NL.xml |   71 
 4 files changed, 229 insertions(+)

New commits:
commit 5bbad83f5a4144181a46c68784a3ff3e3f368c2d
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Fri Nov 11 13:37:09 2016 +0100

tdf#100352 Backport ca-ES, fr-FR and nl-NL classification files

Change-Id: I561ff1906c1ddfde5d66d31270633fc4de94589b
Reviewed-on: https://gerrit.libreoffice.org/30775
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Caolán McNamara <caol...@redhat.com>
Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sfx2/Package_classification.mk b/sfx2/Package_classification.mk
index 4ed779c..71684f4 100644
--- a/sfx2/Package_classification.mk
+++ b/sfx2/Package_classification.mk
@@ -11,7 +11,10 @@ $(eval $(call 
gb_Package_Package,sfx2_classification,$(SRCDIR)/sfx2))
 
 $(eval $(call 
gb_Package_add_files,sfx2_classification,$(LIBO_SHARE_FOLDER)/classification,\
classification/example.xml \
+   classification/example_ca-ES.xml \
+   classification/example_fr-FR.xml \
classification/example_hu-HU.xml \
+   classification/example_nl-NL.xml \
classification/example_pt-BR.xml \
classification/example_sl-SI.xml \
 ))
diff --git a/sfx2/classification/example_ca-ES.xml 
b/sfx2/classification/example_ca-ES.xml
new file mode 100644
index 000..f62d647
--- /dev/null
+++ b/sfx2/classification/example_ca-ES.xml
@@ -0,0 +1,71 @@
+
+
+Autoritat de polítiques TSCP de 
exemple
+Política TSCP de exemple
+
+urn:example:tscp:1
+
+
+
+
+
+UK-Cabinet
+0
+
+
+
+
+
+Document: Header
+Classificació: afers generals
+
+
+
+UK-Cabinet
+1
+
+
+
+
+
+Document: Header
+Classificació: confidencial
+
+
+Document: Footer
+Aquest contingut és de caràcter confidencial. 
No el distribuïu externament sense autorització.
+
+
+Document: Watermark
+Confidencial
+
+
+
+UK-Cabinet
+2
+
+
+
+
+
+Document: Header
+Classificació: només d’ús 
intern
+
+
+Document: Footer
+Aquest contingut és només d’ús intern. No 
el distribuïu externament.
+
+
+Document: Watermark
+Ús intern
+
+
+
+UK-Cabinet
+3
+
+
+
+
+
diff --git a/sfx2/classification/example_fr-FR.xml 
b/sfx2/classification/example_fr-FR.xml
new file mode 100644
index 000..4e0ab99
--- /dev/null
+++ b/sfx2/classification/example_fr-FR.xml
@@ -0,0 +1,84 @@
+
+
+
+Exemple d'autorité TSCP
+
+Exemple de stratégie TSCP
+
+urn:example:tscp:1
+
+
+
+
+
+
+UK-Cabinet
+0
+
+
+
+
+
+
+Document: Header
+
+Classification : professionnel
+
+
+
+UK-Cabinet
+1
+
+
+
+
+
+
+Document: Header
+
+Classification : confidentiel
+
+
+Document: Footer
+
+Ce contenu est marqué confidentiel. Ne le 
communiquez pas à l'extérieur sans un accord de l'entreprise.
+
+
+Document: Watermark
+
+Confidentiel
+
+
+
+UK-Cabinet
+2
+
+
+
+
+
+
+Document: Header
+
+Classification : exclusivement en 
interne
+
+
+Document: Footer
+
+Ce contenu e

[Libreoffice-commits] core.git: sc/qa

2016-11-11 Thread Laurent Balland-Poirier
 sc/qa/unit/data/ods/tdf36038_ExtendedLCID.ods |binary
 sc/qa/unit/subsequent_export-test.cxx |   43 ++
 2 files changed, 43 insertions(+)

New commits:
commit 8d811eda74a6b2b249a44a9217328e8d2788ec3c
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Sun Oct 23 11:46:19 2016 +0200

tdf#36038 QA test export/import extended LCID to Excel

Change-Id: I5c8a19f62f030913f7e6dcbc0274f5d0aa197056
Reviewed-on: https://gerrit.libreoffice.org/30175
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Eike Rathke <er...@redhat.com>

diff --git a/sc/qa/unit/data/ods/tdf36038_ExtendedLCID.ods 
b/sc/qa/unit/data/ods/tdf36038_ExtendedLCID.ods
new file mode 100644
index 000..3abb946
Binary files /dev/null and b/sc/qa/unit/data/ods/tdf36038_ExtendedLCID.ods 
differ
diff --git a/sc/qa/unit/subsequent_export-test.cxx 
b/sc/qa/unit/subsequent_export-test.cxx
index b9bbc30..1a99a64 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -181,6 +181,7 @@ public:
 void testEscapeCharInNumberFormatXLSX();
 void testNatNumInNumberFormatXLSX();
 void testExponentWithoutSignFormatXLSX();
+void testExtendedLCID();
 
 void testHiddenRepeatedRowsODS();
 void testHyperlinkTargetFrameODS();
@@ -267,6 +268,7 @@ public:
 CPPUNIT_TEST(testEscapeCharInNumberFormatXLSX);
 CPPUNIT_TEST(testNatNumInNumberFormatXLSX);
 CPPUNIT_TEST(testExponentWithoutSignFormatXLSX);
+CPPUNIT_TEST(testExtendedLCID);
 
 CPPUNIT_TEST(testHiddenRepeatedRowsODS);
 CPPUNIT_TEST(testHyperlinkTargetFrameODS);
@@ -3723,6 +3725,47 @@ void ScExportTest::testExponentWithoutSignFormatXLSX()
 xDocSh->DoClose();
 }
 
+void ScExportTest::testExtendedLCID()
+{
+ScDocShellRef xDocSh = loadDoc("tdf36038_ExtendedLCID.", FORMAT_ODS);
+CPPUNIT_ASSERT( xDocSh.Is() );
+xDocSh = saveAndReload( &(*xDocSh), FORMAT_XLSX);
+CPPUNIT_ASSERT( xDocSh.Is() );
+
+xmlDocPtr pDoc = XPathHelper::parseExport(*xDocSh, m_xSFactory, 
"xl/styles.xml", FORMAT_XLSX);
+CPPUNIT_ASSERT(pDoc);
+// Check export
+assertXPath(pDoc, "/x:styleSheet/x:numFmts/x:numFmt[2]", "formatCode", 
"[$-107041E]DD\\-MM\\-");
+assertXPath(pDoc, "/x:styleSheet/x:numFmts/x:numFmt[3]", "formatCode", 
"[$-D07041E]DD\\-MM\\-");
+assertXPath(pDoc, "/x:styleSheet/x:numFmts/x:numFmt[4]", "formatCode", 
"[$-1030411]DD\\-MM\\-EE");
+assertXPath(pDoc, "/x:styleSheet/x:numFmts/x:numFmt[5]", "formatCode", 
"[$-1B030411]DD\\-MM\\-EE");
+assertXPath(pDoc, "/x:styleSheet/x:numFmts/x:numFmt[6]", "formatCode", 
"[$-108040D]DD\\-MM\\-");
+//assertXPath(pDoc, "/x:styleSheet/x:numFmts/x:numFmt[7]", "formatCode", 
"[$-108040D]DD\\-MM\\-");
+assertXPath(pDoc, "/x:styleSheet/x:numFmts/x:numFmt[7]", "formatCode", 
"[$-1060401]DD\\-MM\\-");
+assertXPath(pDoc, "/x:styleSheet/x:numFmts/x:numFmt[8]", "formatCode", 
"[$-2060401]DD\\-MM\\-");
+
+// Check import
+ScDocument& rDoc = xDocSh->GetDocument();
+SvNumberFormatter* pNumFormatter = rDoc.GetFormatTable();
+sal_uInt32 nNumberFormat;
+const OUString aLang[4] = { "[$-41E]", "[$-411]", "[$-40D]", "[$-401]" };
+const OUString aCalendar[4] = { "[~buddhist]DD-MM-", 
"[~gengou]DD-MM-EE", "[~jewish]DD-MM-", "[~hijri]DD-MM-" };
+for ( sal_Int16 nCol = 1; nCol <= 2; nCol++ )
+{
+for ( sal_Int16 nRow = 1; nRow <= 4; nRow++ )
+{
+rDoc.GetNumberFormat(nCol, nRow, 0, nNumberFormat);
+const SvNumberformat* pNumberFormat = 
pNumFormatter->GetEntry(nNumberFormat);
+const OUString& rFormatStr = pNumberFormat->GetFormatstring();
+const OUString aExpectedFormatStr = aLang[nRow-1] + ( (nCol==2 && 
nRow!=3) ? OUString("[NatNum1]") : OUString("") ) + aCalendar[nRow-1];
+
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Number format lost extended LCID 
during Excel export", aExpectedFormatStr, rFormatStr);
+}
+}
+
+xDocSh->DoClose();
+}
+
 void ScExportTest::testHiddenRepeatedRowsODS()
 {
 ScDocShellRef xDocSh = loadDoc("empty.", FORMAT_ODS);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: svl/qa

2016-11-09 Thread Laurent Balland-Poirier
 svl/qa/unit/svl.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 2e84e730a89de683c97bbcab89cd2dbf5a7a9b6d
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Sat Oct 22 22:07:30 2016 +0200

tdf#102507 Add qa test of left aligned denominator

New behavior of format # ?/??? gives for 3.5
3 1/2
instead of
3 1/  2

Change-Id: I87f4a71fb13d8424017d557213bb4d279de28af5
Reviewed-on: https://gerrit.libreoffice.org/30167
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Eike Rathke <er...@redhat.com>

diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx
index 48b5b44..b8c3fc3 100644
--- a/svl/qa/unit/svl.cxx
+++ b/svl/qa/unit/svl.cxx
@@ -1178,6 +1178,11 @@ void Test::testUserDefinedNumberFormats()
 sExpected = "-575 540/697";
 checkPreviewString(aFormatter, sCode, -575.774749601315, eLang, 
sExpected);
 }
+{  // tdf#102507: left alignment of denominator
+sCode = "# ?/???";
+sExpected = "3 1/2  ";
+checkPreviewString(aFormatter, sCode, 3.5, eLang, sExpected);
+}
 {  // tdf#100594: forced denominator
 sCode = "# ?/100";
 sExpected = " 6/100";
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/qa

2016-11-09 Thread Laurent Balland-Poirier
 sc/qa/unit/data/ods/tdf102370_ExponentWithoutSign.ods |binary
 sc/qa/unit/subsequent_export-test.cxx |   27 +-
 2 files changed, 26 insertions(+), 1 deletion(-)

New commits:
commit b0901f9f0843c2d85da6742780d9aef296f62c60
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Sat Oct 22 23:51:14 2016 +0200

tdf#102370 QA test exponent without sign during export to Excel

Change-Id: I0adf7d97f297a8fe1003c8e4cb9a08c9070ed92e
Reviewed-on: https://gerrit.libreoffice.org/30170
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Eike Rathke <er...@redhat.com>

diff --git a/sc/qa/unit/data/ods/tdf102370_ExponentWithoutSign.ods 
b/sc/qa/unit/data/ods/tdf102370_ExponentWithoutSign.ods
new file mode 100644
index 000..ab3fbd7
Binary files /dev/null and 
b/sc/qa/unit/data/ods/tdf102370_ExponentWithoutSign.ods differ
diff --git a/sc/qa/unit/subsequent_export-test.cxx 
b/sc/qa/unit/subsequent_export-test.cxx
index 9a47f47..b9bbc30 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -61,6 +61,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -179,6 +180,7 @@ public:
 void testTdf88657();
 void testEscapeCharInNumberFormatXLSX();
 void testNatNumInNumberFormatXLSX();
+void testExponentWithoutSignFormatXLSX();
 
 void testHiddenRepeatedRowsODS();
 void testHyperlinkTargetFrameODS();
@@ -264,6 +266,7 @@ public:
 CPPUNIT_TEST(testTdf88657);
 CPPUNIT_TEST(testEscapeCharInNumberFormatXLSX);
 CPPUNIT_TEST(testNatNumInNumberFormatXLSX);
+CPPUNIT_TEST(testExponentWithoutSignFormatXLSX);
 
 CPPUNIT_TEST(testHiddenRepeatedRowsODS);
 CPPUNIT_TEST(testHyperlinkTargetFrameODS);
@@ -3698,6 +3701,28 @@ void ScExportTest::testNatNumInNumberFormatXLSX()
 xDocSh->DoClose();
 }
 
+void ScExportTest::testExponentWithoutSignFormatXLSX()
+{
+ScDocShellRef xDocSh = loadDoc("tdf102370_ExponentWithoutSign.", 
FORMAT_ODS);
+CPPUNIT_ASSERT( xDocSh.Is() );
+xDocSh = saveAndReload( &(*xDocSh), FORMAT_XLSX);
+CPPUNIT_ASSERT( xDocSh.Is() );
+
+xDocSh = saveAndReload( &(*xDocSh), FORMAT_ODS);
+CPPUNIT_ASSERT(xDocSh.Is());
+
+ScDocument& rDoc = xDocSh->GetDocument();
+sal_uInt32 nNumberFormat;
+rDoc.GetNumberFormat(0, 0, 0, nNumberFormat);
+const SvNumberformat* pNumberFormat = 
rDoc.GetFormatTable()->GetEntry(nNumberFormat);
+const OUString& rFormatStr = pNumberFormat->GetFormatstring();
+const OUString aExpectedFormatStr = "0.00E0";
+
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Number format lost exponent without sign 
during Excel export", aExpectedFormatStr, rFormatStr);
+
+xDocSh->DoClose();
+}
+
 void ScExportTest::testHiddenRepeatedRowsODS()
 {
 ScDocShellRef xDocSh = loadDoc("empty.", FORMAT_ODS);
@@ -3708,7 +3733,7 @@ void ScExportTest::testHiddenRepeatedRowsODS()
 rDoc.SetRowHidden(0, 20, 0, true);
 }
 
-xDocSh = saveAndReload( &(*xDocSh), FORMAT_ODS);  // Convert [NatNum5] to 
[DBNum2] in Chinese
+xDocSh = saveAndReload( &(*xDocSh), FORMAT_ODS);
 ScDocument& rDoc = xDocSh->GetDocument();
 SCROW nFirstRow = 0;
 SCROW nLastRow = 0;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sfx2/classification

2016-11-03 Thread Laurent Balland-Poirier
 sfx2/classification/example_fr-FR.xml |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f2bc1a61f6df66848ecb073a97b6b22fa469ef4d
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Sun Oct 23 18:08:02 2016 +0200

tdf#100352 Classification: Update French translation

Change-Id: Ie5efebfe4df73adca51638c85ba52e7901eac139
Reviewed-on: https://gerrit.libreoffice.org/30182
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

diff --git a/sfx2/classification/example_fr-FR.xml 
b/sfx2/classification/example_fr-FR.xml
index eb551ac..4e0ab99 100644
--- a/sfx2/classification/example_fr-FR.xml
+++ b/sfx2/classification/example_fr-FR.xml
@@ -3,7 +3,7 @@
 
 Exemple d'autorité TSCP
 
-Exemple de police TSCP
+Exemple de stratégie TSCP
 
 urn:example:tscp:1
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sfx2/classification sfx2/Package_classification.mk

2016-10-17 Thread Laurent Balland-Poirier
 sfx2/Package_classification.mk|1 
 sfx2/classification/example_fr-FR.xml |   84 ++
 2 files changed, 85 insertions(+)

New commits:
commit 74c1355c99b3c5edb9673cc1bf1438f10e68d658
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Sun Oct 16 11:10:49 2016 +0200

tdf#100352 Provide French classification file

Change-Id: I1dea9c22054dde4a52241d544fb02c0ad84b0872
Reviewed-on: https://gerrit.libreoffice.org/29915
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

diff --git a/sfx2/Package_classification.mk b/sfx2/Package_classification.mk
index e50eb14..71684f4 100644
--- a/sfx2/Package_classification.mk
+++ b/sfx2/Package_classification.mk
@@ -12,6 +12,7 @@ $(eval $(call 
gb_Package_Package,sfx2_classification,$(SRCDIR)/sfx2))
 $(eval $(call 
gb_Package_add_files,sfx2_classification,$(LIBO_SHARE_FOLDER)/classification,\
classification/example.xml \
classification/example_ca-ES.xml \
+   classification/example_fr-FR.xml \
classification/example_hu-HU.xml \
classification/example_nl-NL.xml \
classification/example_pt-BR.xml \
diff --git a/sfx2/classification/example_fr-FR.xml 
b/sfx2/classification/example_fr-FR.xml
new file mode 100644
index 000..eb551ac
--- /dev/null
+++ b/sfx2/classification/example_fr-FR.xml
@@ -0,0 +1,84 @@
+
+
+
+Exemple d'autorité TSCP
+
+Exemple de police TSCP
+
+urn:example:tscp:1
+
+
+
+
+
+
+UK-Cabinet
+0
+
+
+
+
+
+
+Document: Header
+
+Classification : professionnel
+
+
+
+UK-Cabinet
+1
+
+
+
+
+
+
+Document: Header
+
+Classification : confidentiel
+
+
+Document: Footer
+
+Ce contenu est marqué confidentiel. Ne le 
communiquez pas à l'extérieur sans un accord de l'entreprise.
+
+
+Document: Watermark
+
+Confidentiel
+
+
+
+UK-Cabinet
+2
+
+
+
+
+
+
+Document: Header
+
+Classification : exclusivement en 
interne
+
+
+Document: Footer
+
+Ce contenu est marqué pour un usage interne 
exclusivement. Il ne doit pas être communiqué  à l'extérieur de 
l'entreprise.
+
+
+Document: Watermark
+
+Interne exclusivement
+
+
+
+UK-Cabinet
+3
+
+
+
+
+
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-10-10 Thread Laurent Balland-Poirier
 svl/source/numbers/zformat.cxx |  307 -
 1 file changed, 277 insertions(+), 30 deletions(-)

New commits:
commit aa4e560822787d62de0bcca52036242ce1160b45
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Sat Sep 10 12:23:41 2016 +0200

tdf#36038 Import extended LCID from Excel

Extended LCID were only supported for Thai.
This commit import also for some other numerals and calendars.

Change-Id: Id92a0ee2a32c5722e9674fe0ac5ff7028c84bca6
Reviewed-on: https://gerrit.libreoffice.org/28809
Reviewed-by: Eike Rathke <er...@redhat.com>
Tested-by: Eike Rathke <er...@redhat.com>

diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index e2caebf..a37987e 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -538,43 +538,290 @@ static bool lcl_SvNumberformat_IsBracketedPrefix( short 
nSymbolType )
 return false;
 }
 
-
-OUString SvNumberformat::ImpObtainCalendarAndNumerals( OUStringBuffer & 
rString, sal_Int32 & nPos,
-   LanguageType & nLang, 
const LocaleType & aTmpLocale )
+/** Import extended LCID from Excel
+ */
+OUString SvNumberformat::ImpObtainCalendarAndNumerals( OUStringBuffer& 
rString, sal_Int32& nPos,
+   LanguageType& nLang, 
const LocaleType& aTmpLocale )
 {
 OUString sCalendar;
-/* TODO: this could be enhanced to allow other possible locale dependent
+sal_uInt16 nNatNum = 0;
+LanguageType nLocaleLang = MsLangId::getRealLanguage( maLocale.meLanguage 
);
+LanguageType nTmpLocaleLang = MsLangId::getRealLanguage( 
aTmpLocale.meLanguage );
+/* NOTE: enhancement to allow other possible locale dependent
  * calendars and numerals. BUT only if our locale data allows it! For LCID
  * numerals and calendars see
- * http://office.microsoft.com/en-us/excel/HA010346351033.aspx */
-if (MsLangId::getRealLanguage( aTmpLocale.meLanguage) == LANGUAGE_THAI)
-{
-// Numeral shape code "D" = Thai digits.
-if (aTmpLocale.mnNumeralShape == 0xD)
-{
-rString.insert( nPos, "[NatNum1]");
-}
-// Calendar type code "07" = Thai Buddhist calendar, insert this after
-// all prefixes have been consumed as it is actually a format modifier
-// and not a prefix.
-if (aTmpLocale.mnCalendarType == 0x07)
-{
-// Currently calendars are tied to the locale of the entire number
-// format, e.g. [~buddhist] in en_US doesn't work.
-// => Having different locales in sub formats does not work!
-/* TODO: calendars could be tied to a sub format's NatNum info
- * instead, or even better be available for any locale. Needs a
- * different implementation of GetCal() and locale data calendars.
- * */
-// If this is not Thai yet, make it so.
-if (MsLangId::getRealLanguage( maLocale.meLanguage) != 
LANGUAGE_THAI)
-{
-maLocale = aTmpLocale;
-nLang = maLocale.meLanguage = LANGUAGE_THAI;
+ * http://office.microsoft.com/en-us/excel/HA010346351033.aspx
+ * Calendar is inserted after
+ * all prefixes have been consumed as it is actually a format modifier
+ * and not a prefix.
+ * Currently calendars are tied to the locale of the entire number
+ * format, e.g. [~buddhist] in en_US doesn't work.
+ * => Having different locales in sub formats does not work!
+ * */
+/* TODO: calendars could be tied to a sub format's NatNum info
+ * instead, or even better be available for any locale. Needs a
+ * different implementation of GetCal() and locale data calendars.
+ * */
+switch ( aTmpLocale.mnCalendarType & 0x7F )
+{
+case 0x03 : // Gengou calendar
+sCalendar = "[~gengou]";
+// Only Japanese language support Gengou calendar
+if ( nLocaleLang != LANGUAGE_JAPANESE )
+{
+nLang = maLocale.meLanguage = LANGUAGE_JAPANESE;
+}
+break;
+case 0x05 : // unknown calendar
+break;
+case 0x06 : // Hijri calendar
+case 0x17 : // same?
+sCalendar = "[~hijri]";
+// Only Arabic or Farsi languages support Hijri calendar
+if ( ( ( nLocaleLang & LANGUAGE_MASK_PRIMARY ) != 
LANGUAGE_ARABIC_PRIMARY_ONLY )
+  && nLocaleLang != LANGUAGE_FARSI )
+{
+if ( ( ( nTmpLocaleLang & LANGUAGE_MASK_PRIMARY ) == 
LANGUAGE_ARABIC_PRIMARY_ONLY )
+  || nTmpLocaleLang == LANGUAGE_FARSI )
+{
+nLang = maLocale.meLanguage = aTmpL

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

2016-10-10 Thread Laurent Balland-Poirier
 svl/source/numbers/zformat.cxx |  193 +
 1 file changed, 158 insertions(+), 35 deletions(-)

New commits:
commit e991b421905e78f020d6ece280dd17bfce4e31e0
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Sun Sep 4 12:42:57 2016 +0200

tdf#36038 Export to Excel extended LCID

Number format: extend export to Excel of long LCID for other languages
and calendars than only Thai and Buddhist

Change-Id: I826347302d14caa5b4463d28cd25f2c36ebfef5d
Reviewed-on: https://gerrit.libreoffice.org/28666
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Eike Rathke <er...@redhat.com>

diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index f4b7834..e2caebf 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -4641,22 +4641,35 @@ static void lcl_SvNumberformat_AddLimitStringImpl( 
OUString& rStr,
 }
 }
 
-void lcl_insertLCID( OUStringBuffer& aFormatStr, const OUString& rLCIDString, 
sal_Int32 nPosInsertLCID )
+void lcl_insertLCID( OUStringBuffer& rFormatStr, sal_uInt32 nLCID, sal_Int32 
nPosInsertLCID )
 {
-OUStringBuffer aLCIDString;
-if ( !rLCIDString.isEmpty() )
-{
-aLCIDString = "[$-" + rLCIDString + "]";
-}
+if ( nLCID == 0 )
+return;
+OUStringBuffer aLCIDString = OUString::number( nLCID , 16 
).toAsciiUpperCase();
 // Search for only last DBNum which is the last element before insertion 
position
 if ( nPosInsertLCID >= 8
-&& rLCIDString.getLength() > 4
-&& aFormatStr.indexOf( "[DBNum", nPosInsertLCID-8) == nPosInsertLCID-8 
)
+&& aLCIDString.getLength() > 4
+&& rFormatStr.indexOf( "[DBNum", nPosInsertLCID-8) == nPosInsertLCID-8 
)
 {   // remove DBNumX code if long LCID
 nPosInsertLCID -= 8;
-aFormatStr.remove( nPosInsertLCID, 8 );
+rFormatStr.remove( nPosInsertLCID, 8 );
 }
-aFormatStr.insert( nPosInsertLCID, aLCIDString.toString() );
+aLCIDString.insert( 0, "[$-" );
+aLCIDString.append( "]" );
+rFormatStr.insert( nPosInsertLCID, aLCIDString.toString() );
+}
+
+/** Increment nAlphabetID for CJK numerals
+ * +1 for financial numerals [NatNum2]
+ * +2 for Arabic fullwidth numerals [NatNum3]
+ * */
+void lcl_incrementAlphabetWithNatNum ( sal_uInt32& nAlphabetID, sal_uInt32 
nNatNum )
+{
+if ( nNatNum == 2) // financial
+nAlphabetID += 1;
+else if ( nNatNum == 3)
+nAlphabetID += 2;
+nAlphabetID = nAlphabetID << 24;
 }
 
 OUString SvNumberformat::GetMappedFormatstring( const NfKeywordTable& 
rKeywords,
@@ -4717,7 +4730,6 @@ OUString SvNumberformat::GetMappedFormatstring( const 
NfKeywordTable& rKeywords,
 nSem++;
 }
 OUString aPrefix;
-bool bLCIDInserted = false;
 
 if ( !bDefaults )
 {
@@ -4781,6 +4793,7 @@ OUString SvNumberformat::GetMappedFormatstring( const 
NfKeywordTable& rKeywords,
 aStr.append( aPrefix );
 }
 sal_Int32 nPosInsertLCID = aStr.getLength();
+sal_uInt32 nCalendarID = 0x000; // Excel ID of calendar used in 
sub-format see tdf#36038
 if ( nAnz )
 {
 const short* pType = NumFor[n].Info().nTypeArray;
@@ -4838,21 +4851,25 @@ OUString SvNumberformat::GetMappedFormatstring( const 
NfKeywordTable& rKeywords,
 }
 break;
 case NF_SYMBOLTYPE_CALDEL :
-if ( pStr[j+1] == "buddhist" )
+if ( pStr[j+1] == "gengou" )
 {
-if ( aNatNum.IsSet() && aNatNum.GetNatNum() == 1 &&
- MsLangId::getRealLanguage( aNatNum.GetLang() 
) ==
- LANGUAGE_THAI )
-{
-lcl_insertLCID( aStr, "D07041E", 
nPosInsertLCID ); // date in Thai digit, Buddhist era
-}
-else
-{
-lcl_insertLCID( aStr, "107041E", 
nPosInsertLCID ); // date in Arabic digit, Buddhist era
-}
-j = j+2;
-bLCIDInserted = true;
+nCalendarID = 0x003;
+}
+else if ( pStr[j+1] == "hijri" )
+{
+nCalendarID = 0x006;
 }
+else if ( pStr[j+1] == "buddhist" )
+{
+nCalendarID = 0x007;
+

[Libreoffice-commits] core.git: svl/source xmloff/source

2016-10-07 Thread Laurent Balland-Poirier
 svl/source/numbers/zformat.cxx   |7 +--
 xmloff/source/style/xmlnumfe.cxx |5 +++--
 2 files changed, 8 insertions(+), 4 deletions(-)

New commits:
commit 4b81e61682e7af2af0c00c0a267d4a1f267c45f1
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Thu Sep 22 22:04:38 2016 +0200

tdf#102370 Correctly export to Excel exponent without sign

Exponent without sign in scientific notation is coded in Excel with a minus
sign replacing plus sign: 0.00E-00 for instance
This format is already correctly treated in Calc but was not correctly
exported to Excel or ODF

Change-Id: Ide117b04e0eb887c6cdd6699ae8ec723d1d29d50
Reviewed-on: https://gerrit.libreoffice.org/29198
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Eike Rathke <er...@redhat.com>

diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 17583d4..f4b7834 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -4806,9 +4806,12 @@ OUString SvNumberformat::GetMappedFormatstring( const 
NfKeywordTable& rKeywords,
 aStr.append( rLocWrp.getNumThousandSep() );
 break;
 case NF_SYMBOLTYPE_EXP :
-// tdf#95677: Excel does not support exponent without 
sign
 aStr.append( rKeywords[NF_KEY_E] );
-aStr.append( "+" );
+if ( pStr[j].getLength() > 1 && pStr[j][1] == '+' )
+aStr.append( "+" );
+else
+// tdf#102370: Excel code for exponent without sign
+aStr.append( "-" );
 break;
 case NF_SYMBOLTYPE_DATESEP :
 aStr.append( rLocWrp.getDateSep() );
diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx
index f449331..3790e79 100644
--- a/xmloff/source/style/xmlnumfe.cxx
+++ b/xmloff/source/style/xmlnumfe.cxx
@@ -1321,8 +1321,9 @@ void SvXMLNumFmtExport::ExportPart_Impl( const 
SvNumberformat& rFormat, sal_uInt
 case NF_SYMBOLTYPE_EXP:
 bExpFound = true;   // following digits are 
exponent digits
 bInInteger = false;
-if ( pElemStr && pElemStr->getLength() == 1 )
-bExpSign = false;   // for 0.00E0
+if ( pElemStr && ( pElemStr->getLength() == 1
+  || ( pElemStr->getLength() == 2 && 
(*pElemStr)[1] == '-' ) ) )
+bExpSign = false;   // for 0.00E0 or 0.00E-00
 break;
 case NF_SYMBOLTYPE_CURRENCY:
 bCurrFound = true;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-10-05 Thread Laurent Balland-Poirier
 svl/source/numbers/zformat.cxx |8 
 1 file changed, 8 insertions(+)

New commits:
commit deb3fcc4876ec2ab45415a06fc80b247826cc48b
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Sun Sep 25 10:25:43 2016 +0200

tdf#102507 Left aligned denominator

In denominator, move blanks at the end of string
to have denominator left aligned

Change-Id: Ic7ce45dc1ba8c343232a0d4fa1bed2bde58a0bc2
Reviewed-on: https://gerrit.libreoffice.org/29267
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Eike Rathke <er...@redhat.com>
Tested-by: Eike Rathke <er...@redhat.com>

diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index eb0f048..bdeb74f 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -2557,6 +2557,14 @@ bool SvNumberformat::ImpGetFractionOutput(double fNumber,
 sal_Int32 k;   // Denominator
 
 bRes |= ImpNumberFill(sDiv, fNumber, k, j, nIx, NF_SYMBOLTYPE_FRAC);
+if ( !bHideFraction )
+{
+while ( sDiv[0] == ' ' )
+{
+sDiv.insert( sDenominatorFormat.getLength(), " " );
+sDiv.remove( 0, 1 );
+}
+}
 
 bool bCont = true;
 if (rInfo.nTypeArray[j] == NF_SYMBOLTYPE_FRAC)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - basic/source

2016-10-03 Thread Laurent Balland-Poirier
 basic/source/runtime/stdobj.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 74817e67441204416a4e6db0440d35c85a2fca84
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Sat Oct 1 15:00:26 2016 +0200

tdf#102872 TAB function is missing its argument

Commit 98f0e0eda50690bd01842c806bd13e3bc5af2966 introduced TAB function
but its declaration in basic/source/runtime/stdobj.cxx is missing its 
argument
So it used TAN function as argument

Change-Id: Id4461ca805f9c7034b0440de46b845f29f57e3b0
Reviewed-on: https://gerrit.libreoffice.org/29452
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Caolán McNamara <caol...@redhat.com>
Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/basic/source/runtime/stdobj.cxx b/basic/source/runtime/stdobj.cxx
index cc2484b..115252c 100644
--- a/basic/source/runtime/stdobj.cxx
+++ b/basic/source/runtime/stdobj.cxx
@@ -604,6 +604,7 @@ static Methods aMethods[] = {
   { "Expression",   SbxVARIANT, 0,nullptr,0 },
   { "Value",SbxVARIANT, 0,nullptr,0 },
 { "Tab",SbxSTRING,1 | FUNCTION_, RTLNAME(Tab),0 },
+  { "Count",SbxLONG, 0,nullptr,0 },
 { "Tan",SbxDOUBLE,1 | FUNCTION_, RTLNAME(Tan),0 },
   { "number",   SbxDOUBLE, 0,nullptr,0 },
 { "Time",   SbxVARIANT,   LFUNCTION_,RTLNAME(Time),0},
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-10-03 Thread Laurent Balland-Poirier
 basic/source/runtime/stdobj.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit db29cdcc70ba792ed54e0957929b4524816b1fb3
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Sat Oct 1 15:00:26 2016 +0200

tdf#102872 TAB function is missing its argument

Commit 98f0e0eda50690bd01842c806bd13e3bc5af2966 introduced TAB function
but its declaration in basic/source/runtime/stdobj.cxx is missing its 
argument
So it used TAN function as argument

Change-Id: Id4461ca805f9c7034b0440de46b845f29f57e3b0
Reviewed-on: https://gerrit.libreoffice.org/29437
Reviewed-by: Julien Nabet <serval2...@yahoo.fr>
Tested-by: Julien Nabet <serval2...@yahoo.fr>
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Caolán McNamara <caol...@redhat.com>
Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/basic/source/runtime/stdobj.cxx b/basic/source/runtime/stdobj.cxx
index cc2484b..115252c 100644
--- a/basic/source/runtime/stdobj.cxx
+++ b/basic/source/runtime/stdobj.cxx
@@ -604,6 +604,7 @@ static Methods aMethods[] = {
   { "Expression",   SbxVARIANT, 0,nullptr,0 },
   { "Value",SbxVARIANT, 0,nullptr,0 },
 { "Tab",SbxSTRING,1 | FUNCTION_, RTLNAME(Tab),0 },
+  { "Count",SbxLONG, 0,nullptr,0 },
 { "Tan",SbxDOUBLE,1 | FUNCTION_, RTLNAME(Tan),0 },
   { "number",   SbxDOUBLE, 0,nullptr,0 },
 { "Time",   SbxVARIANT,   LFUNCTION_,RTLNAME(Time),0},
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/uiconfig

2016-09-28 Thread Laurent Balland-Poirier
 cui/uiconfig/ui/optctlpage.ui |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 80942ca029a632beb48d0e1baf37e28a355c7dd9
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Sun Sep 18 21:01:00 2016 +0200

tdf#102235 Replace Hindi with Indic and add some sample digits

Tools > Options > Language settings > Complex Text Layout > Numerals:
Choosing "Hindi" (eastern arabic) numerals is quite confusing
for Hindi language which use Devanagari numerals.
I propose to recall it "Indic"
See https://en.wikipedia.org/wiki/Eastern_Arabic_numerals
and add some sample digits

Change-Id: I97e50d6e5c4715eb3aed9701457164269d5d75da
Reviewed-on: https://gerrit.libreoffice.org/29000
Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>
Tested-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

diff --git a/cui/uiconfig/ui/optctlpage.ui b/cui/uiconfig/ui/optctlpage.ui
index d965e0d..d585c06 100644
--- a/cui/uiconfig/ui/optctlpage.ui
+++ b/cui/uiconfig/ui/optctlpage.ui
@@ -232,8 +232,8 @@
 True
 False
 
-  Arabic
-  Hindi
+  Arabic (1, 2, 3...)
+  Indic (Ù£ ,Ù¢ ,Ù¡...)
   System
   Context
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/qa

2016-09-16 Thread Laurent Balland-Poirier
 sc/qa/unit/data/ods/tdf79398_NatNum5.ods |binary
 sc/qa/unit/subsequent_export-test.cxx|2 +-
 2 files changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b193670284a4129aea04fa62c965663551d609de
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Thu Sep 1 21:30:07 2016 +0200

tdf#79398 Add qa unit test for sub-format

Change-Id: I61e640185ef77335d0e393a3827d78579473cd33
Reviewed-on: https://gerrit.libreoffice.org/28604
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Eike Rathke <er...@redhat.com>
Tested-by: Eike Rathke <er...@redhat.com>

diff --git a/sc/qa/unit/data/ods/tdf79398_NatNum5.ods 
b/sc/qa/unit/data/ods/tdf79398_NatNum5.ods
index 08f2028..4346445 100644
Binary files a/sc/qa/unit/data/ods/tdf79398_NatNum5.ods and 
b/sc/qa/unit/data/ods/tdf79398_NatNum5.ods differ
diff --git a/sc/qa/unit/subsequent_export-test.cxx 
b/sc/qa/unit/subsequent_export-test.cxx
index bb6a350..ac1f035 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -3650,7 +3650,7 @@ void ScExportTest::testNatNumInNumberFormatXLSX()
 xmlDocPtr pDoc = XPathHelper::parseExport(*xDocSh, m_xSFactory, 
"xl/styles.xml", FORMAT_XLSX);
 CPPUNIT_ASSERT(pDoc);
 
-assertXPath(pDoc, "/x:styleSheet/x:numFmts/x:numFmt[2]", "formatCode", 
"[DBNum2][$-804]General");
+assertXPath(pDoc, "/x:styleSheet/x:numFmts/x:numFmt[2]", "formatCode", 
"[DBNum2][$-804]General;[RED][DBNum2][$-804]General");
 
 xDocSh->DoClose();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2016-09-15 Thread Laurent Balland-Poirier
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8b40c0a61c5cae6904219d895351efffa8f2a58c
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Tue Aug 30 18:34:51 2016 +0200

Updated core
Project: help  206a20ba56d185411cd099f324a0d9c0529eaf48

Correction for Hijri calendar

[~hijri] works for all locales using arabic alphabet, except Oman (may be a 
bug)

Change-Id: I42ba27032fdabe64b626db494e27b5f139f78325
Reviewed-on: https://gerrit.libreoffice.org/28502
Reviewed-by: Eike Rathke <er...@redhat.com>
Tested-by: Eike Rathke <er...@redhat.com>

diff --git a/helpcontent2 b/helpcontent2
index 6d24687..206a20b 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 6d24687976074e3bf84dcc4d373cc8a208b4e299
+Subproject commit 206a20ba56d185411cd099f324a0d9c0529eaf48
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-09-15 Thread Laurent Balland-Poirier
 source/text/shared/01/05020301.xhp |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 206a20ba56d185411cd099f324a0d9c0529eaf48
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Tue Aug 30 18:34:51 2016 +0200

Correction for Hijri calendar

[~hijri] works for all locales using arabic alphabet, except Oman (may be a 
bug)

Change-Id: I42ba27032fdabe64b626db494e27b5f139f78325
Reviewed-on: https://gerrit.libreoffice.org/28502
Reviewed-by: Eike Rathke <er...@redhat.com>
Tested-by: Eike Rathke <er...@redhat.com>

diff --git a/source/text/shared/01/05020301.xhp 
b/source/text/shared/01/05020301.xhp
index 40d62d0..ec040e5 100644
--- a/source/text/shared/01/05020301.xhp
+++ b/source/text/shared/01/05020301.xhp
@@ -716,7 +716,7 @@
 
 Entering Dates
 To enter a 
date in a cell, use the Gregorian calendar format. For example, in an English 
locale, enter 1/2/2002 for Jan 2, 2002.
-All date 
formats are dependent on the locale that is set in %PRODUCTNAME - Preferences
+All date 
formats are dependent on the locale that is set in %PRODUCTNAME - Preferences 
 Tools - 
Options - Language settings - 
Languages. For example, if your locale is set to 'Japanese', then the 
Gengou calendar is used. The default date format in %PRODUCTNAME uses the Gregorian Calendar.
 To specify a 
calendar format that is independent of the locale, add a modifier in front of 
the date format. For example, to display a date using the Jewish calendar 
format in a non-Hebrew locale, enter: [~jewish]DD/MM/.
 
@@ -766,7 +766,7 @@
   [~hijri]
 
 
-  Arabic Islamic Calendar, currently supported for the following 
locales: ar_EG, ar_LB, ar_SA, and ar_TN
+  Arabic Islamic Calendar
 
   
   
@@ -787,7 +787,7 @@
   
 
 
-If you perform a calculation that 
involves one or more cells using a date format, the result is formatted 
according to the following mappings:
+If you perform a calculation that 
involves one or more cells using a date format, the result is formatted 
according to the following mappings: 
 
 
 
@@ -885,7 +885,7 @@
 
 
 
-The DateTime format displays the 
date and time that an entry was made to a cell with this format.
+The DateTime format displays the 
date and time that an entry was made to a cell with this format. 
 
 
 
@@ -1836,4 +1836,4 @@
 
 
 
-
+
\ No newline at end of file
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-09-01 Thread Laurent Balland-Poirier
 svl/source/numbers/zformat.cxx |   30 +++---
 1 file changed, 15 insertions(+), 15 deletions(-)

New commits:
commit 662f5a5a16339ecda071ea6b95afefeea63c4fe9
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Sat Aug 27 19:14:39 2016 +0200

tdf#79398 Insert LCID in the correct sub-format

During XL export, LCID is insert in format if necessary.
If there are several sub-formats ([>0];[<0];[0])
this commit insert LCID in the correct one.

Change-Id: I016c38a3338634113bfc0aa7e20e028e2e01e201
Reviewed-on: https://gerrit.libreoffice.org/28427
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Eike Rathke <er...@redhat.com>
Tested-by: Eike Rathke <er...@redhat.com>

diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 767dadd..67f38ee 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -4633,24 +4633,22 @@ static void lcl_SvNumberformat_AddLimitStringImpl( 
OUString& rStr,
 }
 }
 
-void lcl_insertLCID( OUStringBuffer& aFormatStr, const OUString& rLCIDString )
+void lcl_insertLCID( OUStringBuffer& aFormatStr, const OUString& rLCIDString, 
sal_Int32 nPosInsertLCID )
 {
 OUStringBuffer aLCIDString;
 if ( !rLCIDString.isEmpty() )
 {
 aLCIDString = "[$-" + rLCIDString + "]";
 }
-sal_Int32 nPosDBNum = aFormatStr.lastIndexOf("[DBNum");
-if ( nPosDBNum >= 0 )
-{
-if ( rLCIDString.getLength() > 4 )  // remove DBNumX code if long LCID
-aFormatStr.remove( nPosDBNum, 8 );
-else
-nPosDBNum += 8; // other insert LCID after DBNum
+// Search for only last DBNum which is the last element before insertion 
position
+if ( nPosInsertLCID >= 8
+&& rLCIDString.getLength() > 4
+&& aFormatStr.indexOf( "[DBNum", nPosInsertLCID-8) == nPosInsertLCID-8 
)
+{   // remove DBNumX code if long LCID
+nPosInsertLCID -= 8;
+aFormatStr.remove( nPosInsertLCID, 8 );
 }
-else
-nPosDBNum = 0;
-aFormatStr.insert( nPosDBNum, aLCIDString.toString() );
+aFormatStr.insert( nPosInsertLCID, aLCIDString.toString() );
 }
 
 OUString SvNumberformat::GetMappedFormatstring( const NfKeywordTable& 
rKeywords,
@@ -4774,6 +4772,7 @@ OUString SvNumberformat::GetMappedFormatstring( const 
NfKeywordTable& rKeywords,
 {
 aStr.append( aPrefix );
 }
+sal_Int32 nPosInsertLCID = aStr.getLength();
 if ( nAnz )
 {
 const short* pType = NumFor[n].Info().nTypeArray;
@@ -4834,11 +4833,11 @@ OUString SvNumberformat::GetMappedFormatstring( const 
NfKeywordTable& rKeywords,
  MsLangId::getRealLanguage( aNatNum.GetLang() 
) ==
  LANGUAGE_THAI )
 {
-lcl_insertLCID( aStr, "D07041E" ); // date in 
Thai digit, Buddhist era
+lcl_insertLCID( aStr, "D07041E", 
nPosInsertLCID ); // date in Thai digit, Buddhist era
 }
 else
 {
-lcl_insertLCID( aStr, "107041E" ); // date in 
Arabic digit, Buddhist era
+lcl_insertLCID( aStr, "107041E", 
nPosInsertLCID ); // date in Arabic digit, Buddhist era
 }
 j = j+2;
 bLCIDInserted = true;
@@ -4857,12 +4856,13 @@ OUString SvNumberformat::GetMappedFormatstring( const 
NfKeywordTable& rKeywords,
 rKeywords[NF_KEY_THAI_T] == "T" &&
 MsLangId::getRealLanguage( aNatNum.GetLang()) == LANGUAGE_THAI 
)
 {
-lcl_insertLCID( aStr, "D00041E" ); // number in Thai digit
+lcl_insertLCID( aStr, "D00041E", nPosInsertLCID ); // number 
in Thai digit
 }
 else if ( aNatNum.IsComplete() && aNatNum.GetDBNum() > 0 )
 {
 lcl_insertLCID( aStr, OUString::number( 
sal::static_int_cast(
-MsLangId::getRealLanguage( 
aNatNum.GetLang())), 16).toAsciiUpperCase());
+MsLangId::getRealLanguage( 
aNatNum.GetLang())), 16).toAsciiUpperCase(),
+nPosInsertLCID);
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-08-31 Thread Laurent Balland-Poirier
 chart2/qa/extras/chart2_trendcalculators.cxx|4 ++--
 chart2/source/tools/PolynomialRegressionCurveCalculator.cxx |6 +-
 2 files changed, 7 insertions(+), 3 deletions(-)

New commits:
commit 488c8053dc824d4736b02020bb440d43c4933eb2
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Sun Jul 17 15:10:51 2016 +0200

Improve polynomial trendline equation representation

Insert a blank between x variable and its coefficient
Aplly also to linear trendline

Change-Id: I7d1e61f12aa1cf98b4181df6a4849df1e5293793
Reviewed-on: https://gerrit.libreoffice.org/27265
Reviewed-by: Noel Grandin <noelgran...@gmail.com>
Tested-by: Noel Grandin <noelgran...@gmail.com>

diff --git a/chart2/qa/extras/chart2_trendcalculators.cxx 
b/chart2/qa/extras/chart2_trendcalculators.cxx
index aa3717d..f3500fe 100644
--- a/chart2/qa/extras/chart2_trendcalculators.cxx
+++ b/chart2/qa/extras/chart2_trendcalculators.cxx
@@ -152,7 +152,7 @@ void Chart2TrendCalculators::testLinearRegression1()
 xValues[i] = d;
 yValues[i] = - 2.0 * d - 5.0 ;
 }
-checkCalculator( xValues, yValues, "f(x) = "+ OUStringLiteral1(aMinusSign) 
+" 2x "+ OUStringLiteral1(aMinusSign) +" 5");
+checkCalculator( xValues, yValues, "f(x) = "+ OUStringLiteral1(aMinusSign) 
+" 2 x "+ OUStringLiteral1(aMinusSign) +" 5");
 }
 
 // test y = A x ^ B
@@ -168,7 +168,7 @@ void Chart2TrendCalculators::testPolynomialRegression1()
 xValues[i] = d;
 yValues[i] =  - 2.0 * d * d + 4 * d - 5;
 }
-OUString sExpectedFormula( "f(x) = "+ OUStringLiteral1(aMinusSign) +" 2x" 
+ OUStringLiteral1( aSuperscriptFigures[2] ) + " + 4x "+ 
OUStringLiteral1(aMinusSign) +" 5" );
+OUString sExpectedFormula( "f(x) = "+ OUStringLiteral1(aMinusSign) +" 2 x" 
+ OUStringLiteral1( aSuperscriptFigures[2] ) + " + 4 x "+ 
OUStringLiteral1(aMinusSign) +" 5" );
 checkCalculator( xValues, yValues, sExpectedFormula );
 }
 
diff --git a/chart2/source/tools/PolynomialRegressionCurveCalculator.cxx 
b/chart2/source/tools/PolynomialRegressionCurveCalculator.cxx
index 9b88599..ef3ba7e 100644
--- a/chart2/source/tools/PolynomialRegressionCurveCalculator.cxx
+++ b/chart2/source/tools/PolynomialRegressionCurveCalculator.cxx
@@ -252,7 +252,7 @@ OUString 
PolynomialRegressionCurveCalculator::ImplGetRepresentation(
 nCharMin += 3; // " + "
 if ( i > 0 )
 {
- nCharMin += mXName.getLength(); // "x"
+nCharMin += mXName.getLength() + 1; // " x"
 if ( i > 1 )
 nCharMin +=1; // "^i"
 if ( i >= 10 )
@@ -292,7 +292,11 @@ OUString 
PolynomialRegressionCurveCalculator::ImplGetRepresentation(
 sal_Int32* pValueLength = nValueLength ?  : nullptr;
 OUString aValueString = getFormattedString( xNumFormatter, 
nNumberFormatKey, aValue, pValueLength );
 if ( i == 0 || aValueString != "1" )  // aValueString may be rounded 
to 1 if nValueLength is small
+{
 aTmpBuf.append( aValueString );
+if ( i > 0 ) // insert blank between coefficient and x
+aTmpBuf.append( " " );
+}
 
 if(i > 0)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-08-30 Thread Laurent Balland-Poirier
 chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 022a58136d47a41cd490e00b2490329b8f7e6725
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Fri Aug 5 12:38:12 2016 +0200

tdf#64145 Add empty subtitle string as default

Only empty Title create automatic title.
Empty subtitle has no other effect than remove subtitle
if it is kept empty

Change-Id: I7e7de198585885866efea24de3a66c26d3e340ae
Reviewed-on: https://gerrit.libreoffice.org/27904
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com>

diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx 
b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
index 738b49a..ac4023b 100644
--- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
@@ -660,7 +660,7 @@ void WrappedHasSubTitleProperty::setPropertyValue( const 
Any& rOuterValue, const
 try
 {
 if( bNewValue )
-TitleHelper::createTitle( TitleHelper::SUB_TITLE, "sub-title", 
m_spChart2ModelContact->getChartModel(), m_spChart2ModelContact->m_xContext );
+TitleHelper::createTitle( TitleHelper::SUB_TITLE, "", 
m_spChart2ModelContact->getChartModel(), m_spChart2ModelContact->m_xContext );
 else
 TitleHelper::removeTitle( TitleHelper::SUB_TITLE, 
m_spChart2ModelContact->getChartModel() );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-08-29 Thread Laurent Balland-Poirier
 source/text/schart/01/04050100.xhp |  316 -
 1 file changed, 207 insertions(+), 109 deletions(-)

New commits:
commit a1ae3364bcbf664a39922cefc081ccc74fce570c
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Thu Aug 18 19:13:06 2016 +0200

Rewrite Trend Line Help page

Insert new types of regression
Update constraints
Add new options (X-Y names)
Reorganisation of the page

Update:
Convert all power value to 
Convert unicode character sigma to its HTML code 
as  is not recognized

Change-Id: If1fe158d8c19ac80fb03ef3c7491ada5b666ccd0
Reviewed-on: https://gerrit.libreoffice.org/28225
Reviewed-by: Olivier Hallot <ohal...@collabora.co.uk>
Tested-by: Olivier Hallot <ohal...@collabora.co.uk>

diff --git a/source/text/schart/01/04050100.xhp 
b/source/text/schart/01/04050100.xhp
index fe9a516..367cf54 100644
--- a/source/text/schart/01/04050100.xhp
+++ b/source/text/schart/01/04050100.xhp
@@ -1,6 +1,5 @@
 
 
-
 
-
+-->
 
 
-  
- Trend Lines 
- /text/schart/01/04050100.xhp
-  
-   
-   
-calculating;regression curves
-  regression curves in charts
-  trend lines in charts
-  mean value lines in charts
+  
+Trend Lines
+/text/schart/01/04050100.xhp
+  
+
+
+
+
+
+  calculating;regression curves
+  regression curves in charts
+  trend lines in charts
+  mean value lines in charts
 
 only use trend line, not regression curve: i89823
 
 
-Trend Lines
-
-  Trend lines can be 
added to all 2D chart types except for Pie and Stock charts.
-
-  
-  
- 
-  
-Linear
-A linear trend line is 
shown.
-Logarithmic
-A logarithmic trend line is 
shown.
-Exponential
-An exponential trend line is 
shown.
-Power
-A power trend line is 
shown.
-Show equation
-Shows the trend line equation 
next to the trend line.
-Show correlation coefficient (R2)
-Shows the coefficient of 
determination next to the trend line.
-  If 
you insert a trend line to a chart type that uses categories, like Line 
or Column, then the numbers 1, 2, 3, … are 
used as x-values to calculate the trend line.
-  
- 
-To insert trend lines for all data series, double-click the chart to 
enter edit mode. Choose Insert - Trend Lines, then 
select the type of trend line from None, Linear, Logarithmic, Exponential, or 
Power trend line.
- 
- 
-To insert a trend line for a single data series, select the data 
series in the chart, right-click to open the context menu, and choose Insert - Trend Line.
- 
- 
-To delete a single trend line or mean value line, click the line, 
then press the Del key.
- 
- 
-To delete all trend lines, choose Insert - 
Trend Lines, then select None.
- 
-  
-  A 
trend line is shown in the legend automatically.
+
+ 
Trend 
Lines
+  Trend lines can be added to all 2D chart 
types except for Pie and Stock charts.  
+
+
+  
+
+
+Linear
+
+A linear trend line is shown.
+
+Logarithmic
+
+A logarithmic trend line is shown.
+
+Exponential
+
+An exponential trend line is shown.
+
+Power
+
+A power trend line is shown.
+
+Polynomial
+
+A polynomial trend line is 
shown with a given degree.
+
+Degree
+
+Degree of polynomial trend 
line.
+
+Moving average
+
+A moving average trend line 
is shown with a given period.
+
+Period
+
+Number of points to 
calculate average of moving average trend line.
+
+Trend line name
+
+Name of trend line in 
legend.
+
+Extrapolate forward
+
+Trend line is extrapolated 
for higher x-values.
+
+Extrapolate backward
+
+Trend line is extrapolated 
for lower x-values.
+
+Force intercept
+
+For linear, polynomial and 
exponential trend lines, intercept value is forced to a given 
value.
+
+Intervept value
+
+Value of intercept if it is 
forced.
+
+Show equation
+
+Shows the trend line equation next to the trend 
line.
+
+Show correlation coefficient (R2)
+
+Shows the coefficient of determination next to the trend 
line.
+
+X name
+
+Name of X variable in trend 
line equation.
+
+Y name
+
+Name of Y variable in trend 
line equation.
+
+If you insert a 
trend line to a chart type that uses categories, like Line or 
Column, then the numbers 1, 2, 3, … are used as 
x-values to calculate the trend line. For such charts the XY chart type might 
be more suitable.
+
+
+  
+To insert 
a trend line for a data series, select the data series in the chart. Choose 
Insert - Trend Lines, or right-click to open the 
context menu, and choose Insert - Trend 
Line.
+  
+  
 
-Mean Value Lines are special trend lines that show 
the mean value. Use Insert - Mean Value Lines to 
insert mean value lines for data series.
+Mean Value Lines are special trend lines that show the mean 
value. Use Insert - Mean Value Lines to insert 
mean value lines for data series.
 
-  The trend line has the same color

[Libreoffice-commits] core.git: 2 commits - helpcontent2 schema/libreoffice

2016-08-29 Thread Laurent Balland-Poirier
 helpcontent2  |2 
 schema/libreoffice/OpenDocument-dsig-schema-v1.3+libreoffice.rng  |   77 
 schema/libreoffice/OpenDocument-manifest-schema-v1.3+libreoffice.rng  |  217 
 schema/libreoffice/OpenDocument-schema-v1.3+libreoffice.rng   |18079 
++
 schema/libreoffice/OpenDocument-v1.3+libreoffice-metadata.owl |   78 
 schema/libreoffice/OpenDocument-v1.3+libreoffice-package-metadata.owl |   75 
 6 files changed, 18527 insertions(+), 1 deletion(-)

New commits:
commit a46c9aa52a4963ab86bacb59f85b4e33596450fd
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Thu Aug 18 19:13:06 2016 +0200

Updated core
Project: help  a1ae3364bcbf664a39922cefc081ccc74fce570c

Rewrite Trend Line Help page

Insert new types of regression
Update constraints
Add new options (X-Y names)
Reorganisation of the page

Update:
Convert all power value to 
Convert unicode character sigma to its HTML code 
as  is not recognized

Change-Id: If1fe158d8c19ac80fb03ef3c7491ada5b666ccd0
Reviewed-on: https://gerrit.libreoffice.org/28225
Reviewed-by: Olivier Hallot <ohal...@collabora.co.uk>
Tested-by: Olivier Hallot <ohal...@collabora.co.uk>

diff --git a/helpcontent2 b/helpcontent2
index 32e0463..a1ae336 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 32e04637f0cdf7f44b17c83fb78f66752430ab41
+Subproject commit a1ae3364bcbf664a39922cefc081ccc74fce570c
commit 65d3436f3b0a5956c66b568df6636c059b2762bb
Author: Thorsten Behrens <thorsten.behr...@cib.de>
Date:   Sun Aug 28 23:39:38 2016 +0200

schema: copy of v1.3 schema to collect LO extensions

This will be used during export tests, to ensure libreoffice
extensions are properly added to the schema.

Change-Id: Ia24d914fbe67c135fd8e3ed1add8dbf8fbc05a72
Reviewed-on: https://gerrit.libreoffice.org/28449
Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>
Tested-by: Thorsten Behrens <thorsten.behr...@cib.de>

diff --git a/schema/libreoffice/OpenDocument-dsig-schema-v1.3+libreoffice.rng 
b/schema/libreoffice/OpenDocument-dsig-schema-v1.3+libreoffice.rng
new file mode 100644
index 000..2694b58
--- /dev/null
+++ b/schema/libreoffice/OpenDocument-dsig-schema-v1.3+libreoffice.rng
@@ -0,0 +1,77 @@
+
+
+http://www.w3.org/2000/09/xmldsig#; 
xmlns:dsig="urn:oasis:names:tc:opendocument:xmlns:digitalsignature:1.0" 
xmlns:rng="http://relaxng.org/ns/structure/1.0; 
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes;>
+  
+
+  
+
+  
+  
+
+  
+  
+  
+  
+  
+  
+
+  
+  
+
+  
+
+  
+
+
+
+  
+  
+
+  
+
+  
+  
+
+  
+  
+
+  
+
+  
+  
+
+  1.3
+
+  
+
diff --git 
a/schema/libreoffice/OpenDocument-manifest-schema-v1.3+libreoffice.rng 
b/schema/libreoffice/OpenDocument-manifest-schema-v1.3+libreoffice.rng
new file mode 100644
index 000..f485ffb
--- /dev/null
+++ b/schema/libreoffice/OpenDocument-manifest-schema-v1.3+libreoffice.rng
@@ -0,0 +1,217 @@
+
+
+http://relaxng.org/ns/structure/1.0; 
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes;>
+  
+
+  
+
+  
+  
+
+  
+  
+
+  
+  
+
+  
+
+  Blowfish CFB
+  
+
+  
+  
+
+  
+
+  
+  
+
+  
+
+
+  
+
+
+  
+  
+
+  
+
+
+  
+
+  
+
+  
+  
+
+  
+  
+
+  
+  
+
+  
+  
+  
+
+  
+  
+
+  
+  
+
+  
+
+  SHA1/1K
+  
+
+  
+  
+
+  
+
+  
+  
+
+  
+  
+
+  
+
+  
+  
+
+  
+
+  
+  
+
+  
+
+  
+  
+
+  
+  
+
+  
+edit
+presentation-slide-show
+read-only
+
+  
+
+  
+  
+
+  
+
+  
+
+  
+  
+
+  
+  
+
+  
+  
+
+  
+
+  PBKDF2
+  
+
+  
+  
+
+  
+  
+
+  
+  
+
+  
+
+  
+
+  
+  
+
+  
+  
+
+  
+
+  
+  
+
+  1.3
+
+  
+  
+
+  [^:]+:[^:]+
+
+  
+  
+
+  
+  
+
+  
+  
+
+  
+  
+
+  
+
+  SHA1
+  
+
+  
+  
+
+  
+
+  
+
+  
+  
+
+  
+
diff --git a/schema/libreoffice/OpenDocument-schema-v1.3+libreoffice.rng 
b/schema/libreoffice/OpenDocument-schema-v1.3+libreoffice.rng
new

[Libreoffice-commits] core.git: sc/qa

2016-08-23 Thread Laurent Balland-Poirier
 sc/qa/unit/data/ods/tdf79398_NatNum5.ods |binary
 sc/qa/unit/subsequent_export-test.cxx|   17 +
 2 files changed, 17 insertions(+)

New commits:
commit d7ce684cae03e97b23f916a90db55e49f17a1601
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Sat Aug 13 10:46:06 2016 +0200

tdf#79398 Add qa unit test

Native number format [NatNum5] in Chinese is exported to [DBNum2] in XLSX
with [$-804] to force Chinese language

Change-Id: I271772515558d0b080abf2435642e578ea63f392
Reviewed-on: https://gerrit.libreoffice.org/28097
Reviewed-by: Eike Rathke <er...@redhat.com>
Tested-by: Eike Rathke <er...@redhat.com>

diff --git a/sc/qa/unit/data/ods/tdf79398_NatNum5.ods 
b/sc/qa/unit/data/ods/tdf79398_NatNum5.ods
new file mode 100644
index 000..08f2028
Binary files /dev/null and b/sc/qa/unit/data/ods/tdf79398_NatNum5.ods differ
diff --git a/sc/qa/unit/subsequent_export-test.cxx 
b/sc/qa/unit/subsequent_export-test.cxx
index 848fbb8..18deabd 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -172,6 +172,7 @@ public:
 
 void testTdf88657();
 void testEscapeCharInNumberFormatXLSX();
+void testNatNumInNumberFormatXLSX();
 
 CPPUNIT_TEST_SUITE(ScExportTest);
 CPPUNIT_TEST(test);
@@ -252,6 +253,7 @@ public:
 
 CPPUNIT_TEST(testTdf88657);
 CPPUNIT_TEST(testEscapeCharInNumberFormatXLSX);
+CPPUNIT_TEST(testNatNumInNumberFormatXLSX);
 
 CPPUNIT_TEST_SUITE_END();
 
@@ -3638,6 +3640,21 @@ void ScExportTest::testEscapeCharInNumberFormatXLSX()
 xDocSh->DoClose();
 }
 
+void ScExportTest::testNatNumInNumberFormatXLSX()
+{
+ScDocShellRef xDocSh = loadDoc("tdf79398_NatNum5.", FORMAT_ODS);
+CPPUNIT_ASSERT( xDocSh.Is() );
+xDocSh = saveAndReload( &(*xDocSh), FORMAT_XLSX);  // Convert [NatNum5] to 
[DBNum2] in Chinese
+CPPUNIT_ASSERT( xDocSh.Is() );
+
+xmlDocPtr pDoc = XPathHelper::parseExport(*xDocSh, m_xSFactory, 
"xl/styles.xml", FORMAT_XLSX);
+CPPUNIT_ASSERT(pDoc);
+
+assertXPath(pDoc, "/x:styleSheet/x:numFmts/x:numFmt[2]", "formatCode", 
"[DBNum2][$-804]General");
+
+xDocSh->DoClose();
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(ScExportTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/svl svl/source

2016-08-23 Thread Laurent Balland-Poirier
 include/svl/zformat.hxx |3 +
 svl/source/numbers/zforlist.cxx |2 -
 svl/source/numbers/zformat.cxx  |   64 ++--
 3 files changed, 51 insertions(+), 18 deletions(-)

New commits:
commit 7a70cd77e44797d07a348993277b44a062868e9f
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Fri Aug 19 20:18:52 2016 +0200

tdf#79398 Add LCID with DBNum during export to XL

Change-Id: I64a01ef5eb7ada9bc5edbeb873e09fd348d8f6d4
Reviewed-on: https://gerrit.libreoffice.org/28256
Reviewed-by: Eike Rathke <er...@redhat.com>
Tested-by: Eike Rathke <er...@redhat.com>

diff --git a/include/svl/zformat.hxx b/include/svl/zformat.hxx
index ea98b08..b5da86a 100644
--- a/include/svl/zformat.hxx
+++ b/include/svl/zformat.hxx
@@ -184,7 +184,8 @@ public:
 
 // Build a format string of application defined keywords
 OUString GetMappedFormatstring( const NfKeywordTable& rKeywords,
-const LocaleDataWrapper& rLoc ) const;
+const LocaleDataWrapper& rLoc,
+LanguageType nOriginalLang = 
LANGUAGE_DONTKNOW ) const;
 
 void SetStarFormatSupport( bool b ) { bStarFlag = b; }
 
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index 0eaab97..37ac0a3 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -837,7 +837,7 @@ OUString SvNumberFormatter::GetFormatStringForExcel( 
sal_uInt32 nKey, const NfKe
 // before (which doesn't do anything if it was the same locale
 // already).
 rTempFormatter.ChangeIntl( LANGUAGE_ENGLISH_US);
-aFormatStr = pEntry->GetMappedFormatstring( rKeywords, 
*rTempFormatter.GetLocaleData());
+aFormatStr = pEntry->GetMappedFormatstring( rKeywords, 
*rTempFormatter.GetLocaleData(), nLang );
 }
 }
 }
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index b4c58cc..95e0c09 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -4634,8 +4634,29 @@ static void lcl_SvNumberformat_AddLimitStringImpl( 
OUString& rStr,
 }
 }
 
+void lcl_insertLCID( OUStringBuffer& aFormatStr, const OUString& rLCIDString )
+{
+OUStringBuffer aLCIDString;
+if ( !rLCIDString.isEmpty() )
+{
+aLCIDString = "[$-" + rLCIDString + "]";
+}
+sal_Int32 nPosDBNum = aFormatStr.lastIndexOf("[DBNum");
+if ( nPosDBNum >= 0 )
+{
+if ( rLCIDString.getLength() > 4 )  // remove DBNumX code if long LCID
+aFormatStr.remove( nPosDBNum, 8 );
+else
+nPosDBNum += 8; // other insert LCID after DBNum
+}
+else
+nPosDBNum = 0;
+aFormatStr.insert( nPosDBNum, aLCIDString.toString() );
+}
+
 OUString SvNumberformat::GetMappedFormatstring( const NfKeywordTable& 
rKeywords,
-const LocaleDataWrapper& 
rLocWrp ) const
+const LocaleDataWrapper& 
rLocWrp,
+LanguageType nOriginalLang /* 
=LANGUAGE_DONTKNOW */ ) const
 {
 OUStringBuffer aStr;
 bool bDefault[4];
@@ -4724,12 +4745,17 @@ OUString SvNumberformat::GetMappedFormatstring( const 
NfKeywordTable& rKeywords,
 }
 }
 
-const SvNumberNatNum& rNum = NumFor[n].GetNatNum();
-if ( rNum.IsComplete() && rNum.GetDBNum() > 0 )
-{
-aPrefix += "[DBNum";
-aPrefix += OUString::number( rNum.GetDBNum() );
-aPrefix += "]";
+SvNumberNatNum rNum = NumFor[n].GetNatNum();
+if (rNum.IsComplete() && (rNum.GetDBNum() > 0 || nOriginalLang != 
LANGUAGE_DONTKNOW))
+{   // GetFormatStringForExcel() may have changed language to en_US
+if (rNum.GetLang() == LANGUAGE_ENGLISH_US && nOriginalLang != 
LANGUAGE_DONTKNOW)
+rNum.SetLang( nOriginalLang );
+if ( rNum.GetDBNum() > 0 )
+{
+aPrefix += "[DBNum";
+aPrefix += OUString::number( rNum.GetDBNum() );
+aPrefix += "]";
+}
 }
 
 sal_uInt16 nAnz = NumFor[n].GetCount();
@@ -4809,11 +4835,11 @@ OUString SvNumberformat::GetMappedFormatstring( const 
NfKeywordTable& rKeywords,
  MsLangId::getRealLanguage( rNum.GetLang() ) ==
  LANGUAGE_THAI )
 {
-aStr.insert( 0, "[$-D07041E]" ); // date in 
Thai digit, Buddhist era
+lcl_insertLCID( aStr, "D07041E&q

[Libreoffice-commits] core.git: helpcontent2

2016-08-23 Thread Laurent Balland-Poirier
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8f49381a2174300985de114ca68f64f97a4ebe42
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Tue Aug 16 22:18:18 2016 +0200

Updated core
Project: help  01b5fd2938a9680a773203fafc25acdae093f5bf

Add new languages to Native Number [NatNum1]

following c16efc81bd9fb1cfc85f7949eccbdeb5818e5093
Build from source code in natnum1Locales[]
i18npool/source/nativenumber/nativenumbersupplier.cxx#438

Change-Id: Ifa17cca2f78c09f02cc21774cd8c9f10f790b849
Update: correct ids
Reviewed-on: https://gerrit.libreoffice.org/28181
Reviewed-by: Olivier Hallot <ohal...@collabora.co.uk>
Tested-by: Olivier Hallot <ohal...@collabora.co.uk>

diff --git a/helpcontent2 b/helpcontent2
index ea4100d..01b5fd2 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit ea4100df0c087e2439ae438cfa7a3d35efb6dd27
+Subproject commit 01b5fd2938a9680a773203fafc25acdae093f5bf
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-08-23 Thread Laurent Balland-Poirier
 source/text/shared/01/05020301.xhp |  274 +
 1 file changed, 251 insertions(+), 23 deletions(-)

New commits:
commit 01b5fd2938a9680a773203fafc25acdae093f5bf
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Tue Aug 16 22:18:18 2016 +0200

Add new languages to Native Number [NatNum1]

following c16efc81bd9fb1cfc85f7949eccbdeb5818e5093
Build from source code in natnum1Locales[]
i18npool/source/nativenumber/nativenumbersupplier.cxx#438

Change-Id: Ifa17cca2f78c09f02cc21774cd8c9f10f790b849
Update: correct ids
Reviewed-on: https://gerrit.libreoffice.org/28181
Reviewed-by: Olivier Hallot <ohal...@collabora.co.uk>
Tested-by: Olivier Hallot <ohal...@collabora.co.uk>

diff --git a/source/text/shared/01/05020301.xhp 
b/source/text/shared/01/05020301.xhp
index 7bc6872..40d62d0 100644
--- a/source/text/shared/01/05020301.xhp
+++ b/source/text/shared/01/05020301.xhp
@@ -716,7 +716,7 @@
 
 Entering Dates
 To enter a 
date in a cell, use the Gregorian calendar format. For example, in an English 
locale, enter 1/2/2002 for Jan 2, 2002.
-All date 
formats are dependent on the locale that is set in %PRODUCTNAME - Preferences 
+All date 
formats are dependent on the locale that is set in %PRODUCTNAME - Preferences
 Tools - 
Options - Language settings - 
Languages. For example, if your locale is set to 'Japanese', then the 
Gengou calendar is used. The default date format in %PRODUCTNAME uses the Gregorian Calendar.
 To specify a 
calendar format that is independent of the locale, add a modifier in front of 
the date format. For example, to display a date using the Jewish calendar 
format in a non-Hebrew locale, enter: [~jewish]DD/MM/.
 
@@ -787,7 +787,7 @@
   
 
 
-If you perform a calculation that 
involves one or more cells using a date format, the result is formatted 
according to the following mappings: 
+If you perform a calculation that 
involves one or more cells using a date format, the result is formatted 
according to the following mappings:
 
 
 
@@ -885,7 +885,7 @@
 
 
 
-The DateTime format displays the 
date and time that an entry was made to a cell with this format. 
+The DateTime format displays the 
date and time that an entry was made to a cell with this format.
 
 
 
@@ -1054,6 +1054,30 @@
   
   
 
+  Hebrew
+
+
+  Hebrew characters
+
+
+
+
+
+  
+  
+
+  Arabic
+
+
+  Arabic-Indic characters
+
+
+
+
+
+  
+  
+
   Thai
 
 
@@ -1066,10 +1090,10 @@
   
   
 
-  Arabic
+  Hindi
 
 
-  Indic characters
+  Indic-Devanagari characters
 
 
 
@@ -1078,10 +1102,10 @@
   
   
 
-  Hindi
+  Odia
 
 
-  Hindi characters
+  Odia (Oriya) characters
 
 
 
@@ -1090,10 +1114,202 @@
   
   
 
-  Hebrew
+  Marathi
+
+
+  Indic-Devanagari characters
+
+
+
+
+
+  
+  
+
+  Bengali
+
+
+  Bengali characters
+
+
+
+
+
+  
+  
+
+  Punjabi
+
+
+  Punjabi (Gurmukhi) characters
+
+
+
+
+
+  
+  
+
+  Gujarati
+
+
+  Gujarati characters
+
+
+
+
+
+  
+  
+
+  Tamil
+
+
+  Tamil characters
+
+
+
+
+
+  
+  
+
+  Telugu
+
+
+  Telugu characters
+
+
+
+
+
+  
+  
+
+  Kannada
+
+
+  Kannada characters
+
+
+
+
+
+  
+  
+
+  Malayalam
+
+
+  Malayalam characters
+
+
+
+
+
+  
+  
+
+  Lao
+
+
+  Lao characters
+
+
+
+
 
+  
+  
+
+  Tibetan
+
+
+  Tibetan characters
+
+
+
+
+
+  
+  
+
+  Burmese
+
+
+  Burmese (Myanmar) characters
+
+
+
+
+
+  
+  
+
+  Khmer
+
+
+  Khmer (Cambodian) characters
+
+
+
+
+
+  
+  
+
+  Mongolian
+
+
+  Mongolian characters
+
+
+
+
+
+  
+  
+
+  Nepali
+
+
+  Indic-Devanagari characters
+
+
+
+
+
+  
+  
+
+  Dzongkha
+
+
+  Tibetan characters
+
+
+
+
+
+  
+  
+
+  Farsi
+
+
+  East Arabic-Indic characters
+
+
+
+
+
+  
+  
 
-  Hebrew letters
+  Church Slavic
+
+
+  Cyrillic characters
 
 
 
@@ -1160,6 +1376,18 @@
   CAL 2/8/8 [DBNum2]
 
   
+  
+
+  Hebrew
+
+
+  Hebrew numbering
+
+
+
+
+
+  
 
 
 
@@ -1415,10 +1643,10 @@
   
   
 
-  Japanese
+  Chinese
 
 
-  modern short Kanji text
+  short lower case text
 
 
 
@@

[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - svl/source

2016-08-22 Thread Laurent Balland-Poirier
 svl/source/numbers/zformat.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f76783db61c65aaa169d5d2bddd3cc8ea714f061
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Sun Aug 21 22:57:20 2016 +0200

tdf#101636 Test index before reading OUString

Change-Id: I0a4c02b172fc6d3273f6aa2cca855c27705b4d68
Reviewed-on: https://gerrit.libreoffice.org/28282
Reviewed-by: Eike Rathke <er...@redhat.com>
Tested-by: Eike Rathke <er...@redhat.com>
(cherry picked from commit 734eb8b034c8035565d091aa016ce3b8df838b19)
Reviewed-on: https://gerrit.libreoffice.org/28314

diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 222d731..24ca0f9 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -1419,7 +1419,7 @@ short SvNumberformat::ImpNextSymbol(OUStringBuffer& 
rString,
 nLen--;
 break;
 case '$' :
-if ( rString[nPos] == '-' )
+if ( nPos < nLen && rString[nPos] == '-' )
 {
 // [$-xxx] locale
 sBuffSymbol.stripStart('[');
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-08-22 Thread Laurent Balland-Poirier
 svl/source/numbers/zformat.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 734eb8b034c8035565d091aa016ce3b8df838b19
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Sun Aug 21 22:57:20 2016 +0200

tdf#101636 Test index before reading OUString

Change-Id: I0a4c02b172fc6d3273f6aa2cca855c27705b4d68
Reviewed-on: https://gerrit.libreoffice.org/28282
Reviewed-by: Eike Rathke <er...@redhat.com>
Tested-by: Eike Rathke <er...@redhat.com>

diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 2cd9282..b4c58cc 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -1411,7 +1411,7 @@ short SvNumberformat::ImpNextSymbol(OUStringBuffer& 
rString,
 nLen--;
 break;
 case '$' :
-if ( rString[nPos] == '-' )
+if ( nPos < nLen && rString[nPos] == '-' )
 {
 // [$-xxx] locale
 sBuffSymbol.stripStart('[');
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: officecfg/registry

2016-08-18 Thread Laurent Balland-Poirier
 officecfg/registry/data/org/openoffice/Office/UI/ChartCommands.xcu |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d80ad9847e93be3cd20de6b233379ad328c8550c
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Thu Aug 18 20:46:21 2016 +0200

Correct menu Insert>Trend line

Only 1 trend line can be inserted. It is no more possible
to insert trend lines for all series at a time.
See comments in b0fbaa6fa28df570e8179f166fe0547892b2dbc7

Change-Id: I3a8548af3d3cd641b4da342ee03681647844fde3
Reviewed-on: https://gerrit.libreoffice.org/28226
Reviewed-by: Samuel Mehrbrodt <s.mehrbr...@gmail.com>
Tested-by: Samuel Mehrbrodt <s.mehrbr...@gmail.com>

diff --git a/officecfg/registry/data/org/openoffice/Office/UI/ChartCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/ChartCommands.xcu
index 3f9b85e..2db6b4c 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/ChartCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/ChartCommands.xcu
@@ -37,7 +37,7 @@
   
   
 
-  Tre~nd Lines...
+  Tre~nd Line...
 
   
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2016-08-18 Thread Laurent Balland-Poirier
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a3e3ad9007749e58b49fa457f993b7c55d660c57
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Sat Jul 23 22:15:07 2016 +0200

Updated core
Project: help  ea4100df0c087e2439ae438cfa7a3d35efb6dd27

tdf#30456 Add help to Merge Cells dialog

Describe the three options that will be introduced with commit:
https://gerrit.libreoffice.org/27463/

Change-Id: Iefe1b887d28d1845755e5beeadfa6d829c8d4acf
Reviewed-on: https://gerrit.libreoffice.org/27467
Reviewed-by: Eike Rathke <er...@redhat.com>
Tested-by: Eike Rathke <er...@redhat.com>

diff --git a/helpcontent2 b/helpcontent2
index 641b438..ea4100d 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 641b43850cb2903e640bfbdd5df413e80aff2b68
+Subproject commit ea4100df0c087e2439ae438cfa7a3d35efb6dd27
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-08-18 Thread Laurent Balland-Poirier
 source/text/scalc/01/0506.xhp |   13 +
 1 file changed, 13 insertions(+)

New commits:
commit ea4100df0c087e2439ae438cfa7a3d35efb6dd27
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Sat Jul 23 22:15:07 2016 +0200

tdf#30456 Add help to Merge Cells dialog

Describe the three options that will be introduced with commit:
https://gerrit.libreoffice.org/27463/

Change-Id: Iefe1b887d28d1845755e5beeadfa6d829c8d4acf
Reviewed-on: https://gerrit.libreoffice.org/27467
Reviewed-by: Eike Rathke <er...@redhat.com>
Tested-by: Eike Rathke <er...@redhat.com>

diff --git a/source/text/scalc/01/0506.xhp 
b/source/text/scalc/01/0506.xhp
index 7103af4..567626e 100644
--- a/source/text/scalc/01/0506.xhp
+++ b/source/text/scalc/01/0506.xhp
@@ -32,6 +32,7 @@
 
 
 
+
 Merge and Center Cells
 Combines the selected cells into a single cell or 
splits merged cells. Aligns cell content centered.
 
@@ -41,6 +42,18 @@
 
 The merged cell receives the name of the first cell of the original 
cell range. Merged cells cannot be merged a second time with other cells. The 
range must form a rectangle, multiple selection is not supported.
 If the cells to be merged have any contents, a security dialog is 
shown.
+Three options are 
available:
+
+  
+Move 
the contents of the hidden cells into the first cell: the actual 
contents of the hidden cells are concatenated to the first cell, and hidden 
cells are emptied; the results of formulas referring to the hidden cells or the 
first cell will be updated.
+  
+  
+Keep 
the contents of the hidden cells: the contents of the hidden cells are 
kept; the results of formulas referring to the hidden cells will not 
change.
+  
+  
+Empty 
the contents of the hidden cells: the contents of the hidden cells are 
removed; the results of formulas referring to the hidden cells will be 
updated.
+  
+
 Merging cells 
can lead to calculation errors in formulas in the table.
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: svl/qa

2016-08-18 Thread Laurent Balland-Poirier
 svl/qa/unit/svl.cxx |   11 +++
 1 file changed, 11 insertions(+)

New commits:
commit 502574cb4f1c081b55445fd4b47de6693ef293e2
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Sat Aug 13 11:22:31 2016 +0200

tdf#79399 tdf#101462 Add qa unit test

Test Native Number formats NatNum and DBNum

Change-Id: I6e62586d9bfcc27162017291ee110cb70f85d425
Reviewed-on: https://gerrit.libreoffice.org/28098
Reviewed-by: Eike Rathke <er...@redhat.com>
Tested-by: Eike Rathke <er...@redhat.com>

diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx
index 8fb241a..6eca0eb 100644
--- a/svl/qa/unit/svl.cxx
+++ b/svl/qa/unit/svl.cxx
@@ -1183,6 +1183,17 @@ void Test::testUserDefinedNumberFormats()
 sExpected = "2";
 checkPreviewString(aFormatter, sCode, 1.96, eLang, sExpected);
 }
+{  // tdf#79399 tdf#101462 Native Number Formats
+sCode = "[NatNum5][$-0404]General\\ ";
+sExpected = OUString(sal_Unicode(22777)) +  // 壹
+OUString(sal_Unicode(20336)) +  // ä½°
+OUString(sal_Unicode(36019)) +  // è²³
+OUString(sal_Unicode(25342)) +  // 拾
+OUString(sal_Unicode(' '));
+checkPreviewString(aFormatter, sCode, 120, eLang, sExpected);
+sCode = "[DBNum2][$-0404]General\\ ";
+checkPreviewString(aFormatter, sCode, 120, eLang, sExpected);
+}
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(Test);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: chart2/uiconfig

2016-08-18 Thread Laurent Balland-Poirier
 chart2/uiconfig/ui/tp_Trendline.ui |   18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

New commits:
commit 07b25764a4c5479526951c0a0f8fbe4b43f4103e
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Thu Aug 18 11:29:41 2016 +0200

Trend Line UI: R² was hidden

Un-hide correlation coefficient
better choice of shortcut

Change-Id: I85acd8a91de2d337d8619ba164dcd14d1939fac9
Reviewed-on: https://gerrit.libreoffice.org/28212
Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrh...@googlemail.com>

diff --git a/chart2/uiconfig/ui/tp_Trendline.ui 
b/chart2/uiconfig/ui/tp_Trendline.ui
index e2a05d7..fb1904b 100644
--- a/chart2/uiconfig/ui/tp_Trendline.ui
+++ b/chart2/uiconfig/ui/tp_Trendline.ui
@@ -87,7 +87,7 @@
 
 
   
-E_xponential
+_Exponential
 True
 True
 False
@@ -444,7 +444,7 @@
 
 
   
-Show 
_Equation
+Show 
E_quation
 True
 True
 False
@@ -481,7 +481,7 @@
 True
 False
 0
-Trendline 
Name
+Trendline 
_Name
 True
 entry_name
   
@@ -526,13 +526,13 @@
 True
 False
 0
-X Variable 
Name
+_X Variable 
Name
 True
 entry_Xname
   
   
 0
-5
+6
 1
 1
   
@@ -545,7 +545,7 @@
 
   
 1
-5
+6
 1
 1
   
@@ -555,13 +555,13 @@
 True
 False
 0
-Y Variable 
Name
+_Y Variable 
Name
 True
 entry_Yname
   
   
 0
-6
+7
 1
 1
   
@@ -574,7 +574,7 @@
 
   
 1
-6
+7
 1
 1
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - chart2/source chart2/uiconfig include/xmloff offapi/com xmloff/source

2016-08-16 Thread Laurent Balland-Poirier
 chart2/source/controller/dialogs/ObjectNameProvider.cxx  |   
10 +
 chart2/source/controller/dialogs/res_Trendline.cxx   |   
42 +++
 chart2/source/controller/dialogs/res_Trendline.hxx   |   
23 ++-
 chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx |   
26 
 chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx  |   
28 
 chart2/source/controller/main/ChartController_Insert.cxx |
2 
 chart2/source/controller/main/ChartController_Tools.cxx  |
2 
 chart2/source/inc/RegressionCurveCalculator.hxx  |
5 
 chart2/source/inc/chartview/ChartSfxItemIds.hxx  |
4 
 chart2/source/tools/ExponentialRegressionCurveCalculator.cxx |
6 -
 chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx |
8 -
 chart2/source/tools/MeanValueRegressionCurveCalculator.cxx   |
2 
 chart2/source/tools/PolynomialRegressionCurveCalculator.cxx  |
8 -
 chart2/source/tools/PotentialRegressionCurveCalculator.cxx   |
6 -
 chart2/source/tools/RegressionCurveCalculator.cxx|   
16 ++
 chart2/source/tools/RegressionCurveHelper.cxx|
2 
 chart2/source/tools/RegressionEquation.cxx   |   
18 +++
 chart2/source/view/charttypes/VSeriesPlotter.cxx |
9 +
 chart2/source/view/main/ChartItemPool.cxx|
2 
 chart2/uiconfig/ui/tp_Trendline.ui   |   
58 ++
 include/xmloff/xmltoken.hxx  |
2 
 offapi/com/sun/star/chart2/RegressionCurveEquation.idl   |
2 
 offapi/com/sun/star/chart2/XRegressionCurveCalculator.idl|
8 +
 xmloff/source/chart/PropertyMap.hxx  |
2 
 xmloff/source/core/xmltoken.cxx  |
2 
 25 files changed, 266 insertions(+), 27 deletions(-)

New commits:
commit aa21f8acfa4d4997688ef4ddc04fcf95987e3424
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Fri Jul 15 09:57:42 2016 +0200

tdf#100547 Save to ODF XY customized names

Trendline equation: Following change 27069
https://gerrit.libreoffice.org/27069
Save customized names of X and Y variables in extended ODF

Change-Id: Ie39487866f7671f4468a37f48847038fbd2cec2a
Reviewed-on: https://gerrit.libreoffice.org/27233
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Laurent BP <laurent.balland-poir...@laposte.net>

diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx
index 0a56591..1698737 100644
--- a/include/xmloff/xmltoken.hxx
+++ b/include/xmloff/xmltoken.hxx
@@ -2193,6 +2193,8 @@ namespace xmloff { namespace token {
 XML_REGRESSION_PERIOD,
 XML_REGRESSION_FORCE_INTERCEPT,
 XML_REGRESSION_INTERCEPT_VALUE,
+XML_REGRESSION_X_NAME,
+XML_REGRESSION_Y_NAME,
 
 XML_ERROR_INDICATOR,
 
diff --git a/xmloff/source/chart/PropertyMap.hxx 
b/xmloff/source/chart/PropertyMap.hxx
index e9f2634..fc919ea 100644
--- a/xmloff/source/chart/PropertyMap.hxx
+++ b/xmloff/source/chart/PropertyMap.hxx
@@ -217,6 +217,8 @@ const XMLPropertyMapEntry aXMLChartPropMap[] =
 MAP_ENTRY_ODF_EXT( "ExtrapolateBackward", LO_EXT, 
XML_REGRESSION_EXTRAPOLATE_BACKWARD, XML_TYPE_DOUBLE ),
 MAP_ENTRY_ODF_EXT( "ForceIntercept", LO_EXT, 
XML_REGRESSION_FORCE_INTERCEPT, XML_TYPE_BOOL ),
 MAP_ENTRY_ODF_EXT( "InterceptValue", LO_EXT, 
XML_REGRESSION_INTERCEPT_VALUE, XML_TYPE_DOUBLE ),
+MAP_ENTRY_ODF_EXT( "XName", LO_EXT, XML_REGRESSION_X_NAME, XML_TYPE_STRING 
),
+MAP_ENTRY_ODF_EXT( "YName", LO_EXT, XML_REGRESSION_Y_NAME, XML_TYPE_STRING 
),
 
 // import mapping for broken files
 MAP_ENTRY_ODF_EXT_IMPORT( "CurveName", CHART, XML_REGRESSION_CURVE_NAME, 
XML_TYPE_STRING ),
diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx
index f6924bb..ed6e22d 100644
--- a/xmloff/source/core/xmltoken.cxx
+++ b/xmloff/source/core/xmltoken.cxx
@@ -2201,6 +2201,8 @@ namespace xmloff { namespace token {
 TOKEN( "regression-period",   XML_REGRESSION_PERIOD ),
 TOKEN( "regression-force-intercept",  
XML_REGRESSION_FORCE_INTERCEPT ),
 TOKEN( "regression-intercept-value",  
XML_REGRESSION_INTERCEPT_VALUE ),
+TOKEN( "regression-x-name",   XML_REGRESSION_X_NAME ),
+TOKEN( "regression-y-name",   XML_REGRESSION_Y_NAME ),
 
 TOKEN( "error-indicator", XML_ERROR_INDICATOR ),
 
commit 428711f03c31802e339e57384b

[Libreoffice-commits] core.git: i18npool/source offapi/com

2016-08-16 Thread Laurent Balland-Poirier
 i18npool/source/nativenumber/data/numberchar.h |   16 +++
 offapi/com/sun/star/i18n/NativeNumberMode.idl  |   26 ++---
 2 files changed, 31 insertions(+), 11 deletions(-)

New commits:
commit c16efc81bd9fb1cfc85f7949eccbdeb5818e5093
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Tue Aug 16 15:30:26 2016 +0200

Native Numbers: update list of supported languages

Change-Id: I3a6ef21e1d46aeecb5bfd84e43dd2563b201de0a
Reviewed-on: https://gerrit.libreoffice.org/28170
Reviewed-by: Eike Rathke <er...@redhat.com>
Tested-by: Eike Rathke <er...@redhat.com>

diff --git a/i18npool/source/nativenumber/data/numberchar.h 
b/i18npool/source/nativenumber/data/numberchar.h
index 62e490f..18974ac 100644
--- a/i18npool/source/nativenumber/data/numberchar.h
+++ b/i18npool/source/nativenumber/data/numberchar.h
@@ -76,14 +76,14 @@ static const sal_Unicode NumberChar[][10] = {
 { 0x0966, 0x0967, 0x0968, 0x0969, 0x096A, 0x096B, 0x096C, 0x096D, 0x096E, 
0x096F }, // Marathi
 { 0x09E6, 0x09E7, 0x09E8, 0x09E9, 0x09EA, 0x09EB, 0x09EC, 0x09ED, 0x09EE, 
0x09EF }, // Bengali
 { 0x0A66, 0x0A67, 0x0A68, 0x0A69, 0x0A6A, 0x0A6B, 0x0A6C, 0x0A6D, 0x0A6E, 
0x0A6F }, // Punjabi (Gurmukhi)
-{ 0x0AE6, 0x0AE7, 0x0AE8, 0x0AE9, 0x0AEA, 0x0AEB, 0x0AEC, 0x0AED, 0x0AEE, 
0x0AEF }, // Gujarali
+{ 0x0AE6, 0x0AE7, 0x0AE8, 0x0AE9, 0x0AEA, 0x0AEB, 0x0AEC, 0x0AED, 0x0AEE, 
0x0AEF }, // Gujarati
 { 0x0030, 0x0BE7, 0x0BE8, 0x0BE9, 0x0BEA, 0x0BEB, 0x0BEC, 0x0BED, 0x0BEE, 
0x0BEF }, // Tamil
 { 0x0C66, 0x0C67, 0x0C68, 0x0C69, 0x0C6A, 0x0C6B, 0x0C6C, 0x0C6D, 0x0C6E, 
0x0C6F }, // Telugu
 { 0x0CE6, 0x0CE7, 0x0CE8, 0x0CE9, 0x0CEA, 0x0CEB, 0x0CEC, 0x0CED, 0x0CEE, 
0x0CEF }, // Kannada
 { 0x0DE6, 0x0DE7, 0x0DE8, 0x0DE9, 0x0DEA, 0x0DEB, 0x0DEC, 0x0DED, 0x0DEE, 
0x0DEF }, // Malayalam
 { 0x0ED0, 0x0ED1, 0x0ED2, 0x0ED3, 0x0ED4, 0x0ED5, 0x0ED6, 0x0ED7, 0x0ED8, 
0x0ED9 }, // Lao
 { 0x0F20, 0x0F21, 0x0F22, 0x0F23, 0x0F24, 0x0F25, 0x0F26, 0x0F27, 0x0F28, 
0x0F29 }, // Tibetan
-{ 0x1040, 0x1041, 0x1042, 0x1043, 0x1044, 0x1045, 0x1046, 0x1047, 0x1048, 
0x1049 }, // Myammar
+{ 0x1040, 0x1041, 0x1042, 0x1043, 0x1044, 0x1045, 0x1046, 0x1047, 0x1048, 
0x1049 }, // Myanmar
 { 0x17E0, 0x17E1, 0x17E2, 0x17E3, 0x17E4, 0x17E5, 0x17E6, 0x17E7, 0x17E8, 
0x17E9 }, // Cambodian (Khmer)
 { 0x1810, 0x1811, 0x1812, 0x1813, 0x1814, 0x1815, 0x1816, 0x1817, 0x1818, 
0x1819 }, // Mongolian
 { 0x0020, 0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7, 
0x05D8 }, // Hebrew
@@ -111,14 +111,14 @@ static sal_Unicode DecimalChar[] = {
 0x, // Marathi
 0x, // Bengali
 0x, // Punjabi (Gurmukhi)
-0x, // Gujarali
+0x, // Gujarati
 0x, // Tamil
 0x, // Telugu
 0x, // Kannada
 0x, // Malayalam
 0x, // Lao
 0x, // Tibetan
-0x, // Myammar
+0x, // Myanmar
 0x, // Cambodian (Khmer)
 0x, // Mongolian
 0x, // Hebrew
@@ -146,14 +146,14 @@ static const sal_Unicode MinusChar[] = {
 0x, // Marathi
 0x, // Bengali
 0x, // Punjabi
-0x, // Gujarali
+0x, // Gujarati
 0x, // Tamil
 0x, // Telugu
 0x, // Kannada
 0x, // Malayalam
 0x, // Lao
 0x, // Tibetan
-0x, // Myammar
+0x, // Myanmar
 0x, // Cambodian (Khmer)
 0x, // Mongolian
 0x, // Hebrew
@@ -181,14 +181,14 @@ static sal_uInt16 SeparatorChar[] = {
 0x, // Marathi
 0x, // Bengali
 0x, // Punjabi
-0x, // Gujarali
+0x, // Gujarati
 0x, // Tamil
 0x, // Telugu
 0x, // Kannada
 0x, // Malayalam
 0x, // Lao
 0x, // Tibetan
-0x, // Myammar
+0x, // Myanmar
 0x, // Cambodian (Khmer)
 0x, // Mongolian
 0x, // Hebrew
diff --git a/offapi/com/sun/star/i18n/NativeNumberMode.idl 
b/offapi/com/sun/star/i18n/NativeNumberMode.idl
index ed12420..6af4613 100644
--- a/offapi/com/sun/star/i18n/NativeNumberMode.idl
+++ b/offapi/com/sun/star/i18n/NativeNumberMode.idl
@@ -56,16 +56,36 @@ published constants NativeNumberMode
 Chinese:Chinese lower case characters; CAL: 1/7/7 [DBNum1] 
 Japanese:   short Kanji characters [DBNum1]; CAL: 1/4/4 [DBNum1] 
 Korean: Korean lower case characters [DBNum1]; CAL: 1/7/7 [DBNum1] 

+Hebrew: Hebrew characters 
+Arabic: Arabic-Indic characters 
 Thai:   Thai characters 
-Arabic: Indic characters 
-Indic:  Indic characters
+Hindi:  Indic-Devanagari characters 
+Odia:   Odia (Oriya) characters
+Marathi:Indic-Devanagari characters
+Bengali:Bengali characters
+Punjabi:Punjabi (Gurmukhi) characters
+Gujarati:   Gujarati characters
+   

[Libreoffice-commits] core.git: sc/inc sc/Library_sc.mk sc/source sc/uiconfig sc/UIConfig_scalc.mk

2016-08-16 Thread Laurent Balland-Poirier
 sc/Library_sc.mk   |1 
 sc/UIConfig_scalc.mk   |1 
 sc/inc/document.hxx|2 
 sc/source/core/data/documen3.cxx   |   13 ++
 sc/source/ui/docshell/docfunc.cxx  |   13 +-
 sc/source/ui/inc/docfunc.hxx   |2 
 sc/source/ui/inc/mergecellsdialog.hxx  |   42 +++
 sc/source/ui/miscdlgs/mergecellsdialog.cxx |   50 +
 sc/source/ui/view/viewfun2.cxx |   28 +++--
 sc/uiconfig/scalc/ui/mergecellsdialog.ui   |  154 +
 10 files changed, 294 insertions(+), 12 deletions(-)

New commits:
commit 0da121bc6702b8ae1859708c7e5532f7b97e4c2a
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Wed Jul 20 09:24:13 2016 +0200

tdf#30456 Enable to empty or not merged cells

Insert options during MergeCells to empty hidden cells
Three options:
- Move contents to first cell (previous Yes)
- Keep contents in covered cells (previous No, default)
- Empty covered cells (new option)

To be done: link to the help system
https://gerrit.libreoffice.org/27467/

Change-Id: I98e85296591cce8ba789d282cead1f1010e5e2ce
Reviewed-on: https://gerrit.libreoffice.org/27463
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Laurent BP <laurent.balland-poir...@laposte.net>

diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk
index 5fa9cf3..fd20f76 100644
--- a/sc/Library_sc.mk
+++ b/sc/Library_sc.mk
@@ -473,6 +473,7 @@ $(eval $(call gb_Library_add_exception_objects,sc,\
 sc/source/ui/miscdlgs/crnrdlg \
 sc/source/ui/miscdlgs/datastreamdlg \
 sc/source/ui/miscdlgs/highred \
+sc/source/ui/miscdlgs/mergecellsdialog \
 sc/source/ui/miscdlgs/optsolver \
 sc/source/ui/miscdlgs/protectiondlg \
 sc/source/ui/miscdlgs/redcom \
diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk
index 366eef0..0a00bda 100644
--- a/sc/UIConfig_scalc.mk
+++ b/sc/UIConfig_scalc.mk
@@ -141,6 +141,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\
sc/uiconfig/scalc/ui/notebookbar \
sc/uiconfig/scalc/ui/notebookbar_groups \
sc/uiconfig/scalc/ui/managenamesdialog \
+   sc/uiconfig/scalc/ui/mergecellsdialog \
sc/uiconfig/scalc/ui/movecopysheet \
sc/uiconfig/scalc/ui/movingaveragedialog \
sc/uiconfig/scalc/ui/multipleoperationsdialog \
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index eccc49c..bfef7e4 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1137,6 +1137,8 @@ public:
 
 SC_DLLPUBLIC void   DoMergeContents( SCTAB nTab, SCCOL nStartCol, 
SCROW nStartRow,
 SCCOL nEndCol, SCROW nEndRow );
+SC_DLLPUBLIC void   DoEmptyBlock( SCTAB nTab, SCCOL nStartCol, 
SCROW nStartRow,
+SCCOL nEndCol, SCROW nEndRow );
 //  without checking:
 SC_DLLPUBLIC void   DoMerge( SCTAB nTab, SCCOL nStartCol, SCROW 
nStartRow,
 SCCOL nEndCol, SCROW nEndRow, bool 
bDeleteCaptions = true );
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index 374561c..3d181c9 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -2000,6 +2000,19 @@ void ScDocument::DoMergeContents( SCTAB nTab, SCCOL 
nStartCol, SCROW nStartRow,
 SetString(nStartCol,nStartRow,nTab,aTotal.makeStringAndClear());
 }
 
+void ScDocument::DoEmptyBlock( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
+   SCCOL nEndCol, SCROW nEndRow )
+{
+SCCOL nCol;
+SCROW nRow;
+for (nRow=nStartRow; nRow<=nEndRow; nRow++)
+for (nCol=nStartCol; nCol<=nEndCol; nCol++)
+{  // empty block except first cell
+if (nCol != nStartCol || nRow != nStartRow)
+SetString(nCol,nRow,nTab,"");
+}
+}
+
 void ScDocument::DoMerge( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
 SCCOL nEndCol, SCROW nEndRow, bool 
bDeleteCaptions )
 {
diff --git a/sc/source/ui/docshell/docfunc.cxx 
b/sc/source/ui/docshell/docfunc.cxx
index 6955029..b72da3a 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -4673,7 +4673,7 @@ bool ScDocFunc::FillAuto( ScRange& rRange, const 
ScMarkData* pTabMark, FillDir e
 return true;
 }
 
-bool ScDocFunc::MergeCells( const ScCellMergeOption& rOption, bool bContents, 
bool bRecord, bool bApi )
+bool ScDocFunc::MergeCells( const ScCellMergeOption& rOption, bool bContents, 
bool bRecord, bool bApi, bool bEmptyMergedCells /*=false*/ )
 {
 using ::std::set;
 
@@ -4721,9 +4721,12 @@ bool ScDocFunc::MergeCells( const ScCellMergeOption& 
rOption, bool bContents, bo
 for (set::const_iterator itr = itrBeg; itr != itrEnd; ++itr)
 {
 SCTAB nT

[Libreoffice-commits] core.git: cui/source cui/uiconfig sc/source sc/uiconfig svl/source

2016-08-16 Thread Laurent Balland-Poirier
 cui/source/inc/numfmt.hxx  |3 
 cui/source/tabpages/numfmt.cxx |   72 +-
 cui/uiconfig/ui/numberingformatpage.ui |   80 +---
 sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx |   84 -
 sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx |4 +
 sc/source/ui/view/formatsh.cxx |4 -
 sc/uiconfig/scalc/ui/sidebarnumberformat.ui|   47 +++
 svl/source/numbers/zforlist.cxx|   20 -
 svl/source/numbers/zformat.cxx |   11 ++
 svl/source/numbers/zforscan.cxx|5 -
 10 files changed, 263 insertions(+), 67 deletions(-)

New commits:
commit 6e44bb1b67f41dc7dbf15fe4502578a38ac59738
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Sun Jul 17 18:20:24 2016 +0200

Fraction Number Format: add UI/Sidebar options

Enable modification of fraction number format through dialog UI:
- negative in red
- "Decimal places" is replaced with "Denominator places"
- leading zeros for integer part
- thousand separator for integer part

Update: options in Sidebar
Thousand separator works, also for ' ' as thousand separator

Change-Id: I0ed2952ed9cd8afb5444b44997526e5019a5858d
Reviewed-on: https://gerrit.libreoffice.org/27268
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Laurent BP <laurent.balland-poir...@laposte.net>

diff --git a/cui/source/inc/numfmt.hxx b/cui/source/inc/numfmt.hxx
index 0fee236..e898068 100644
--- a/cui/source/inc/numfmt.hxx
+++ b/cui/source/inc/numfmt.hxx
@@ -101,6 +101,8 @@ private:
 VclPtr  m_pFtOptions;
 VclPtr  m_pFtDecimals;
 VclPtr   m_pEdDecimals;
+VclPtr  m_pFtDenominator;
+VclPtr   m_pEdDenominator;
 VclPtr   m_pBtnNegRed;
 VclPtr  m_pFtLeadZeroes;
 VclPtr   m_pEdLeadZeroes;
@@ -137,6 +139,7 @@ private:
 voidUpdateOptions_Impl( bool bCheckCatChange );
 voidUpdateFormatListBox_Impl( bool bCat, bool bUpdateEdit );
 voidUpdateThousandEngineeringCheckBox();
+voidUpdateDecimalsDenominatorEditBox();
 voidObstructing();
 voidEnableBySourceFormat_Impl();
 voidSetCategory( sal_uInt16 nPos );
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index 415c4a4..51b9187 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -255,6 +255,8 @@ SvxNumberFormatTabPage::SvxNumberFormatTabPage(vcl::Window* 
pParent,
 get(m_pFtOptions, "optionsft");
 get(m_pFtDecimals, "decimalsft");
 get(m_pEdDecimals, "decimalsed");
+get(m_pFtDenominator, "denominatorft");
+get(m_pEdDenominator, "denominatored");
 get(m_pBtnNegRed, "negnumred");
 get(m_pFtLeadZeroes, "leadzerosft");
 get(m_pEdLeadZeroes, "leadzerosed");
@@ -300,6 +302,8 @@ void SvxNumberFormatTabPage::dispose()
 m_pFtOptions.clear();
 m_pFtDecimals.clear();
 m_pEdDecimals.clear();
+m_pFtDenominator.clear();
+m_pEdDenominator.clear();
 m_pBtnNegRed.clear();
 m_pFtLeadZeroes.clear();
 m_pEdLeadZeroes.clear();
@@ -344,6 +348,7 @@ void SvxNumberFormatTabPage::Init_Impl()
 Link<Edit&,void> aLink = LINK( this, SvxNumberFormatTabPage, 
OptEditHdl_Impl );
 
 m_pEdDecimals->SetModifyHdl( aLink );
+m_pEdDenominator->SetModifyHdl( aLink );
 m_pEdLeadZeroes->SetModifyHdl( aLink );
 
 m_pBtnNegRed->SetClickHdl( LINK( this, SvxNumberFormatTabPage, 
OptClickHdl_Impl ) );
@@ -355,6 +360,7 @@ void SvxNumberFormatTabPage::Init_Impl()
 m_pIbRemove->SetClickHdl( HDL( ClickHdl_Impl ) );
 m_pIbInfo->SetClickHdl( HDL( ClickHdl_Impl ) );
 UpdateThousandEngineeringCheckBox();
+UpdateDecimalsDenominatorEditBox();
 
 m_pEdComment->SetLoseFocusHdl( LINK( this, SvxNumberFormatTabPage, 
LostFocusHdl_Impl) );
 aResetWinTimer.SetTimeoutHdl(LINK( this, SvxNumberFormatTabPage, 
TimeHdl_Impl));
@@ -636,8 +642,10 @@ void SvxNumberFormatTabPage::Obstructing()
 m_pBtnEngineering->Disable();
 m_pFtLeadZeroes->Disable();
 m_pFtDecimals->Disable();
+m_pFtDenominator->Disable();
 m_pEdLeadZeroes->Disable();
 m_pEdDecimals->Disable();
+m_pEdDenominator->Disable();
 m_pFtOptions->Disable();
 m_pEdDecimals->SetText( OUString() );
 m_pEdLeadZeroes->SetText( OUString() );
@@ -673,6 +681,8 @@ void SvxNumberFormatTabPage::EnableBySourceFormat_Impl()
 m_pLbLanguage->Enable( bEnable );
 m_pFtDecimals->Enable( bEnable );
 m_pEdDecimals->Enable( bEnable );
+m_pFtDenominator->Enable( bEnable );
+m_pEdDenominator->Enable( bEnable );

[Libreoffice-commits] core.git: helpcontent2

2016-08-16 Thread Laurent Balland-Poirier
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f1bca4ad79dd95a412e8b321a168b518bf3e0eaa
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Sat Aug 13 22:17:20 2016 -0300

Updated core
Project: help  053c67aeb4049a175eda8dc4a1910516f58ce7b4

Improvement in help page for number format codes

added/fixed comments by LBP in code review 1

Change-Id: Ic06e89a027d70d35c6985215b7fcc420d7b4e7ed
Reviewed-on: https://gerrit.libreoffice.org/28110
Reviewed-by: Laurent BP <laurent.balland-poir...@laposte.net>
Reviewed-by: Olivier Hallot <ohal...@collabora.co.uk>
Tested-by: Olivier Hallot <ohal...@collabora.co.uk>

diff --git a/helpcontent2 b/helpcontent2
index a66bd48..053c67a 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit a66bd48b54c7efea526cd2bbebbba924d8524c0e
+Subproject commit 053c67aeb4049a175eda8dc4a1910516f58ce7b4
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-08-16 Thread Laurent Balland-Poirier
 source/text/shared/01/05020301.xhp | 2644 +
 1 file changed, 1547 insertions(+), 1097 deletions(-)

New commits:
commit 053c67aeb4049a175eda8dc4a1910516f58ce7b4
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Sat Aug 13 22:17:20 2016 -0300

Improvement in help page for number format codes

added/fixed comments by LBP in code review 1

Change-Id: Ic06e89a027d70d35c6985215b7fcc420d7b4e7ed
Reviewed-on: https://gerrit.libreoffice.org/28110
Reviewed-by: Laurent BP <laurent.balland-poir...@laposte.net>
Reviewed-by: Olivier Hallot <ohal...@collabora.co.uk>
Tested-by: Olivier Hallot <ohal...@collabora.co.uk>

diff --git a/source/text/shared/01/05020301.xhp 
b/source/text/shared/01/05020301.xhp
index 45bfdb8..7bc6872 100644
--- a/source/text/shared/01/05020301.xhp
+++ b/source/text/shared/01/05020301.xhp
@@ -1,6 +1,5 @@
 
 
-   
 
- 
-   
+-->
+
 
-
-Number Format Codes
-/text/shared/01/05020301.xhp
-
+  
+Number Format Codes
+/text/shared/01/05020301.xhp
+  
 
+
 
-format codes; numbers
-conditions; in number formats
-number formats; codes
-currency formats
-formats;of currencies/date/time
-numbers; date, time and currency formats
-Euro; currency formats
-date formats
-times, formats
-percentages, formats
-scientific notation, formats
-engineering notation, formats
-fraction, formats
-mw made "time formats" a two level entry and deleted 2x 
"formats;"
-Number Format 
Codes
-
-Number format codes can consist of up to four sections separated by 
a semicolon (;).
+
+
+  format codes; numbers
+  conditions; in number formats
+  number formats; codes
+  currency formats
+  formats;of currencies/date/time
+  numbers; date, time and currency formats
+  Euro; currency formats
+  date formats
+  times, formats
+  percentages, formats
+  scientific notation, formats
+  engineering notation, formats
+  fraction, formats
+
+mw made "time formats" a two level entry and deleted 2x 
"formats;"
+
+Number Format 
Codes 
+Number format 
codes can consist of up to four sections separated by a semicolon 
(;).
+
 
-
-In a number format code with two sections, the first section 
applies to positive values and zero, and the second section applies to negative 
values.
-
-
-In a number format code with three sections, the first section 
applies to positive values, the second section to negative values, and the 
third section to the value zero.
-
-
-You can also assign conditions to the three sections, so that the 
format is only applied if a condition is met.
-
-
-Fourth section applies if the content is not a value, but some 
text. Content is represented by an at sign (@).
-
+  
+In a number 
format code with two sections, the first section applies to positive values and 
zero, and the second section applies to negative values.
+  
+  
+In a number 
format code with three sections, the first section applies to positive values, 
the second section to negative values, and the third section to the value 
zero.
+  
+  
+You can 
also assign conditions to the three sections, so that the format is only 
applied if a condition is met.
+  
+  
+Fourth 
section applies if the content is not a value, but some text. Content is 
represented by an at sign (@).
+  
 
-Decimal Places and Significant Digits
-Use zero (0), the number sign (#) or the question mark (?) as 
placeholders in your number format code to represent numbers. The (#) only 
displays significant digits, while the (0) displays zeroes if there are fewer 
digits in the number than in the number format. The (?) works as the (#) but 
adds a space character to keep decimal alignment if there is a hidden 
non-significant zero.
-Use question marks (?) to represent the number of digits to 
include in the numerator and the denominator of a fraction. Fractions that do 
not fit the pattern that you define are displayed as floating point 
numbers.
-If a number contains more digits to the right of the decimal 
delimiter than there are placeholders in the format, the number is rounded 
accordingly. If a number contains more digits to the left of the decimal 
delimiter than there are placeholders in the format, the entire number is 
displayed. Use the following list as a guide for using placeholders when you 
create a number format code:
+
+Decimal 
Places and Significant Digits
+Use zero (0), 
the number sign (#) or the question mark (?) as placeholders in your number 
format code to represent numbers. The (#) only displays significant digits, 
while the (0) displays zeroes if there are fewer digits in the number than in 
the number format. The (?) works as the (#) but adds a space character to keep 
decimal alignment if there is a hidden non-significant zero.
+Use question 
marks (?) to represent the number of digits to include in the numerator and the 
denominator of a fraction. Fractions tha

[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - svl/source

2016-08-16 Thread Laurent Balland-Poirier
 svl/source/numbers/zformat.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 3deb5fed775290540611cde158051a647bb5e317
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Fri Aug 12 11:59:56 2016 +0200

tdf#101462 tdf#79399 lcl_matchKeywordAndGetNumber returns integer

This prevent [DBNumX] format codes to be recognized
Fix in the same time tdf#79399 (import of [DBNumX] from XL)
Do NOT fix yet tdf#79398 (export of [DBNumX] to XL)

Change-Id: I08817818bf0ff30b4704bb69b2ac9aa3890c7aa6
Reviewed-on: https://gerrit.libreoffice.org/28071
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Eike Rathke <er...@redhat.com>
(cherry picked from commit b1ce5db192750210b1546417494664f91759719d)
Reviewed-on: https://gerrit.libreoffice.org/28141
Tested-by: Laurent BP <laurent.balland-poir...@laposte.net>
Reviewed-by: Laurent BP <laurent.balland-poir...@laposte.net>

diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 7f0df63..222d731 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -1457,13 +1457,13 @@ short SvNumberformat::ImpNextSymbol(OUStringBuffer& 
rString,
 eState = SsGetPrefix;
 }
 else if ( lcl_matchKeywordAndGetNumber( aBufStr, nPos-1, 
aDBNum, nDBNum) &&
-'1' <= nDBNum && nDBNum <= '9' )
+1 <= nDBNum && nDBNum <= 9 )
 {
 sBuffSymbol.stripStart('[');
 sBuffSymbol.append( aBufStr.copy( --nPos, 
aDBNum.getLength()+1 ));
 nPos += aDBNum.getLength()+1;
 //! SymbolType is negative
-eSymbolType = sal::static_int_cast< short >( 
BRACKET_SYMBOLTYPE_DBNUM1 - (nDBNum - '1'));
+eSymbolType = sal::static_int_cast< short >( 
BRACKET_SYMBOLTYPE_DBNUM1 - (nDBNum - 1) );
 eState = SsGetPrefix;
 }
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/svl svl/source

2016-08-15 Thread Laurent Balland-Poirier
 include/svl/zformat.hxx|4 
 svl/source/numbers/zformat.cxx |   12 ++--
 2 files changed, 6 insertions(+), 10 deletions(-)

New commits:
commit ab98c81e1c4913aac3ce6453aa95c581dd582058
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Fri Aug 12 17:20:08 2016 +0200

tdf#79398 Export to XL DBNum codes

Change-Id: Ibe24b68b89909eecdf73fe4f7db19de26396194d
Update: only if corresponding code exists
Reviewed-on: https://gerrit.libreoffice.org/28090
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Eike Rathke <er...@redhat.com>

diff --git a/include/svl/zformat.hxx b/include/svl/zformat.hxx
index f26eb82..ea98b08 100644
--- a/include/svl/zformat.hxx
+++ b/include/svl/zformat.hxx
@@ -73,17 +73,13 @@ class SvNumberNatNum
 public:
 
 static  sal_uInt8MapDBNumToNatNum( sal_uInt8 nDBNum, LanguageType 
eLang, bool bDate );
-#ifdef THE_FUTURE
 static  sal_uInt8MapNatNumToDBNum( sal_uInt8 nNatNum, LanguageType 
eLang, bool bDate );
-#endif
 
 SvNumberNatNum() : eLang( LANGUAGE_DONTKNOW ), nNum(0),
 bDBNum(false), bDate(false), 
bSet(false) {}
 boolIsComplete() const  { return bSet && eLang != 
LANGUAGE_DONTKNOW; }
 sal_uInt8   GetNatNum() const   { return bDBNum ? MapDBNumToNatNum( 
nNum, eLang, bDate ) : nNum; }
-#ifdef THE_FUTURE
 sal_uInt8   GetDBNum() const{ return bDBNum ? nNum : 
MapNatNumToDBNum( nNum, eLang, bDate ); }
-#endif
 LanguageTypeGetLang() const { return eLang; }
 voidSetLang( LanguageType e ) { eLang = e; }
 voidSetNum( sal_uInt8 nNumber, bool bDBNumber )
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index d38b3f4..2fc1912 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -217,11 +217,6 @@ sal_uInt8 SvNumberNatNum::MapDBNumToNatNum( sal_uInt8 
nDBNum, LanguageType eLang
 return nNatNum;
 }
 
-#ifdef THE_FUTURE
-/* XXX NOTE: even though the MapNatNumToDBNum method is currently unused please
- * don't remove it in case we'd have to use it for some obscure exports to
- * Excel. */
-
 // static
 sal_uInt8 SvNumberNatNum::MapNatNumToDBNum( sal_uInt8 nNatNum, LanguageType 
eLang, bool bDate )
 {
@@ -326,7 +321,6 @@ sal_uInt8 SvNumberNatNum::MapNatNumToDBNum( sal_uInt8 
nNatNum, LanguageType eLan
 }
 return nDBNum;
 }
-#endif
 
 /**
  * SvNumFor
@@ -4724,6 +4718,12 @@ OUString SvNumberformat::GetMappedFormatstring( const 
NfKeywordTable& rKeywords,
 }
 
 const SvNumberNatNum& rNum = NumFor[n].GetNatNum();
+if ( rNum.IsSet() && rNum.GetDBNum() > 0 )
+{
+aPrefix += "[DBNum";
+aPrefix += OUString::number( rNum.GetDBNum() );
+aPrefix += "]";
+}
 
 sal_uInt16 nAnz = NumFor[n].GetCount();
 if ( nSem && (nAnz || !aPrefix.isEmpty()) )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-08-15 Thread Laurent Balland-Poirier
 svl/source/numbers/zformat.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit b1ce5db192750210b1546417494664f91759719d
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Fri Aug 12 11:59:56 2016 +0200

tdf#101462 tdf#79399 lcl_matchKeywordAndGetNumber returns integer

This prevent [DBNumX] format codes to be recognized
Fix in the same time tdf#79399 (import of [DBNumX] from XL)
Do NOT fix yet tdf#79398 (export of [DBNumX] to XL)

Change-Id: I08817818bf0ff30b4704bb69b2ac9aa3890c7aa6
Reviewed-on: https://gerrit.libreoffice.org/28071
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Eike Rathke <er...@redhat.com>

diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index f7face5..d38b3f4 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -1455,13 +1455,13 @@ short SvNumberformat::ImpNextSymbol(OUStringBuffer& 
rString,
 eState = SsGetPrefix;
 }
 else if ( lcl_matchKeywordAndGetNumber( aBufStr, nPos-1, 
aDBNum, nDBNum) &&
-'1' <= nDBNum && nDBNum <= '9' )
+1 <= nDBNum && nDBNum <= 9 )
 {
 sBuffSymbol.stripStart('[');
 sBuffSymbol.append( aBufStr.copy( --nPos, 
aDBNum.getLength()+1 ));
 nPos += aDBNum.getLength()+1;
 //! SymbolType is negative
-eSymbolType = sal::static_int_cast< short >( 
BRACKET_SYMBOLTYPE_DBNUM1 - (nDBNum - '1'));
+eSymbolType = sal::static_int_cast< short >( 
BRACKET_SYMBOLTYPE_DBNUM1 - (nDBNum - 1) );
 eState = SsGetPrefix;
 }
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-08-13 Thread Laurent Balland-Poirier
 source/text/shared/01/05020301.xhp |4 
 1 file changed, 4 insertions(+)

New commits:
commit 6193c8a5f97aa5d6922b412019c6da0bfda97590
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Sat Aug 13 12:56:21 2016 +0200

Add format star to repeat character

Number format modifier (*)

Change-Id: I9362ce7f8e87b2f9b957085da241c040316ed813
Reviewed-on: https://gerrit.libreoffice.org/28100
Reviewed-by: Olivier Hallot <ohal...@collabora.co.uk>
Tested-by: Olivier Hallot <ohal...@collabora.co.uk>

diff --git a/source/text/shared/01/05020301.xhp 
b/source/text/shared/01/05020301.xhp
index 934a9bf..45bfdb8 100644
--- a/source/text/shared/01/05020301.xhp
+++ b/source/text/shared/01/05020301.xhp
@@ -193,6 +193,10 @@
 To include text in a number format that is applied to a cell that 
might contain text, enclose the text by double quotation marks (" "), and then 
add an at sign (@). For example, enter "Total for "@ to display 
"Total for December".
 Spaces
 To use a character to define the width of a space in a number 
format, type an underscore ( _ ) followed by the character. The width of the 
space varies according to the width of the character that you choose. For 
example, _M creates a wider space than _i.
+To fill free space with a given character, use star character (*) 
followed by this character. For instance:
+*\0
+will display integer value (0) preceded by as many as needed 
backslash characters (\) to fill column width. For accounting representation, 
you may left align currency symbol with a format similar to:
+$_-* 0.--;$-* 0.--;$_-* -
 Color
 To set the color of a section of a number format code, insert one 
of the following color names in square brackets [ ]:
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2016-08-13 Thread Laurent Balland-Poirier
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6b2b648aff0f40eb85caafb49d3471545f891168
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Sat Aug 13 12:56:21 2016 +0200

Updated core
Project: help  6193c8a5f97aa5d6922b412019c6da0bfda97590

Add format star to repeat character

Number format modifier (*)

Change-Id: I9362ce7f8e87b2f9b957085da241c040316ed813
Reviewed-on: https://gerrit.libreoffice.org/28100
Reviewed-by: Olivier Hallot <ohal...@collabora.co.uk>
Tested-by: Olivier Hallot <ohal...@collabora.co.uk>

diff --git a/helpcontent2 b/helpcontent2
index 6071229..6193c8a 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 6071229bf10bad31360c9347d8a785fe8446608a
+Subproject commit 6193c8a5f97aa5d6922b412019c6da0bfda97590
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-08-13 Thread Laurent Balland-Poirier
 source/text/shared/01/05020300.xhp |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 6071229bf10bad31360c9347d8a785fe8446608a
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Sat Aug 13 12:14:14 2016 +0200

New UI option Denominator places

For fraction format, "Decimal places" is replaced by "Deniminator places"

Merge both related topics as they are linked to the same page.

Change-Id: Ic37b284e2504a989f940da1cbaf4dfbb0a5a8acc
Reviewed-on: https://gerrit.libreoffice.org/28099
Reviewed-by: Olivier Hallot <ohal...@collabora.co.uk>
Tested-by: Olivier Hallot <ohal...@collabora.co.uk>

diff --git a/source/text/shared/01/05020300.xhp 
b/source/text/shared/01/05020300.xhp
index aba7ece..ce241c9 100644
--- a/source/text/shared/01/05020300.xhp
+++ b/source/text/shared/01/05020300.xhp
@@ -90,6 +90,10 @@
   Decimal places
   Enter the number 
of decimal places that you want to display.
   
+
+  Denominator places
+  With 
fraction format, enter the number of places for the denominator that you want 
to display.
+
 
   Leading zeroes
   Enter the 
maximum number of zeroes to display in front of the decimal 
point.
@@ -128,8 +132,7 @@
   
   

-   Number format codes
-   Custom format codes
+   Number format codes: custom format codes defined by 
user.

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


[Libreoffice-commits] core.git: helpcontent2

2016-08-13 Thread Laurent Balland-Poirier
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit bb7f530e909b86d10b0b686df327bc0d79d3c69f
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Sat Aug 13 12:14:14 2016 +0200

Updated core
Project: help  6071229bf10bad31360c9347d8a785fe8446608a

New UI option Denominator places

For fraction format, "Decimal places" is replaced by "Deniminator places"

Merge both related topics as they are linked to the same page.

Change-Id: Ic37b284e2504a989f940da1cbaf4dfbb0a5a8acc
Reviewed-on: https://gerrit.libreoffice.org/28099
Reviewed-by: Olivier Hallot <ohal...@collabora.co.uk>
Tested-by: Olivier Hallot <ohal...@collabora.co.uk>

diff --git a/helpcontent2 b/helpcontent2
index d4501ba..6071229 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit d4501baed063dd06f7b74c1354a8681ea46c326e
+Subproject commit 6071229bf10bad31360c9347d8a785fe8446608a
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: svl/qa

2016-08-09 Thread Laurent Balland-Poirier
 svl/qa/unit/svl.cxx |   20 ++--
 1 file changed, 18 insertions(+), 2 deletions(-)

New commits:
commit 284c8ce11957f11693e6b5026adc1a564d35e7e9
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Sun Jul 24 23:30:46 2016 +0200

tdf#101096 tdf#101147 Add qa tests for minute/month detection

Test number formats of bug reports
Test odd date formats which do not follow Excel detection

Change-Id: Iaa6d25a0103cae5e3ddd76075a324240aa255c35
Reviewed-on: https://gerrit.libreoffice.org/27494
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Eike Rathke <er...@redhat.com>
Tested-by: Eike Rathke <er...@redhat.com>

diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx
index 44878d8..8fb241a 100644
--- a/svl/qa/unit/svl.cxx
+++ b/svl/qa/unit/svl.cxx
@@ -1131,11 +1131,27 @@ void Test::testUserDefinedNumberFormats()
 sExpected = "-12.00 ;";
 checkPreviewString(aFormatter, sCode, -12.0, eLang, sExpected);
 }
-{  // tdf#995339: detect SSMM as second minute
-sCode = "SS:MM:HH DD/MM/YY"; // Month not detected by Excel, but we do 
not follow that.
+{  // tdf#95339: detect SSMM as second minute
+sCode = "SS:MM:HH DD/MM/YY"; // Month not detected by Excel, but 
we do not follow that.
 sExpected = "54:23:03 02/01/00";
 checkPreviewString(aFormatter, sCode, M_PI, eLang, sExpected);
 }
+{  // tdf#101147: detect SSMM as second month
+sCode = "HH:MM:SS MM/DD";
+sExpected = "03:23:54 01/02";
+checkPreviewString(aFormatter, sCode, M_PI, eLang, sExpected);
+}
+{  // tdf#101096: different detection of month/minute with Excel
+sCode = "HH DD MM"; // month detectected because of previous DD
+sExpected = "03 02 01";
+checkPreviewString(aFormatter, sCode, M_PI, eLang, sExpected);
+sCode = "HH:MM HH DD/MM"; // month detected because of previous DD
+sExpected = "03:23 03 02/01";
+checkPreviewString(aFormatter, sCode, M_PI, eLang, sExpected);
+sCode = "SS:DD-MM-YY SS:MM"; // 1st is month, because of previous 
DD; 2nd is minute as SS has not minute
+sExpected = "54:02-01-00 54:23";
+checkPreviewString(aFormatter, sCode, M_PI, eLang, sExpected);
+}
 {  // tdf#6: better algorithm for fraction representation
 sCode = "# ?/???";
 sExpected = "-575 540/697";
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-08-04 Thread Laurent Balland-Poirier
 svl/source/numbers/zforscan.cxx |   10 --
 1 file changed, 4 insertions(+), 6 deletions(-)

New commits:
commit 39e300612c97b7742c8d8417d4dc6c0022cfa040
Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net>
Date:   Wed Aug 3 11:56:16 2016 +0200

tdf#101147 New approach to fix minute/month detection

Other formats may be differently interpreted
HH YY/MM => Month expected
HH DD/MM => Month expected

Change-Id: Iabb17911bf2907c02b6b898052b6933692f8074a
Reviewed-on: https://gerrit.libreoffice.org/27823
Reviewed-by: Eike Rathke <er...@redhat.com>
Tested-by: Eike Rathke <er...@redhat.com>

diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx
index a59617d..d0a462e 100644
--- a/svl/source/numbers/zforscan.cxx
+++ b/svl/source/numbers/zforscan.cxx
@@ -1162,6 +1162,8 @@ sal_Int32 ImpSvNumberformatScan::ScanType()
That are the Excel rules. BUT, we break it because certainly
in something like {HH -MM-DD} the MM is NOT meant to be
minute, so not if MM is between YY and DD or DD and YY.
+   Actually not if any date specific keyword followed a time
+   setting keyword.
 */
 nIndexPre = PreviousKeyword(i);
 nIndexNex = NextKeyword(i);
@@ -1169,12 +1171,7 @@ sal_Int32 ImpSvNumberformatScan::ScanType()
 nIndexPre == NF_KEY_HH  ||  // HH
 nIndexNex == NF_KEY_S   ||  // S
 nIndexNex == NF_KEY_SS  ||  // SS
-(bIsTimeDetected &&
- !(((nIndexPre == NF_KEY_YY || nIndexPre == NF_KEY_) &&
-(nIndexNex == NF_KEY_D  || nIndexNex == NF_KEY_DD)) ||
-   ((nIndexPre == NF_KEY_D  || nIndexPre == NF_KEY_DD) &&
-(nIndexNex == NF_KEY_YY || nIndexNex == NF_KEY_)))
-)   ||  // tdf#101147
+bIsTimeDetected ||  // tdf#101147
 PreviousChar(i) == '['  )   // [M
 {
 eNewType = css::util::NumberFormat::TIME;
@@ -1212,6 +1209,7 @@ sal_Int32 ImpSvNumberformatScan::ScanType()
 case NF_KEY_R : // R
 case NF_KEY_RR :// RR
 eNewType = css::util::NumberFormat::DATE;
+bIsTimeDetected = false;
 break;
 case NF_KEY_CCC:// CCC
 eNewType = css::util::NumberFormat::CURRENCY;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


  1   2   3   4   5   >