[PATCH] In writer’s RTL UI show author name and date at right side o...

2013-03-22 Thread navin patidar (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/2923

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/23/2923/1

In writer’s RTL UI show author name and date at right side of comment window

Change-Id: Ie15482e9953d14927b4f918c43537100a8332689
---
M sw/source/ui/docvw/SidebarWin.cxx
1 file changed, 2 insertions(+), 0 deletions(-)



diff --git a/sw/source/ui/docvw/SidebarWin.cxx 
b/sw/source/ui/docvw/SidebarWin.cxx
index b32fbe4..eb256d4 100644
--- a/sw/source/ui/docvw/SidebarWin.cxx
+++ b/sw/source/ui/docvw/SidebarWin.cxx
@@ -279,6 +279,7 @@
 // window controls for author and date
 mpMetadataAuthor = new Edit( this, 0 );
 mpMetadataAuthor->SetAccessibleName( SW_RES( 
STR_ACCESS_ANNOTATION_AUTHOR_NAME ) );
+mpMetadataAuthor->EnableRTL(Application::GetSettings().GetLayoutRTL());
 mpMetadataAuthor->SetReadOnly();
 mpMetadataAuthor->AlwaysDisableInput(true);
 mpMetadataAuthor->SetCallHandlersOnInputDisabled(true);
@@ -297,6 +298,7 @@
 
 mpMetadataDate = new Edit( this, 0 );
 mpMetadataDate->SetAccessibleName( SW_RES( STR_ACCESS_ANNOTATION_DATE_NAME 
) );
+mpMetadataDate->EnableRTL(Application::GetSettings().GetLayoutRTL());
 mpMetadataDate->SetReadOnly();
 mpMetadataDate->AlwaysDisableInput(true);
 mpMetadataDate->SetCallHandlersOnInputDisabled(true);

-- 
To view, visit https://gerrit.libreoffice.org/2923
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie15482e9953d14927b4f918c43537100a8332689
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: navin patidar 

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


[PATCH] fix fdo#62050: for impress

2013-03-22 Thread navin patidar (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/2922

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/22/2922/1

fix fdo#62050: for impress

Impress is also affected by fdo#62050.
In RTL UI, comment window is RTL and editbox’s (editeng) default
writing direction is LTR.
I suspect, bug is result of this RTL & LTR mix-up.

Change-Id: I188ce05350f721081378509915158d4ec4e5f8cf
---
M sd/source/ui/annotations/annotationwindow.cxx
1 file changed, 1 insertion(+), 4 deletions(-)



diff --git a/sd/source/ui/annotations/annotationwindow.cxx 
b/sd/source/ui/annotations/annotationwindow.cxx
index 2a859f0..d03548a 100644
--- a/sd/source/ui/annotations/annotationwindow.cxx
+++ b/sd/source/ui/annotations/annotationwindow.cxx
@@ -327,14 +327,11 @@
 mpOutliner->SetRefDevice( pDev );
 }
 
+mpTextWindow->EnableRTL( sal_False );
 mpOutlinerView = new OutlinerView ( mpOutliner, mpTextWindow );
 mpOutliner->InsertView(mpOutlinerView );
 mpTextWindow->SetOutlinerView(mpOutlinerView);
 mpOutlinerView->SetOutputArea( PixelToLogic( Rectangle(0,0,1,1) ) );
-
-// TODO: ??
-EEHorizontalTextDirection aDefHoriTextDir = 
Application::GetSettings().GetLayoutRTL() ? EE_HTEXTDIR_R2L : EE_HTEXTDIR_L2R;
-mpOutliner->SetDefaultHorizontalTextDirection( aDefHoriTextDir );
 
 //create Scrollbars
 mpVScrollbar = new ScrollBar(this, WB_3DLOOK |WB_VSCROLL|WB_DRAG);

-- 
To view, visit https://gerrit.libreoffice.org/2922
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I188ce05350f721081378509915158d4ec4e5f8cf
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: navin patidar 

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


[Libreoffice-commits] core.git: configure.ac

2013-03-22 Thread Tor Lillqvist
 configure.ac |   16 
 1 file changed, 12 insertions(+), 4 deletions(-)

New commits:
commit 40fd922ecf6a9ba9cfe541975ea2fa6b711a66fd
Author: Tor Lillqvist 
Date:   Sat Mar 23 08:53:42 2013 +0200

Another blind fix for using the x86 NDK tool-chain

Change-Id: Id4abf40d4965c015baf7a4213cd6dde8871a2474

diff --git a/configure.ac b/configure.ac
index e24efcc..7cd27f0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -160,6 +160,14 @@ if test -n "$with_android_ndk"; then
 fi
 ANDROID_NDK_VERSION=`cut -f1 -d' ' <$ANDROID_NDK_HOME/RELEASE.TXT`
 
+case $ANDROID_NDK_VERSION in
+r8*)
+;;
+*)
+AC_MSG_ERROR([Unsupported NDK version $ANDROID_NDK_VERSION, only r8* 
versions are supported])
+;;
+esac
+
 if test $host_cpu = arm; then
 android_cpu=arm
 android_platform_prefix=$android_cpu-linux-androideabi
@@ -179,6 +187,7 @@ if test -n "$with_android_ndk"; then
 ANDROID_COMPILER_DIR=$ANDROID_BINUTILS_DIR
 ;;
 clang3.1|clang3.2)
+AC_MSG_WARN([Building with the Clang tool-chain is known to break in 
the bridges module, fix that please])
 
ANDROID_BINUTILS_DIR=$ANDROID_NDK_HOME/toolchains/$android_platform_prefix-4.6
 
ANDROID_COMPILER_DIR=$ANDROID_NDK_HOME/toolchains/llvm-${with_android_ndk_toolchain_version#clang}
 ANDROID_USING_CLANG=true
@@ -230,12 +239,11 @@ if test -n "$with_android_ndk"; then
android_gnu_prefix=arm-linux-androideabi
 elif test $host_cpu = mips; then
android_gnu_prefix=mipsel-linux-android
-elif test -f $ANDROID_ABI_PREBUILT_BIN/i686-android-linux-gcc; then
+elif test $ANDROID_NDK_VERSION = r8; then
+# The prefix used for the x86 tool-chain changed between NDK r8 and r8b
 android_gnu_prefix=i686-android-linux
-elif test -f $ANDROID_ABI_PREBUILT_BIN/i686-linux-android-gcc; then
-android_gnu_prefix=i686-linux-android
 else
-AC_MSG_ERROR([Can't figure out the toolchain prefix])
+android_gnu_prefix=i686-linux-android
 fi
 
 test -z "$SYSBASE" && export 
SYSBASE=$ANDROID_NDK_HOME/platforms/android-9/arch-$android_cpu
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: configure.ac

2013-03-22 Thread Tor Lillqvist
 configure.ac |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 0fddd7aa822abc86b646939e292dbcce0014db08
Author: Tor Lillqvist 
Date:   Sat Mar 23 08:02:33 2013 +0200

The x86 NDK toolchain uses a different naming convention for its root

Blind fix attempt for the Android-X86 tinderbox.

Change-Id: Ib7ae0d077aad149d27c19f1b0137bb87062d0f60

diff --git a/configure.ac b/configure.ac
index b9b11f6..e24efcc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -162,21 +162,24 @@ if test -n "$with_android_ndk"; then
 
 if test $host_cpu = arm; then
 android_cpu=arm
+android_platform_prefix=$android_cpu-linux-androideabi
 elif test $host_cpu = mips; then
 android_cpu=mips
+android_platform_prefix=$android_cpu-linux-androideabi
 else
 # host_cpu is something like "i386" or "i686" I guess, NDK uses
 # "x86" in some contexts
 android_cpu=x86
+android_platform_prefix=$android_cpu
 fi
 
 case "$with_android_ndk_toolchain_version" in
 4.6|4.7)
-
ANDROID_BINUTILS_DIR=$ANDROID_NDK_HOME/toolchains/$android_cpu-linux-androideabi-$with_android_ndk_toolchain_version
+
ANDROID_BINUTILS_DIR=$ANDROID_NDK_HOME/toolchains/$android_platform_prefix-$with_android_ndk_toolchain_version
 ANDROID_COMPILER_DIR=$ANDROID_BINUTILS_DIR
 ;;
 clang3.1|clang3.2)
-
ANDROID_BINUTILS_DIR=$ANDROID_NDK_HOME/toolchains/$android_cpu-linux-androideabi-4.6
+
ANDROID_BINUTILS_DIR=$ANDROID_NDK_HOME/toolchains/$android_platform_prefix-4.6
 
ANDROID_COMPILER_DIR=$ANDROID_NDK_HOME/toolchains/llvm-${with_android_ndk_toolchain_version#clang}
 ANDROID_USING_CLANG=true
 ;;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[PATCH] General comment cleanup for demo/test vcl apps

2013-03-22 Thread Chris Sherlock (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/2921

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/21/2921/1

General comment cleanup for demo/test vcl apps

Remove unnecessary commented out code, remove comment "spacer" lines,
in general tidy up this code to make it easier to read.

Change-Id: I37a19177795aa93d63f736e1933924605fbf2146
---
M vcl/workben/outdevgrind.cxx
M vcl/workben/svdem.cxx
M vcl/workben/svpclient.cxx
M vcl/workben/svptest.cxx
M vcl/workben/vcldemo.cxx
5 files changed, 0 insertions(+), 75 deletions(-)



diff --git a/vcl/workben/outdevgrind.cxx b/vcl/workben/outdevgrind.cxx
index bec832a..703bb00 100644
--- a/vcl/workben/outdevgrind.cxx
+++ b/vcl/workben/outdevgrind.cxx
@@ -78,8 +78,6 @@
 virtual void Paint( const Rectangle& rRect );
 };
 
-//--
-
 typedef boost::function1   functor_type;
 typedef std::vector< std::pair >  functor_vector_type;
@@ -140,17 +138,6 @@
 GDIMetaFile   aMtf;
 aMtf.AddAction( new MetaFillColorAction(Color(COL_RED),sal_True) );
 aMtf.AddAction( new MetaRectAction(aRect) );
-
-/* void DrawText( const Point& rStartPt, const XubString& rStr,
-   xub_StrLen nIndex = 0, xub_StrLen nLen = STRING_LEN,
-   MetricVector* pVector = NULL, String* pDisplayText = NULL );
-*/
-//add(res,
-//"DrawText",
-//boost::bind(
-//&OutputDevice::DrawText,
-//_1,
-//aPt1, aString, (sal_uInt16)0, aString.Len(), (MetricVector*)0, 
(String*)0, (vcl::ITextLayout*)0 ));
 
 /* void DrawTextArray( const Point& rStartPt, const XubString& rStr,
const sal_Int32* pDXAry = NULL,
@@ -792,7 +779,6 @@
 
 }
 
-//--
 
 void grindFunc( OutputDevice&   rTarget,
 functor_vector_type::const_iterator iter,
@@ -815,7 +801,6 @@
  pMsg );
 }
 
-//--
 
 /** Call OutputDevice render methods repeatedly, and output elapsed
 time to stdout
@@ -879,7 +864,6 @@
 }
 }
 
-//--
 
 void TestWindow::Paint( const Rectangle& )
 {
@@ -916,9 +900,7 @@
 return EXIT_SUCCESS;
 }
 
-//-
 // create the global service-manager
-//-
 uno::Reference< lang::XMultiServiceFactory > xFactory;
 try
 {
diff --git a/vcl/workben/svdem.cxx b/vcl/workben/svdem.cxx
index 58b9836..a77bcb1 100644
--- a/vcl/workben/svdem.cxx
+++ b/vcl/workben/svdem.cxx
@@ -33,12 +33,10 @@
 
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
-// ---
 
 // Forward declaration
 void Main();
 
-// ---
 
 SAL_IMPLEMENT_MAIN()
 {
@@ -56,7 +54,6 @@
 return 0;
 }
 
-// ---
 
 class MyWin : public WorkWindow
 {
@@ -72,7 +69,6 @@
 voidResize();
 };
 
-// ---
 
 void Main()
 {
@@ -83,56 +79,48 @@
 Application::Execute();
 }
 
-// ---
 
 MyWin::MyWin( Window* pParent, WinBits nWinStyle ) :
 WorkWindow( pParent, nWinStyle )
 {
 }
 
-// ---
 
 void MyWin::MouseMove( const MouseEvent& rMEvt )
 {
 WorkWindow::MouseMove( rMEvt );
 }
 
-// ---
 
 void MyWin::MouseButtonDown( const MouseEvent& rMEvt )
 {
 WorkWindow::MouseButtonDown( rMEvt );
 }
 
-// ---
 
 void MyWin::MouseButtonUp( const MouseEvent& rMEvt )
 {
 WorkWindow::MouseButtonUp( rMEvt );
 }
 
-// ---
 
 void MyWin::KeyInput( const KeyEvent& rKEvt )
 {
 WorkWindow::KeyInput( rKEvt );
 }
 
-// ---
 
 void MyWin::KeyUp( const KeyEvent& rKEvt )
 {
 WorkWindow::KeyUp( rKEvt );
 }
 
-// ---
 
 void MyWin::Paint( const Rectangle& rRect )
 {
 WorkWindow::Paint( rRect );
 }
 
-// ---
 
 void MyWin::Resize()
 {
diff --git a/vcl/workben/svpclient.cxx b/vcl/workben/svpclient.cxx
index 12ce0cc2..60c9659 100644
--- a/vcl/workbe

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

2013-03-22 Thread Kohei Yoshida
 sc/inc/global.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 00050e3799690a45c406429740e7b362e5f3e89d
Author: Kohei Yoshida 
Date:   Sat Mar 23 00:01:31 2013 -0400

Fix the build with OSL_DEBUG_LEVEL > 0.

Change-Id: I4633df8ffafe10397bf80d9b0f5c20aa0ed36416

diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx
index 26d8539..d177ada 100644
--- a/sc/inc/global.hxx
+++ b/sc/inc/global.hxx
@@ -272,7 +272,7 @@ enum CellType
 CELLTYPE_NOTE,
 CELLTYPE_EDIT,
 #if OSL_DEBUG_LEVEL > 0
-   ,CELLTYPE_DESTROYED
+CELLTYPE_DESTROYED
 #endif
 };
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/formula-core-rework' - sc/inc

2013-03-22 Thread Kohei Yoshida
 sc/inc/global.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit fb6d58f4fa8f4ff72d6e9239ac123d50d2131e10
Author: Kohei Yoshida 
Date:   Sat Mar 23 00:01:31 2013 -0400

Fix the build with OSL_DEBUG_LEVEL > 0.

Change-Id: I4633df8ffafe10397bf80d9b0f5c20aa0ed36416

diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx
index 26d8539..d177ada 100644
--- a/sc/inc/global.hxx
+++ b/sc/inc/global.hxx
@@ -272,7 +272,7 @@ enum CellType
 CELLTYPE_NOTE,
 CELLTYPE_EDIT,
 #if OSL_DEBUG_LEVEL > 0
-   ,CELLTYPE_DESTROYED
+CELLTYPE_DESTROYED
 #endif
 };
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[PUSHED] Remove commented code in VCL demo app - should make the exam...

2013-03-22 Thread Kohei Yoshida (via Code Review)
Hi,

Thank you for your patch!  It has been merged to LibreOffice.

If you are interested in details, please visit

https://gerrit.libreoffice.org/2920

Approvals:
  Kohei Yoshida: Verified; Looks good to me, approved


-- 
To view, visit https://gerrit.libreoffice.org/2920
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I2e56c580b30435731b3b8dc716abae19c8673acf
Gerrit-PatchSet: 2
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Chris Sherlock 
Gerrit-Reviewer: Kohei Yoshida 

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


[Libreoffice-commits] core.git: vcl/workben

2013-03-22 Thread Chris
 vcl/workben/vcldemo.cxx |5 -
 1 file changed, 5 deletions(-)

New commits:
commit 7ca43770bc981c467371b3d4f587cc329298f4d4
Author: Chris 
Date:   Sat Mar 23 14:25:29 2013 +1100

Remove commented code in VCL demo app - should make the example clearer.

Change-Id: I2e56c580b30435731b3b8dc716abae19c8673acf
Reviewed-on: https://gerrit.libreoffice.org/2920
Reviewed-by: Kohei Yoshida 
Tested-by: Kohei Yoshida 

diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 3d67d48..fb9f220 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -83,11 +83,6 @@ void Main()
 aMainWin.SetText( rtl::OUString( "VCLDemo - VCL Workbench" ) );
 aMainWin.Show();
 
-/*
-InfoBox ib(NULL, String((sal_Char*)"Test", sizeof("Test")));
-ib.Execute();
-*/
-
 Application::Execute();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/formula-core-rework' - sc/source

2013-03-22 Thread Kohei Yoshida
 sc/source/core/tool/interpr1.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit c06269755ddbe11ff0d60fce7cdb52112687162b
Author: Kohei Yoshida 
Date:   Fri Mar 22 23:02:33 2013 -0400

Remove unused variable.

Change-Id: Ibb79f153799ac98d29bd2391c8903b00bb153956

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index a51f28a..1b598cf 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -4153,7 +4153,6 @@ double ScInterpreter::IterateParameters( ScIterFunc 
eFunc, bool bTextAsZero )
 }
 if( eFunc == ifCOUNT2 )
 {
-ScBaseCell* pCell;
 ScCellIterator aIter( pDok, aRange, glSubTotal );
 for (bool bHas = aIter.first(); bHas; bHas = aIter.next())
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[PATCH] Remove commented code in VCL demo app - should make the exam...

2013-03-22 Thread Chris Sherlock (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/2920

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/20/2920/1

Remove commented code in VCL demo app - should make the example clearer.

Change-Id: I2e56c580b30435731b3b8dc716abae19c8673acf
---
M vcl/workben/vcldemo.cxx
1 file changed, 0 insertions(+), 5 deletions(-)



diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 3d67d48..fb9f220 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -83,11 +83,6 @@
 aMainWin.SetText( rtl::OUString( "VCLDemo - VCL Workbench" ) );
 aMainWin.Show();
 
-/*
-InfoBox ib(NULL, String((sal_Char*)"Test", sizeof("Test")));
-ib.Execute();
-*/
-
 Application::Execute();
 }
 

-- 
To view, visit https://gerrit.libreoffice.org/2920
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2e56c580b30435731b3b8dc716abae19c8673acf
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Chris Sherlock 

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


[Libreoffice-commits] core.git: Branch 'feature/formula-core-rework' - sc/source

2013-03-22 Thread Kohei Yoshida
 sc/source/core/tool/detfunc.cxx |  188 +++-
 sc/source/ui/app/transobj.cxx   |  108 +++---
 2 files changed, 145 insertions(+), 151 deletions(-)

New commits:
commit eed4ca11c508f8bf46d43e18955ed307439765d3
Author: Kohei Yoshida 
Date:   Fri Mar 22 21:35:44 2013 -0400

More ScCellIterator usage conversion. The rest are non-trivial...

Change-Id: I965e023d00306334f2b1aa7d3d92c90d44769b76

diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx
index 09881b4..55bea53 100644
--- a/sc/source/core/tool/detfunc.cxx
+++ b/sc/source/core/tool/detfunc.cxx
@@ -1029,87 +1029,85 @@ sal_uInt16 ScDetectiveFunc::InsertErrorLevel( SCCOL 
nCol, SCROW nRow, ScDetectiv
 sal_uInt16 ScDetectiveFunc::InsertSuccLevel( SCCOL nCol1, SCROW nRow1, SCCOL 
nCol2, SCROW nRow2,
 ScDetectiveData& rData, sal_uInt16 
nLevel )
 {
-//  ueber ganzes Dokument
+// over the entire document.
 
 sal_uInt16 nResult = DET_INS_EMPTY;
-ScCellIterator aCellIter( pDoc, 0,0,0, MAXCOL,MAXROW,MAXTAB );  // 
alle Tabellen
-ScBaseCell* pCell = aCellIter.GetFirst();
-while (pCell)
+ScCellIterator aCellIter(pDoc, ScRange(0,0,0,MAXCOL,MAXROW,MAXTAB));  // 
all sheets
+for (bool bHas = aCellIter.first(); bHas; bHas = aCellIter.next())
 {
-if (pCell->GetCellType() == CELLTYPE_FORMULA)
-{
-ScFormulaCell* pFCell = (ScFormulaCell*)pCell;
-sal_Bool bRunning = pFCell->IsRunning();
+if (aCellIter.getType() != CELLTYPE_FORMULA)
+continue;
+
+ScFormulaCell* pFCell = aCellIter.getFormulaCell();
+bool bRunning = pFCell->IsRunning();
 
-if (pFCell->GetDirty())
-pFCell->Interpret();// nach SetRunning geht's 
nicht mehr!
-pFCell->SetRunning(sal_True);
+if (pFCell->GetDirty())
+pFCell->Interpret();// nach SetRunning geht's 
nicht mehr!
+pFCell->SetRunning(true);
 
-ScDetectiveRefIter aIter( (ScFormulaCell*) pCell );
-ScRange aRef;
-while ( aIter.GetNextRef( aRef) )
+ScDetectiveRefIter aIter(pFCell);
+ScRange aRef;
+while ( aIter.GetNextRef( aRef) )
+{
+if (aRef.aStart.Tab() <= nTab && aRef.aEnd.Tab() >= nTab)
 {
-if (aRef.aStart.Tab() <= nTab && aRef.aEnd.Tab() >= nTab)
+if (Intersect( nCol1,nRow1,nCol2,nRow2,
+aRef.aStart.Col(),aRef.aStart.Row(),
+aRef.aEnd.Col(),aRef.aEnd.Row() ))
 {
-if (Intersect( nCol1,nRow1,nCol2,nRow2,
-aRef.aStart.Col(),aRef.aStart.Row(),
-aRef.aEnd.Col(),aRef.aEnd.Row() ))
+sal_Bool bAlien = ( aCellIter.GetPos().Tab() != nTab );
+sal_Bool bDrawRet;
+if (bAlien)
+bDrawRet = DrawAlienEntry( aRef, rData );
+else
+bDrawRet = DrawEntry( aCellIter.GetPos().Col(), 
aCellIter.GetPos().Row(),
+aRef, rData );
+if (bDrawRet)
 {
-sal_Bool bAlien = ( aCellIter.GetPos().Tab() != nTab );
-sal_Bool bDrawRet;
-if (bAlien)
-bDrawRet = DrawAlienEntry( aRef, rData );
-else
-bDrawRet = DrawEntry( aCellIter.GetPos().Col(), 
aCellIter.GetPos().Row(),
-aRef, rData );
-if (bDrawRet)
+nResult = DET_INS_INSERTED; //  neuer Pfeil 
eingetragen
+}
+else
+{
+if (bRunning)
 {
-nResult = DET_INS_INSERTED; //  neuer 
Pfeil eingetragen
+if (nResult == DET_INS_EMPTY)
+nResult = DET_INS_CIRCULAR;
 }
 else
 {
-if (bRunning)
-{
-if (nResult == DET_INS_EMPTY)
-nResult = DET_INS_CIRCULAR;
-}
-else
-{
-//  weiterverfolgen
+//  weiterverfolgen
 
-if ( nLevel < rData.GetMaxLevel() )
+if ( nLevel < rData.GetMaxLevel() )
+{
+sal_uInt16 nSubResult = InsertSuccLeve

[Libreoffice-commits] core.git: Branch 'feature/formula-core-rework' - sc/inc sc/source

2013-03-22 Thread Kohei Yoshida
 sc/inc/dociter.hxx|2 +-
 sc/source/core/data/dociter.cxx   |   17 +++--
 sc/source/core/data/documen3.cxx  |   36 
 sc/source/core/data/document.cxx  |   15 +++
 sc/source/core/tool/detfunc.cxx   |   20 ++--
 sc/source/core/tool/interpr1.cxx  |   26 +-
 sc/source/core/tool/rangeseq.cxx  |   10 ++
 sc/source/ui/docshell/tablink.cxx |   27 ---
 sc/source/ui/unoobj/funcuno.cxx   |   30 ++
 sc/source/ui/view/tabview4.cxx|   13 +++--
 10 files changed, 101 insertions(+), 95 deletions(-)

New commits:
commit b65381e6e4da159bfd65c31fa9a20beccaa87bf6
Author: Kohei Yoshida 
Date:   Fri Mar 22 20:54:13 2013 -0400

More on ScCellIterator usage conversion... Still not done.

Change-Id: I5023a57f3a089f1af7cd7fe53f57f82c60eb2b65

diff --git a/sc/inc/dociter.hxx b/sc/inc/dociter.hxx
index 8e3b28b..1a6d3e7 100644
--- a/sc/inc/dociter.hxx
+++ b/sc/inc/dociter.hxx
@@ -244,7 +244,7 @@ public:
 const ScAddress& GetPos() const { return maCurPos; }
 
 CellType getType() const;
-const OUString& getString() const;
+OUString getString();
 const EditTextObject* getEditText() const;
 ScFormulaCell* getFormulaCell();
 bool hasString() const;
diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index 6517f5b..a280555 100644
--- a/sc/source/core/data/dociter.cxx
+++ b/sc/source/core/data/dociter.cxx
@@ -1138,9 +1138,22 @@ CellType ScCellIterator::getType() const
 return meCurType;
 }
 
-const OUString& ScCellIterator::getString() const
+OUString ScCellIterator::getString()
 {
-return maCurString;
+switch (meCurType)
+{
+case CELLTYPE_STRING:
+return maCurString;
+case CELLTYPE_EDIT:
+if (mpCurEditText)
+return ScEditUtil::GetString(*mpCurEditText);
+break;
+case CELLTYPE_FORMULA:
+return mpCurFormula->GetString();
+default:
+;
+}
+return EMPTY_OUSTRING;
 }
 
 const EditTextObject* ScCellIterator::getEditText() const
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index f2fc819..3196b2e 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -742,13 +742,13 @@ bool ScDocument::DoSubTotals( SCTAB nTab, 
ScSubTotalParam& rParam )
 bool ScDocument::HasSubTotalCells( const ScRange& rRange )
 {
 ScCellIterator aIter( this, rRange );
-ScBaseCell* pCell = aIter.GetFirst();
-while (pCell)
+for (bool bHas = aIter.first(); bHas; bHas = aIter.next())
 {
-if ( pCell->GetCellType() == CELLTYPE_FORMULA && 
((ScFormulaCell*)pCell)->IsSubTotal() )
-return true;
+if (aIter.getType() != CELLTYPE_FORMULA)
+continue;
 
-pCell = aIter.GetNext();
+if (aIter.getFormulaCell()->IsSubTotal())
+return true;
 }
 return false;   // none found
 }
@@ -1576,19 +1576,23 @@ bool ScDocument::GetFormulaEntries( ScTypedCaseStrSet& 
rStrings )
 for (sal_uInt16 nListNo=0; nListNo<2; nListNo++)
 {
 ScRangePairList* pList = pLists[ nListNo ];
-if (pList)
-for ( size_t i = 0, nPairs = pList->size(); i < nPairs; ++i )
+if (!pList)
+continue;
+
+for ( size_t i = 0, nPairs = pList->size(); i < nPairs; ++i )
+{
+ScRangePair* pPair = (*pList)[i];
+ScRange aRange = pPair->GetRange(0);
+ScCellIterator aIter( this, aRange );
+for (bool bHas = aIter.first(); bHas; bHas = aIter.next())
 {
-ScRangePair* pPair = (*pList)[i];
-ScRange aRange = pPair->GetRange(0);
-ScCellIterator aIter( this, aRange );
-for ( ScBaseCell* pCell = aIter.GetFirst(); pCell; pCell = 
aIter.GetNext() )
-if ( pCell->HasStringData() )
-{
-OUString aStr = pCell->GetStringData();
-rStrings.insert(ScTypedStrData(aStr, 0.0, 
ScTypedStrData::Header));
-}
+if (!aIter.hasString())
+continue;
+
+OUString aStr = aIter.getString();
+rStrings.insert(ScTypedStrData(aStr, 0.0, 
ScTypedStrData::Header));
 }
+}
 }
 
 return true;
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index a0ec234..6ebbf39 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -3418,15 +3418,14 @@ void ScDocument::InterpretDirtyCells( const 
ScRangeList& rRanges )
 for (size_t nPos=0, nRangeCount = rRanges.size(); nPos < nRangeCount; 
nPos++)
 {
 ScCellIterator aIter( this, *rRanges[ nPos ] );
-ScBaseCell* pCell = aIter.GetFirst();
-   

Re: Build error - testFdo60915

2013-03-22 Thread Rodolfo
I have the same issue here.

Yes, timezone is America/Sao Paulo.

But, aside the bug report, I'm a Debian-Wheezy user.

About ./config_host.mk contains:
export SYSTEM_ICU=NO

=/

Att,
Rodolfo

2013/3/22 Eike Rathke :
> Hi Marcos,
>
> On Friday, 2013-03-22 17:01:12 -0300, Marcos Souza wrote:
>
>> AHuahUAHauhAUAHU
>>
>> Brazil makes me laught in LO too T.T
>
> Glad you had a good laugh ;-)
>
>> Yes this is my timezone
>
> Ok, could you please tell me which ICU library version you use
>
> * the internally provided 49.1.1, ./config_host.mk contains
>   SYSTEM_ICU=NO in this case
> * a system one, which version? ./config_host.mk contains SYSTEM_ICU=YES
>   in this case
>
> The version numbers are in ./config_host.mk variables ICU_MAJOR,
> ICU_MINOR and ICU_MICRO
>
>   Eike
>
> --
> LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
> New GnuPG key 0x65632D3A : 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A
> Old GnuPG key 0x293C05FD : 997A 4C60 CE41 0149 0DB3  9E96 2F1A D073 293C 05FD
> Support the FSFE, care about Free Software! https://fsfe.org/support/?erack
>
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'feature/formula-core-rework' - sc/inc sc/source

2013-03-22 Thread Kohei Yoshida
 sc/inc/document.hxx   |4 ++--
 sc/source/core/data/column.cxx|2 +-
 sc/source/core/data/column2.cxx   |6 +++---
 sc/source/core/data/documen6.cxx  |   12 
 sc/source/filter/html/htmlexp.cxx |2 +-
 sc/source/ui/view/output2.cxx |2 +-
 sc/source/ui/view/viewfunc.cxx|8 +++-
 sc/source/ui/view/viewutil.cxx|2 +-
 8 files changed, 16 insertions(+), 22 deletions(-)

New commits:
commit cef2ba8c77c2a265dbd44c99f30734bb61f4884f
Author: Kohei Yoshida 
Date:   Fri Mar 22 20:10:36 2013 -0400

More on reducing direct use of ScBaseCell.

Change-Id: Ic59376eea086802f173e590faf2693b646db3feb

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 742bfc9..70c5620 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1228,8 +1228,8 @@ public:
 SC_DLLPUBLIC const ::com::sun::star::uno::Reference< 
::com::sun::star::i18n::XBreakIterator >& GetBreakIterator();
 boolHasStringWeakCharacters( const rtl::OUString& rString );
 SC_DLLPUBLIC sal_uInt8  GetStringScriptType( const rtl::OUString& 
rString );
-SC_DLLPUBLIC sal_uInt8 GetCellScriptType( const ScAddress& rPos, 
ScBaseCell* pCell, sal_uLong nNumberFormat );
-SC_DLLPUBLIC sal_uInt8 GetScriptType( SCCOL nCol, SCROW nRow, SCTAB nTab, 
ScBaseCell* pCell );
+SC_DLLPUBLIC sal_uInt8 GetCellScriptType( const ScAddress& rPos, sal_uLong 
nNumberFormat );
+SC_DLLPUBLIC sal_uInt8 GetScriptType( SCCOL nCol, SCROW nRow, SCTAB nTab );
 
 boolHasDetectiveOperations() const;
 voidAddDetectiveOperation( const ScDetOpData& rData );
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index 13287de..5607211 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -2371,7 +2371,7 @@ bool ScColumn::HasEditCells(SCROW nStartRow, SCROW 
nEndRow, SCROW& rFirst) const
 ScBaseCell* pCell = maItems[nIndex].pCell;
 CellType eCellType = pCell->GetCellType();
 if ( eCellType == CELLTYPE_EDIT ||
- IsAmbiguousScriptNonZero( pDocument->GetScriptType(nCol, nRow, 
nTab, pCell) ) ||
+ IsAmbiguousScriptNonZero( pDocument->GetScriptType(nCol, nRow, 
nTab) ) ||
  ((eCellType == CELLTYPE_FORMULA) && 
((ScFormulaCell*)pCell)->IsMultilineResult()) )
 {
 rFirst = nRow;
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index e2792de..4108cdc 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -214,7 +214,7 @@ long ScColumn::GetNeededSize(
 nIndent = ((const 
SfxUInt16Item&)pPattern->GetItem(ATTR_INDENT)).GetValue();
 }
 
-sal_uInt8 nScript = pDocument->GetScriptType( nCol, nRow, nTab, pCell 
);
+sal_uInt8 nScript = pDocument->GetScriptType(nCol, nRow, nTab);
 if (nScript == 0) nScript = ScGlobal::GetDefaultScriptType();
 
 //  also call SetFont for edit cells, because bGetFont may be set only 
once
@@ -603,7 +603,7 @@ sal_uInt16 ScColumn::GetOptimalColWidth(
 {
 SCROW nRow = maItems[nIndex].nRow;
 
-sal_uInt8 nScript = pDocument->GetScriptType( nCol, nRow, nTab, 
maItems[nIndex].pCell );
+sal_uInt8 nScript = pDocument->GetScriptType(nCol, nRow, nTab);
 if (nScript == 0) nScript = ScGlobal::GetDefaultScriptType();
 
 const ScPatternAttr* pPattern = GetPattern( nRow );
@@ -772,7 +772,7 @@ void ScColumn::GetOptimalHeight(
 Search(nStart,nIndex);
 while ( nIndex < maItems.size() && 
(nRow=maItems[nIndex].nRow) <= nEnd )
 {
-sal_uInt8 nScript = pDocument->GetScriptType( nCol, 
nRow, nTab, maItems[nIndex].pCell );
+sal_uInt8 nScript = pDocument->GetScriptType(nCol, 
nRow, nTab);
 if ( nScript != nDefScript )
 {
 if ( nScript == SCRIPTTYPE_ASIAN )
diff --git a/sc/source/core/data/documen6.cxx b/sc/source/core/data/documen6.cxx
index 507f7f9..055598c 100644
--- a/sc/source/core/data/documen6.cxx
+++ b/sc/source/core/data/documen6.cxx
@@ -114,18 +114,14 @@ sal_uInt8 ScDocument::GetStringScriptType( const 
rtl::OUString& rString )
 return nRet;
 }
 
-sal_uInt8 ScDocument::GetCellScriptType( const ScAddress& rPos, ScBaseCell* 
pCell, sal_uLong nNumberFormat )
+sal_uInt8 ScDocument::GetCellScriptType( const ScAddress& rPos, sal_uLong 
nNumberFormat )
 {
-if ( !pCell )
-return 0;   // empty
-
 sal_uInt8 nStored = GetScriptType(rPos);
 if ( nStored != SC_SCRIPTTYPE_UNKNOWN ) // stored value valid?
 return nStored; // use stored value
 
-rtl::OUString aStr;
 Color* pColor;
-ScCellFormat::GetString( pCell, nNumberFormat, aStr, &pColor, 
*xPoolHelper->GetFormTable() );
+OUString 

[Libreoffice-commits] core.git: Branch 'feature/formula-core-rework' - sc/inc sc/source

2013-03-22 Thread Kohei Yoshida
 sc/inc/dociter.hxx|   22 ++-
 sc/inc/editutil.hxx   |2 
 sc/source/core/data/autonamecache.cxx |   19 +-
 sc/source/core/data/dociter.cxx   |  179 ++
 sc/source/core/tool/detfunc.cxx   |9 -
 sc/source/core/tool/editutil.cxx  |   14 ++
 sc/source/filter/xml/xmlexprt.cxx |   12 +
 sc/source/ui/Accessibility/AccessibleCell.cxx |5 
 sc/source/ui/docshell/dbdocfun.cxx|2 
 sc/source/ui/unoobj/cellsuno.cxx  |   27 +--
 10 files changed, 225 insertions(+), 66 deletions(-)

New commits:
commit 1dccacc26854cb2af8476f163450bd0f0eb97128
Author: Kohei Yoshida 
Date:   Fri Mar 22 19:49:41 2013 -0400

Re-did ScCellIterator to avoid copying every single iterated cell.

ScCellValue copies the cell value. Let's not use it in ScCellIterator.

Change-Id: Id478b607c702077751878f557b8779c98b68db28

diff --git a/sc/inc/dociter.hxx b/sc/inc/dociter.hxx
index 80f3738..8e3b28b 100644
--- a/sc/inc/dociter.hxx
+++ b/sc/inc/dociter.hxx
@@ -24,7 +24,6 @@
 #include 
 #include "global.hxx"
 #include "scdllapi.h"
-#include "cellvalue.hxx"
 
 #include 
 
@@ -45,6 +44,7 @@ struct ScDBQueryParamBase;
 struct ScQueryParam;
 struct ScDBQueryParamInternal;
 struct ScDBQueryParamMatrix;
+class ScFormulaCell;
 
 class ScDocumentIterator// walk through all non-empty cells
 {
@@ -218,10 +218,17 @@ private:
 ScAddress maStartPos;
 ScAddress maEndPos;
 ScAddress maCurPos;
-ScCellValue maCurCell;
 SCSIZE  nColRow;
 boolbSubTotal;
 
+CellType meCurType;
+OUString maCurString;
+union {
+double mfCurValue;
+const EditTextObject* mpCurEditText; // points to the original.
+ScFormulaCell* mpCurFormula; // points to the original.
+};
+
 ScBaseCell* GetThis();
 void init();
 bool getCurrent();
@@ -236,10 +243,17 @@ public:
 ScBaseCell* GetNext();
 const ScAddress& GetPos() const { return maCurPos; }
 
+CellType getType() const;
+const OUString& getString() const;
+const EditTextObject* getEditText() const;
+ScFormulaCell* getFormulaCell();
+bool hasString() const;
+bool hasNumeric() const;
+bool isEmpty() const;
+bool equalsWithoutFormat( const ScAddress& rPos ) const;
+
 bool first();
 bool next();
-
-const ScCellValue& get() const;
 };
 
 class ScQueryCellIterator   // walk through all non-empty cells in an 
area
diff --git a/sc/inc/editutil.hxx b/sc/inc/editutil.hxx
index 3bdbb32..556e749 100644
--- a/sc/inc/editutil.hxx
+++ b/sc/inc/editutil.hxx
@@ -59,6 +59,8 @@ public:
 /// Retrieves string with paragraphs delimited by new lines ('\n').
 static String GetMultilineString( const EditEngine& rEngine );
 
+static OUString GetString( const EditTextObject& rEditText );
+
 public:
 ScEditUtil( ScDocument* pDocument, SCCOL nX, SCROW nY, SCTAB 
nZ,
 const Point& rScrPosPixel,
diff --git a/sc/source/core/data/autonamecache.cxx 
b/sc/source/core/data/autonamecache.cxx
index 2bbc4b2..6629c51 100644
--- a/sc/source/core/data/autonamecache.cxx
+++ b/sc/source/core/data/autonamecache.cxx
@@ -57,23 +57,26 @@ const ScAutoNameAddresses& 
ScAutoNameCache::GetNameOccurrences( const String& rN
 {
 // don't check code length here, always use the stored result
 // (AutoCalc is disabled during CompileXML)
-const ScCellValue& rVal = aIter.get();
-if (rVal.hasString())
+if (aIter.hasString())
 {
 OUString aStr;
-switch (rVal.meType)
+switch (aIter.getType())
 {
 case CELLTYPE_STRING:
-aStr = *rVal.mpString;
+aStr = aIter.getString();
 break;
 case CELLTYPE_FORMULA:
-aStr = rVal.mpFormula->GetString();
+aStr = aIter.getFormulaCell()->GetString();
 break;
 case CELLTYPE_EDIT:
 {
-ScFieldEditEngine& rEngine = pDoc->GetEditEngine();
-rEngine.SetText(*rVal.mpEditText);
-aStr = ScEditUtil::GetMultilineString(rEngine); // string 
with line separators between paragraphs
+const EditTextObject* p = aIter.getEditText();
+if (p)
+{
+ScFieldEditEngine& rEngine = pDoc->GetEditEngine();
+rEngine.SetText(*p);
+aStr = ScEditUtil::GetMultilineString(rEngine); // 
string with line separators between paragraphs
+}
 }
 break;
 case CELLTYPE_NONE:
diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index 5446bbc..6517f5b 100644

[PATCH] Replace String with OUString in RecodeString

2013-03-22 Thread via Code Review
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/2919

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/19/2919/1

Replace String with OUString in RecodeString

Change-Id: I987f738d1cd7d640a253f3cd31864290b6d763bf
---
M unotools/inc/unotools/fontdefs.hxx
M unotools/source/misc/fontcvt.cxx
M vcl/source/gdi/outdev3.cxx
3 files changed, 17 insertions(+), 9 deletions(-)



diff --git a/unotools/inc/unotools/fontdefs.hxx 
b/unotools/inc/unotools/fontdefs.hxx
index f923464..60c37d4 100644
--- a/unotools/inc/unotools/fontdefs.hxx
+++ b/unotools/inc/unotools/fontdefs.hxx
@@ -22,6 +22,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 namespace utl {
   class FontSubstConfiguration;
@@ -54,7 +56,7 @@
 const char* mpSubsFontName;
 sal_Unicode (*mpCvtFunc)( sal_Unicode );
 sal_Unicode RecodeChar( sal_Unicode c ) const;
-voidRecodeString( String& rStra, xub_StrLen nIndex, 
xub_StrLen nLen ) const;
+voidRecodeString( OUString& rStra, sal_Int32 nIndex, 
sal_Int32 nLen ) const;
 static const ConvertChar* GetRecodeData( const String& rOrgFontName, const 
String& rMapFontName );
 };
 
diff --git a/unotools/source/misc/fontcvt.cxx b/unotools/source/misc/fontcvt.cxx
index fe870ed..99e07ee 100644
--- a/unotools/source/misc/fontcvt.cxx
+++ b/unotools/source/misc/fontcvt.cxx
@@ -1372,15 +1372,17 @@
 
 // recode the string assuming the character codes are symbol codes
 // from an traditional symbol font (i.e. U+F020..U+F0FF)
-void ConvertChar::RecodeString( String& rStr, xub_StrLen nIndex, xub_StrLen 
nLen ) const
+void ConvertChar::RecodeString( OUString& rStr, sal_Int32 nIndex, sal_Int32 
nLen ) const
 {
-sal_uLong nLastIndex = (sal_uLong)nIndex + nLen;
-if( nLastIndex > rStr.Len() )
-nLastIndex = rStr.Len();
+sal_Int32 nLastIndex = nIndex + nLen;
+OUStringBufferaTmpStr(rStr);
+
+if( nLastIndex > aTmpStr.getLength() )
+nLastIndex = aTmpStr.getLength();
 
 for(; nIndex < nLastIndex; ++nIndex )
 {
-sal_Unicode cOrig = rStr.GetChar( nIndex );
+sal_Unicode cOrig = rStr[ nIndex ];
 // only recode symbols and their U+00xx aliases
 if( ((cOrig < 0x0020) || (cOrig > 0x00FF))
 &&  ((cOrig < 0xF020) || (cOrig > 0xF0FF)) )
@@ -1389,8 +1391,9 @@
 // recode a symbol
 sal_Unicode cNew = RecodeChar( cOrig );
 if( cOrig != cNew )
-rStr.SetChar( nIndex, cNew );
+aTmpStr[ nIndex ] = cNew;
 }
+rStr = aTmpStr.makeStringAndClear();
 }
 
 //===
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index df1016c..565fcae 100644
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -5836,8 +5836,11 @@
 
 // convert from logical units to physical units
 // recode string if needed
-if( mpFontEntry->mpConversion )
-mpFontEntry->mpConversion->RecodeString( aStr, 0, aStr.Len() );
+if( mpFontEntry->mpConversion ) {
+OUString aTmpStr(aStr); // only needed until aStr is OUString as well
+mpFontEntry->mpConversion->RecodeString( aTmpStr, 0, 
aTmpStr.getLength() );
+aStr = String(aTmpStr);
+}
 
 long nPixelWidth = nLogicalWidth;
 if( nLogicalWidth && mbMap )

-- 
To view, visit https://gerrit.libreoffice.org/2919
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I987f738d1cd7d640a253f3cd31864290b6d763bf
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Christina Roßmanith 

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


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

2013-03-22 Thread Eike Rathke
 sc/source/core/data/validat.cxx |   13 -
 1 file changed, 8 insertions(+), 5 deletions(-)

New commits:
commit 9b612f568a5c88f1a65654ad2bdd3df7211a9f3a
Author: Eike Rathke 
Date:   Fri Mar 22 23:51:55 2013 +0100

no need to new/delete temporary, stack based auto does it

Change-Id: I5ab9537718f3f9a7e4296226c6ca1ad82ee2eb8a

diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx
index 4e1b1f5..71b53e5 100644
--- a/sc/source/core/data/validat.cxx
+++ b/sc/source/core/data/validat.cxx
@@ -453,13 +453,16 @@ sal_Bool ScValidationData::IsDataValid( const String& 
rTest, const ScPatternAttr
 }
 else
 {
-ScBaseCell* pCell;
 if (bIsVal)
-pCell = new ScValueCell( nVal );
+{
+ScValueCell aTmpCell( nVal );
+bRet = IsDataValid( &aTmpCell, rPos );
+}
 else
-pCell = new ScStringCell( rTest );
-bRet = IsDataValid( pCell, rPos );
-pCell->Delete();
+{
+ScStringCell aTmpCell( rTest );
+bRet = IsDataValid( &aTmpCell, rPos );
+}
 }
 
 return bRet;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: About coverity 440107 (keyimpl.cxx in registry)

2013-03-22 Thread Stephan Bergmann

On 03/22/2013 10:12 PM, julien2412 wrote:

Indeed we have this switch:
 622 switch (valueType)
 623 {
 624 case RG_VALUETYPE_NOT_DEFINED:
 625 memcpy(value, pBuffer, valueSize);
 626 break;
 627 case RG_VALUETYPE_LONG:
 628 readINT32(pBuffer, *((sal_Int32*)value));
 629 break;
 630 case RG_VALUETYPE_STRING:
 631 readUtf8(pBuffer, (sal_Char*)value, valueSize);
 632 break;
 633 case RG_VALUETYPE_UNICODE:
 634 readString(pBuffer, (sal_Unicode*)value, valueSize);
 635 break;
 636 case RG_VALUETYPE_BINARY:
 637 memcpy(value, pBuffer, valueSize);
 638 break;
 639 case RG_VALUETYPE_LONGLIST:
 640 case RG_VALUETYPE_STRINGLIST:
 641 case RG_VALUETYPE_UNICODELIST:
 642 memcpy(value, pBuffer, valueSize);
 643 break;
 644 }

but some lines above:
 604 if (valueType > 4)
 605 {
 606 return REG_INVALID_VALUE;
 607 }

I took a look, it's like this since initial import in 2000.
Should if (valueType > 4) be removed or should we clean the >4 cases ?


The >4 cases are the RG_VALUETYPE_*LIST cases for which there are 
dedicated ORegKey::get*ListValue functions, so they can be removed from 
the switch.  Shudder.  (All this would go to the bin shortly anyway if 
it weren't for our beloved backwards compatibility...)


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


Re: NumericBox unsafe double conversion

2013-03-22 Thread Stephan Bergmann

On 03/22/2013 02:50 PM, Zolnai Tamás wrote:

 From that matter, why is that the toInt64() function doesn't pay
attention on overflow/underflow? Maybe it would simpler to handle these
"flows" in that function.


Yes, letting the to functions return zero in case of overflow, 
similarly to the case where "this string represents no number," would 
make a lot of sense.  Patches welcome.


Stephan

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


[Libreoffice-commits] core.git: Branch 'refs/notes/commits' - 3a/4882779d58e382abb866fc848d6c7a935181de

2013-03-22 Thread Eike Rathke
 3a/4882779d58e382abb866fc848d6c7a935181de |1 +
 1 file changed, 1 insertion(+)

New commits:
commit cfd44f7bbabec822ccb711c7c02f247249e33381
Author: Eike Rathke 
Date:   Fri Mar 22 23:44:55 2013 +0100

Notes added by 'git notes add'

diff --git a/3a/4882779d58e382abb866fc848d6c7a935181de 
b/3a/4882779d58e382abb866fc848d6c7a935181de
new file mode 100644
index 000..ff400e8
--- /dev/null
+++ b/3a/4882779d58e382abb866fc848d6c7a935181de
@@ -0,0 +1 @@
+merged as: 3620920babb60177dc2b8e1f61c75cf08cc0f949
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-03-22 Thread Eike Rathke
 sc/source/core/data/validat.cxx |   29 +
 1 file changed, 21 insertions(+), 8 deletions(-)

New commits:
commit fdd9f2dbdf7c703cbc8519af932194ebdf95d77c
Author: Eike Rathke 
Date:   Fri Mar 22 23:39:54 2013 +0100

use input line string length for numeric data length, i#93128

3620920babb60177dc2b8e1f61c75cf08cc0f949 checked the raw input data
length.

Change-Id: Iebb6e9c4a532b73a64f41261ee8bd382adbe701d

diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx
index dd3ff74..4e1b1f5 100644
--- a/sc/source/core/data/validat.cxx
+++ b/sc/source/core/data/validat.cxx
@@ -429,26 +429,39 @@ sal_Bool ScValidationData::IsDataValid( const String& 
rTest, const ScPatternAttr
 
 // get the value if any
 sal_uInt32 nFormat = rPattern.GetNumberFormat( pFormatter );
-
 double nVal;
 sal_Bool bIsVal = pFormatter->IsNumberFormat( rTest, nFormat, nVal );
-ScBaseCell* pCell;
-if (bIsVal)
-pCell = new ScValueCell( nVal );
-else
-pCell = new ScStringCell( rTest );
 
 sal_Bool bRet;
 if (SC_VALID_TEXTLEN == eDataMode)
 {
-const double nLenVal = static_cast( rTest.Len() );
+double nLenVal;
+if (!bIsVal)
+nLenVal = static_cast( rTest.Len() );
+else
+{
+// For numeric values use the resulting input line string to
+// determine length, otherwise a once accepted value maybe could
+// not be edited again, for example abbreviated dates or leading
+// zeros or trailing zeros after decimal separator change length.
+String aStr;
+pFormatter->GetInputLineString( nVal, nFormat, aStr);
+nLenVal = static_cast( aStr.Len() );
+}
 ScValueCell aTmpCell( nLenVal );
 bRet = IsCellValid( &aTmpCell, rPos );
 }
 else
+{
+ScBaseCell* pCell;
+if (bIsVal)
+pCell = new ScValueCell( nVal );
+else
+pCell = new ScStringCell( rTest );
 bRet = IsDataValid( pCell, rPos );
+pCell->Delete();
+}
 
-pCell->Delete();
 return bRet;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-03-22 Thread Herbert Dürr
 sc/source/core/data/validat.cxx |   25 -
 1 file changed, 16 insertions(+), 9 deletions(-)

New commits:
commit 3620920babb60177dc2b8e1f61c75cf08cc0f949
Author: Herbert Dürr 
Date:   Wed Aug 1 12:47:33 2012 +

i#93128# fix data validity check

for criteria "Allow text length" and numeric cells

Patch-by: Zhang Lu
Reported-by: amy2008, eberlein
Review-by: Herbert Duerr
(cherry picked from commit 3a4882779d58e382abb866fc848d6c7a935181de)

Conflicts:
sc/source/core/data/validat.cxx

Change-Id: I7c528da3cf2e12122cecbbde3ec84684307f3248

diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx
index 5b74716..dd3ff74 100644
--- a/sc/source/core/data/validat.cxx
+++ b/sc/source/core/data/validat.cxx
@@ -416,19 +416,18 @@ sal_Bool ScValidationData::DoError( Window* pParent, 
const String& rInput,
 sal_Bool ScValidationData::IsDataValid( const String& rTest, const 
ScPatternAttr& rPattern,
 const ScAddress& rPos ) const
 {
-if ( eDataMode == SC_VALID_ANY )
-return sal_True;// alles erlaubt
+if ( eDataMode == SC_VALID_ANY ) // check if any cell content is allowed
+return sal_True;
 
-if ( rTest.GetChar(0) == '=' )
-return false;   // Formeln sind sonst immer 
ungueltig
+if ( rTest.GetChar(0) == '=' )   // formulas do not pass the validity test
+return sal_False;
 
-if ( !rTest.Len() )
-return IsIgnoreBlank(); // leer: wie eingestellt
+if ( !rTest.Len() )  // check whether empty cells are allowed
+return IsIgnoreBlank();
 
 SvNumberFormatter* pFormatter = GetDocument()->GetFormatTable();
 
-//  Test, was es denn ist - wie in ScColumn::SetString
-
+// get the value if any
 sal_uInt32 nFormat = rPattern.GetNumberFormat( pFormatter );
 
 double nVal;
@@ -439,7 +438,15 @@ sal_Bool ScValidationData::IsDataValid( const String& 
rTest, const ScPatternAttr
 else
 pCell = new ScStringCell( rTest );
 
-sal_Bool bRet = IsDataValid( pCell, rPos );
+sal_Bool bRet;
+if (SC_VALID_TEXTLEN == eDataMode)
+{
+const double nLenVal = static_cast( rTest.Len() );
+ScValueCell aTmpCell( nLenVal );
+bRet = IsCellValid( &aTmpCell, rPos );
+}
+else
+bRet = IsDataValid( pCell, rPos );
 
 pCell->Delete();
 return bRet;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[PATCH libreoffice-3-6-6] fdo#58071: .dot files sometimes rejected by writer

2013-03-22 Thread Michael Stahl (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/2918

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/18/2918/1

fdo#58071: .dot files sometimes rejected by writer

because CWW8 appears twice, once for normal .doc and once for .dot. So a .dot
files is tested twice if it's supported by the WW8 filter. Depending on the
(effectively arbitrary) order they appear in the list .dots may fail the "is a
normal non template .doc" test after the "is a template .dot" test and get
rejected as a CWW8 candidate.

(cherry picked from commit 94001499e0d7453c7012241334a9911dfccef76b)

Signed-off-by: Michael Stahl 

Conflicts:
sw/source/filter/basflt/iodetect.cxx

Change-Id: I88aec29fdd5f9ec4dd4ad2813ff3c6b8fa5c5461
(cherry picked from commit 319cbc8eafa0a60445544879d641d0e4dcae5376)
---
M sw/source/filter/basflt/iodetect.cxx
1 file changed, 7 insertions(+), 0 deletions(-)



diff --git a/sw/source/filter/basflt/iodetect.cxx 
b/sw/source/filter/basflt/iodetect.cxx
index 41adf67..e83635f 100644
--- a/sw/source/filter/basflt/iodetect.cxx
+++ b/sw/source/filter/basflt/iodetect.cxx
@@ -271,6 +271,13 @@
 
 if( bRet && ppFilter  )
 *ppFilter = pFltr;
+
+//The same underlying filter can appear multiple times in the
+//filter list, e.g. CWW8 filter twice, once for .doc and once for
+//.dot.  We just care here if its either, not enforce that it's
+//both which would be a bit of an odd requirement
+if (bRet)
+break;
 }
 
 pFltr = aIter.Next();

-- 
To view, visit https://gerrit.libreoffice.org/2918
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I88aec29fdd5f9ec4dd4ad2813ff3c6b8fa5c5461
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-3-6-6
Gerrit-Owner: Michael Stahl 
Gerrit-Reviewer: Caolán McNamara 

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


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

2013-03-22 Thread Caolán McNamara
 sw/source/filter/basflt/iodetect.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit 319cbc8eafa0a60445544879d641d0e4dcae5376
Author: Caolán McNamara 
Date:   Thu Nov 29 09:48:24 2012 +

fdo#58071: .dot files sometimes rejected by writer

because CWW8 appears twice, once for normal .doc and once for .dot. So a 
.dot
files is tested twice if it's supported by the WW8 filter. Depending on the
(effectively arbitrary) order they appear in the list .dots may fail the 
"is a
normal non template .doc" test after the "is a template .dot" test and get
rejected as a CWW8 candidate.

(cherry picked from commit 94001499e0d7453c7012241334a9911dfccef76b)

Signed-off-by: Michael Stahl 

Conflicts:
sw/source/filter/basflt/iodetect.cxx

Change-Id: I88aec29fdd5f9ec4dd4ad2813ff3c6b8fa5c5461

diff --git a/sw/source/filter/basflt/iodetect.cxx 
b/sw/source/filter/basflt/iodetect.cxx
index 41adf67..e83635f 100644
--- a/sw/source/filter/basflt/iodetect.cxx
+++ b/sw/source/filter/basflt/iodetect.cxx
@@ -271,6 +271,13 @@ sal_Bool SwIoSystem::IsFileFilter( SfxMedium& rMedium, 
const String& rFmtName,
 
 if( bRet && ppFilter  )
 *ppFilter = pFltr;
+
+//The same underlying filter can appear multiple times in the
+//filter list, e.g. CWW8 filter twice, once for .doc and once for
+//.dot.  We just care here if its either, not enforce that it's
+//both which would be a bit of an odd requirement
+if (bRet)
+break;
 }
 
 pFltr = aIter.Next();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-03-22 Thread Mathias Hasselmann
 dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit ffb4e4310ef614d3d9cb26a43461fa3213b52fde
Author: Mathias Hasselmann 
Date:   Fri Mar 22 23:29:20 2013 +0100

Adjust indenting of a few comments

Change-Id: I5c72ea3b8c270c220be388d481569b82b7fa0ff7

diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx 
b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
index 2d50d1b..b561a3c 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
@@ -38,7 +38,7 @@ namespace dbaui
 {
 //.
 
-   
//
+//
 //= OSpreadSheetConnectionPageSetup
 //
 class OSpreadSheetConnectionPageSetup : public OConnectionTabPageSetup
@@ -259,7 +259,7 @@ namespace dbaui
 
 
 
-   
//
+//
 //= OAuthentificationPageSetup
 //
 class OAuthentificationPageSetup : public OGenericAdministrationPage
@@ -286,7 +286,7 @@ namespace dbaui
 
 
 
-   
//
+//
 //= OFinalDBPageSetup
 //
 class OFinalDBPageSetup : public OGenericAdministrationPage
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-03-22 Thread Julien Nabet
 vcl/source/gdi/outdev4.cxx |3 ---
 1 file changed, 3 deletions(-)

New commits:
commit 97edb75d08e35eb014037fa6a4f93eeb16e11271
Author: Julien Nabet 
Date:   Fri Mar 22 22:32:16 2013 +0100

coverity#440825 Logically dead code

The other one was in fact 440826

Change-Id: I0163892e651a8080873985d2c58eea97d65ff678

diff --git a/vcl/source/gdi/outdev4.cxx b/vcl/source/gdi/outdev4.cxx
index b891eb8..db6488c 100644
--- a/vcl/source/gdi/outdev4.cxx
+++ b/vcl/source/gdi/outdev4.cxx
@@ -432,9 +432,6 @@ void OutputDevice::ImplDrawComplexGradient( const 
Rectangle& rRect,
 nInc = (nMinRect < 800) ? 10 : 20;
 }
 
-if( !nInc )
-nInc = 1;
-
 nStepCount = nMinRect / nInc;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-03-22 Thread Julien Nabet
 vcl/source/gdi/outdev4.cxx |3 ---
 1 file changed, 3 deletions(-)

New commits:
commit d6a1071034300356d225f6c89b7c75b110bc20ca
Author: Julien Nabet 
Date:   Fri Mar 22 22:24:53 2013 +0100

coverity#440825 Logically dead code

Change-Id: If16f1815d7ce7638d51d62243ccea787f1043efb

diff --git a/vcl/source/gdi/outdev4.cxx b/vcl/source/gdi/outdev4.cxx
index fa4a667..b891eb8 100644
--- a/vcl/source/gdi/outdev4.cxx
+++ b/vcl/source/gdi/outdev4.cxx
@@ -225,9 +225,6 @@ void OutputDevice::ImplDrawLinearGradient( const Rectangle& 
rRect,
 nInc = (nMinRect < 800) ? 10 : 20;
 }
 
-if ( !nInc )
-nInc = 1;
-
 nStepCount = nMinRect / nInc;
 }
 // minimal drei Schritte und maximal die Anzahl der Farbunterschiede
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-03-22 Thread Julien Nabet
 sfx2/source/control/sorgitm.cxx |9 ++---
 1 file changed, 2 insertions(+), 7 deletions(-)

New commits:
commit c4c8bf85d25def82b9aba783461010e6ad9ab06c
Author: Julien Nabet 
Date:   Fri Mar 22 22:17:56 2013 +0100

coverity#440784 Logically dead code + cleanup

Change-Id: Ib620de7cf05d0c84efd933a141f3ab0a6c1c2fd5

diff --git a/sfx2/source/control/sorgitm.cxx b/sfx2/source/control/sorgitm.cxx
index fcdc7d7..ed2e628 100644
--- a/sfx2/source/control/sorgitm.cxx
+++ b/sfx2/source/control/sorgitm.cxx
@@ -70,14 +70,11 @@ int SfxScriptOrganizerItem::operator==( const SfxPoolItem& 
rItem) const
 bool SfxScriptOrganizerItem::QueryValue( com::sun::star::uno::Any& rVal, 
sal_uInt8 nMemberId ) const
 {
 String aValue;
-sal_Bool bIsString = sal_False;
-sal_Bool bValue = sal_False;
 nMemberId &= ~CONVERT_TWIPS;
 switch ( nMemberId )
 {
 case 0:
 case MID_SCRIPT_ORGANIZER_LANGUAGE:
-bIsString = sal_True;
 aValue = aLanguage;
 break;
 default:
@@ -85,10 +82,8 @@ bool SfxScriptOrganizerItem::QueryValue( 
com::sun::star::uno::Any& rVal, sal_uIn
return false;
  }
 
-if ( bIsString )
-rVal <<= ::rtl::OUString( aValue );
-else
-rVal <<= bValue;
+rVal <<= ::rtl::OUString( aValue );
+
 return true;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


About coverity 440107 (keyimpl.cxx in registry)

2013-03-22 Thread julien2412
Hello,

Scan coverity reported this:
dead_error_begin: Execution cannot reach this statement "case 5:"
dead_error_begin: Execution cannot reach this statement "case 6:"
dead_error_begin: Execution cannot reach this statement "case 7:"

See
http://opengrok.libreoffice.org/xref/core/registry/source/keyimpl.cxx#604

Indeed we have this switch:
622 switch (valueType)
623 {
624 case RG_VALUETYPE_NOT_DEFINED:
625 memcpy(value, pBuffer, valueSize);
626 break;
627 case RG_VALUETYPE_LONG:
628 readINT32(pBuffer, *((sal_Int32*)value));
629 break;
630 case RG_VALUETYPE_STRING:
631 readUtf8(pBuffer, (sal_Char*)value, valueSize);
632 break;
633 case RG_VALUETYPE_UNICODE:
634 readString(pBuffer, (sal_Unicode*)value, valueSize);
635 break;
636 case RG_VALUETYPE_BINARY:
637 memcpy(value, pBuffer, valueSize);
638 break;
639 case RG_VALUETYPE_LONGLIST:
640 case RG_VALUETYPE_STRINGLIST:
641 case RG_VALUETYPE_UNICODELIST:
642 memcpy(value, pBuffer, valueSize);
643 break;
644 }

but some lines above:
604 if (valueType > 4)
605 {
606 return REG_INVALID_VALUE;
607 }

I took a look, it's like this since initial import in 2000.
Should if (valueType > 4) be removed or should we clean the >4 cases ?

Julien



--
View this message in context: 
http://nabble.documentfoundation.org/About-coverity-440107-keyimpl-cxx-in-registry-tp4045470.html
Sent from the Dev mailing list archive at Nabble.com.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: 3 commits - configure.ac libxml2/libxml2-android.patch sal/osl

2013-03-22 Thread Tor Lillqvist
 configure.ac  |  124 ++
 libxml2/libxml2-android.patch |   12 
 sal/osl/all/log.cxx   |6 ++
 3 files changed, 107 insertions(+), 35 deletions(-)

New commits:
commit 56220fb1304e68edea72f31b5d5a6194b703b87d
Author: Tor Lillqvist 
Date:   Fri Mar 22 22:31:33 2013 +0200

WaE: unused functions

Change-Id: I3014f75e9f5969902c5bb6cecad9286841e158e6

diff --git a/sal/osl/all/log.cxx b/sal/osl/all/log.cxx
index baedeb8..ad81c83 100644
--- a/sal/osl/all/log.cxx
+++ b/sal/osl/all/log.cxx
@@ -79,6 +79,8 @@ bool equalStrings(
 return length1 == length2 && std::memcmp(string1, string2, length1) == 0;
 }
 
+#ifndef ANDROID
+
 char const * toString(sal_detail_LogLevel level) {
 switch (level) {
 default:
@@ -93,6 +95,8 @@ char const * toString(sal_detail_LogLevel level) {
 }
 }
 
+#endif
+
 // getenv is not thread safe, so minimize use of result; except on Android and
 // iOS, see 60628799633ffde502cb105b98d3f254f93115aa "Notice if SAL_LOG is
 // changed while the process is running":
@@ -123,6 +127,7 @@ char const * getEnvironmentVariable() {
 
 #endif
 
+#ifndef ANDROID
 #if HAVE_SYSLOG_H
 int toSyslogPriority(sal_detail_LogLevel level) {
 switch (level) {
@@ -138,6 +143,7 @@ int toSyslogPriority(sal_detail_LogLevel level) {
 }
 }
 #endif
+#endif
 
 bool report(sal_detail_LogLevel level, char const * area) {
 if (level == SAL_DETAIL_LOG_LEVEL_DEBUG)
commit 6a17d2f2ba7acfec277314b97b50e41532d6b44d
Author: Tor Lillqvist 
Date:   Fri Mar 22 22:00:37 2013 +0200

No nan() in Clang for Android, it seems

Change-Id: I73fb37de0e4eeefdb08a6da48947afa1fdf02a38

diff --git a/libxml2/libxml2-android.patch b/libxml2/libxml2-android.patch
index cbc9ff4..06d5e57 100644
--- a/libxml2/libxml2-android.patch
+++ b/libxml2/libxml2-android.patch
@@ -13,3 +13,15 @@
# Parse the version information argument.
save_ifs="$IFS"; IFS=':'
set dummy $vinfo 0 0 0
+--- misc/libxml2-2.7.6/trionan.c
 misc/build/libxml2-2.7.6/trionan.c
+@@ -327,7 +327,7 @@
+ 
+   if (result == 0.0) {
+ 
+-#if defined(TRIO_COMPILER_SUPPORTS_C99)
++#if defined(TRIO_COMPILER_SUPPORTS_C99) && !(defined(__ANDROID__) && 
defined(__clang__))
+ result = nan("");
+ 
+ #elif defined(NAN) && defined(__STDC_IEC_559__)
+
commit 27a9a0d167abfe77ed955df0daf5a0b285d49110
Author: Tor Lillqvist 
Date:   Fri Mar 22 21:59:40 2013 +0200

Start on supporting also the Clang tool-chain in the Android NDK

Not everything compiles yet. As normal whenever trying to build LibreOffice
with some new tool-chain, it's the C++/UNO bridge that is most fun. The NDK
Clang tool-chain doesn't define _Unwind_Exception.

Change-Id: If828f4f5b5788a4abede1aaca0844bf37e97a701

diff --git a/configure.ac b/configure.ac
index 7aaacba..b9b11f6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -128,7 +128,9 @@ if test -z "$SED"; then
 fi
 
 dnl ===
-dnl When building for Android the --with-android-ndk is mandatory
+dnl When building for Android, --with-android-ndk,
+dnl --with-android-ndk-toolchain-version and --with-android-sdk are
+dnl mandatory
 dnl ===
 
 AC_ARG_WITH(android-ndk,
@@ -153,6 +155,11 @@ if test -n "$with_android_ndk"; then
 
 # Set up a lot of pre-canned defaults
 
+if test ! -f $ANDROID_NDK_HOME/RELEASE.TXT; then
+AC_MSG_ERROR([Unrecognized Android NDK. Only r8* versions supported.])
+fi
+ANDROID_NDK_VERSION=`cut -f1 -d' ' <$ANDROID_NDK_HOME/RELEASE.TXT`
+
 if test $host_cpu = arm; then
 android_cpu=arm
 elif test $host_cpu = mips; then
@@ -163,6 +170,24 @@ if test -n "$with_android_ndk"; then
 android_cpu=x86
 fi
 
+case "$with_android_ndk_toolchain_version" in
+4.6|4.7)
+
ANDROID_BINUTILS_DIR=$ANDROID_NDK_HOME/toolchains/$android_cpu-linux-androideabi-$with_android_ndk_toolchain_version
+ANDROID_COMPILER_DIR=$ANDROID_BINUTILS_DIR
+;;
+clang3.1|clang3.2)
+
ANDROID_BINUTILS_DIR=$ANDROID_NDK_HOME/toolchains/$android_cpu-linux-androideabi-4.6
+
ANDROID_COMPILER_DIR=$ANDROID_NDK_HOME/toolchains/llvm-${with_android_ndk_toolchain_version#clang}
+ANDROID_USING_CLANG=true
+;;
+esac
+
+if test ! -d $ANDROID_BINUTILS_DIR; then
+AC_MSG_ERROR([No directory $ANDROID_BINUTILS_DIR])
+elif test $ANDROID_COMPILER_DIR != $ANDROID_BINUTILS_DIR -a ! -d 
$ANDROID_COMPILER_DIR; then
+AC_MSG_ERROR([No directory $ANDROID_COMPILER_DIR])
+fi
+
 # Check if there is a 64-bit tool-chain. Google provides a NDK with 64-bit 
tool-chain binaries in
 # NDK r8e, and for earlier NDKs it was possible to build one yourself. 
Using a 64-bit linker is
 # required if you compile large parts of the code with -g. A 32-bit linker 
just won't manage to
@@ -172,58 +197,62 

[Libreoffice-commits] core.git: vcl/aqua

2013-03-22 Thread Julien Nabet
 vcl/aqua/source/dtrans/DataFlavorMapping.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 334d7e742ce60a9f5ea80d8dd9b5cfc3e129e900
Author: Julien Nabet 
Date:   Fri Mar 22 21:47:52 2013 +0100

blind try to fix MacOs building

Change-Id: Ia6dac95a754c61a8f98120af1a703bd27d3be95c

diff --git a/vcl/aqua/source/dtrans/DataFlavorMapping.cxx 
b/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
index 6cfc2c9..9de4038 100644
--- a/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
+++ b/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
@@ -526,7 +526,7 @@ NSString* DataFlavorMapper::openOfficeToSystemFlavor(const 
DataFlavor& oOOFlavor
 
   for (size_t i = 0; i < SIZE_FLAVOR_MAP; i++)
 {
-  if (oOOFlavor.MimeType.startsWith(flavorMap[i].OOoFlavor))
+  if 
(oOOFlavor.MimeType.startsWith(OUString::createFromAscii(flavorMap[i].OOoFlavor)))
 {
   sysFlavor = flavorMap[i].SystemFlavor;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/formula-core-rework' - sc/source

2013-03-22 Thread Kohei Yoshida
 sc/source/core/tool/detfunc.cxx |   75 +++-
 1 file changed, 37 insertions(+), 38 deletions(-)

New commits:
commit 44089c1342cbe124d80b7d1817809555788d9cfd
Author: Kohei Yoshida 
Date:   Fri Mar 22 16:44:10 2013 -0400

More on ScCellIterator conversion... More to come.

Change-Id: I7b80e8418e8f5ea4ea64f4f05c3709aaf8606bad

diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx
index 57981ec..280658e 100644
--- a/sc/source/core/tool/detfunc.cxx
+++ b/sc/source/core/tool/detfunc.cxx
@@ -299,17 +299,16 @@ sal_Bool ScDetectiveFunc::HasError( const ScRange& 
rRange, ScAddress& rErrPos )
 rErrPos = rRange.aStart;
 sal_uInt16 nError = 0;
 
-ScCellIterator aCellIter( pDoc, rRange);
-ScBaseCell* pCell = aCellIter.GetFirst();
-while (pCell)
+ScCellIterator aIter( pDoc, rRange);
+for (bool bHasCell = aIter.first(); bHasCell; bHasCell = aIter.next())
 {
-if (pCell->GetCellType() == CELLTYPE_FORMULA)
-{
-nError = ((ScFormulaCell*)pCell)->GetErrCode();
-if (nError)
-rErrPos = aCellIter.GetPos();
-}
-pCell = aCellIter.GetNext();
+const ScCellValue& rVal = aIter.get();
+if (rVal.meType != CELLTYPE_FORMULA)
+continue;
+
+nError = rVal.mpFormula->GetErrCode();
+if (nError)
+rErrPos = aIter.GetPos();
 }
 
 return (nError != 0);
@@ -792,27 +791,29 @@ sal_uInt16 ScDetectiveFunc::InsertPredLevelArea( const 
ScRange& rRef,
 {
 sal_uInt16 nResult = DET_INS_EMPTY;
 
-ScCellIterator aCellIter( pDoc, rRef);
-ScBaseCell* pCell = aCellIter.GetFirst();
-while (pCell)
+ScCellIterator aIter( pDoc, rRef);
+for (bool bHasCell = aIter.first(); bHasCell; bHasCell = aIter.next())
 {
-if (pCell->GetCellType() == CELLTYPE_FORMULA)
-switch( InsertPredLevel( aCellIter.GetPos().Col(), 
aCellIter.GetPos().Row(), rData, nLevel ) )
-{
-case DET_INS_INSERTED:
-nResult = DET_INS_INSERTED;
-break;
-case DET_INS_CONTINUE:
-if (nResult != DET_INS_INSERTED)
-nResult = DET_INS_CONTINUE;
-break;
-case DET_INS_CIRCULAR:
-if (nResult == DET_INS_EMPTY)
-nResult = DET_INS_CIRCULAR;
-break;
-}
+if (aIter.get().meType != CELLTYPE_FORMULA)
+continue;
 
-pCell = aCellIter.GetNext();
+const ScAddress& rPos = aIter.GetPos();
+switch (InsertPredLevel(rPos.Col(), rPos.Row(), rData, nLevel))
+{
+case DET_INS_INSERTED:
+nResult = DET_INS_INSERTED;
+break;
+case DET_INS_CONTINUE:
+if (nResult != DET_INS_INSERTED)
+nResult = DET_INS_CONTINUE;
+break;
+case DET_INS_CIRCULAR:
+if (nResult == DET_INS_EMPTY)
+nResult = DET_INS_CIRCULAR;
+break;
+default:
+;
+}
 }
 
 return nResult;
@@ -893,16 +894,14 @@ sal_uInt16 ScDetectiveFunc::FindPredLevelArea( const 
ScRange& rRef,
 sal_uInt16 nResult = nLevel;
 
 ScCellIterator aCellIter( pDoc, rRef);
-ScBaseCell* pCell = aCellIter.GetFirst();
-while (pCell)
+for (bool bHasCell = aCellIter.first(); bHasCell; bHasCell = 
aCellIter.next())
 {
-if (pCell->GetCellType() == CELLTYPE_FORMULA)
-{
-sal_uInt16 nTemp = FindPredLevel( aCellIter.GetPos().Col(), 
aCellIter.GetPos().Row(), nLevel, nDeleteLevel );
-if (nTemp > nResult)
-nResult = nTemp;
-}
-pCell = aCellIter.GetNext();
+if (aCellIter.get().meType != CELLTYPE_FORMULA)
+continue;
+
+sal_uInt16 nTemp = FindPredLevel(aCellIter.GetPos().Col(), 
aCellIter.GetPos().Row(), nLevel, nDeleteLevel);
+if (nTemp > nResult)
+nResult = nTemp;
 }
 
 return nResult;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Build error - testFdo60915

2013-03-22 Thread Eike Rathke
Hi Marcos,

On Friday, 2013-03-22 17:01:12 -0300, Marcos Souza wrote:

> AHuahUAHauhAUAHU
> 
> Brazil makes me laught in LO too T.T

Glad you had a good laugh ;-)

> Yes this is my timezone

Ok, could you please tell me which ICU library version you use

* the internally provided 49.1.1, ./config_host.mk contains
  SYSTEM_ICU=NO in this case
* a system one, which version? ./config_host.mk contains SYSTEM_ICU=YES
  in this case

The version numbers are in ./config_host.mk variables ICU_MAJOR,
ICU_MINOR and ICU_MICRO

  Eike

-- 
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
New GnuPG key 0x65632D3A : 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A
Old GnuPG key 0x293C05FD : 997A 4C60 CE41 0149 0DB3  9E96 2F1A D073 293C 05FD
Support the FSFE, care about Free Software! https://fsfe.org/support/?erack


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


[PATCH] fdo#62591 - change Impress remote slide previews building

2013-03-22 Thread Artur Dryomov (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/2917

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/17/2917/1

fdo#62591 - change Impress remote slide previews building

* Store bitmaps directly instead of byte arrays.
* Store bitmaps with shadows instead of one set with shadows and another
  without them.

This change should optimize memory usage a bit.

Change-Id: Ied7ce57a660438a06167e8984d16a6f26ebd8c23
---
M android/sdremote/src/org/libreoffice/impressremote/PresentationFragment.java
M 
android/sdremote/src/org/libreoffice/impressremote/communication/SlideShow.java
2 files changed, 26 insertions(+), 44 deletions(-)



diff --git 
a/android/sdremote/src/org/libreoffice/impressremote/PresentationFragment.java 
b/android/sdremote/src/org/libreoffice/impressremote/PresentationFragment.java
index 0aab5a6..8f1ba7d 100644
--- 
a/android/sdremote/src/org/libreoffice/impressremote/PresentationFragment.java
+++ 
b/android/sdremote/src/org/libreoffice/impressremote/PresentationFragment.java
@@ -21,10 +21,7 @@
 import android.content.ServiceConnection;
 import android.content.res.Configuration;
 import android.graphics.Bitmap;
-import android.graphics.Canvas;
 import android.graphics.Color;
-import android.graphics.Paint;
-import android.graphics.RectF;
 import android.os.Bundle;
 import android.os.IBinder;
 import android.support.v4.content.LocalBroadcastManager;
@@ -38,7 +35,6 @@
 import android.widget.AdapterView.OnItemSelectedListener;
 import android.widget.ImageView;
 import android.widget.TextView;
-
 import com.actionbarsherlock.app.SherlockFragment;
 
 public class PresentationFragment extends SherlockFragment {
@@ -306,24 +302,7 @@
 
 @Override
 protected Bitmap createBitmap(int position) {
-Bitmap aBitmap = mSlideShow.getImage(position);
-final int borderWidth = 8;
-
-Paint p = new Paint(Paint.ANTI_ALIAS_FLAG);
-p.setShadowLayer(borderWidth, 0, 0, Color.BLACK);
-
-RectF aRect = new RectF(borderWidth, borderWidth, borderWidth
-+ aBitmap.getWidth(), borderWidth
-+ aBitmap.getHeight());
-Bitmap aOut = Bitmap.createBitmap(aBitmap.getWidth() + 2
-* borderWidth, aBitmap.getHeight() + 2
-* borderWidth, aBitmap.getConfig());
-Canvas canvas = new Canvas(aOut);
-canvas.drawColor(getResources().getColor(R.color.light_grey));
-canvas.drawRect(aRect, p);
-canvas.drawBitmap(aBitmap, null, aRect, null);
-
-return aOut;
+return mSlideShow.getImage(position);
 }
 }
 }
diff --git 
a/android/sdremote/src/org/libreoffice/impressremote/communication/SlideShow.java
 
b/android/sdremote/src/org/libreoffice/impressremote/communication/SlideShow.java
index 3925fe2..8b7a8e1 100644
--- 
a/android/sdremote/src/org/libreoffice/impressremote/communication/SlideShow.java
+++ 
b/android/sdremote/src/org/libreoffice/impressremote/communication/SlideShow.java
@@ -9,17 +9,20 @@
 package org.libreoffice.impressremote.communication;
 
 import org.libreoffice.impressremote.R;
-import org.libreoffice.impressremote.Globals;
 
-import android.util.Log;
 import android.content.Context;
 import android.graphics.Bitmap;
 import android.graphics.BitmapFactory;
+import android.graphics.Canvas;
+import android.graphics.Color;
+import android.graphics.Paint;
+import android.graphics.RectF;
 import android.util.SparseArray;
+
 
 public class SlideShow {
 
-private SparseArray mPreviewImages = new SparseArray();
+private SparseArray mPreviews = new SparseArray();
 private SparseArray mNotes = new SparseArray();
 
 private int mSize = 0;
@@ -47,28 +50,28 @@
 }
 
 protected void putImage(int aSlide, byte[] aImage) {
-mPreviewImages.put(aSlide, aImage);
+Bitmap aBitmap = BitmapFactory.decodeByteArray(aImage, 0, 
aImage.length);
+final int borderWidth = 8;
+
+Paint p = new Paint(Paint.ANTI_ALIAS_FLAG);
+p.setShadowLayer(borderWidth, 0, 0, Color.BLACK);
+
+RectF aRect = new RectF(borderWidth, borderWidth, borderWidth
++ aBitmap.getWidth(), borderWidth
++ aBitmap.getHeight());
+Bitmap aOut = Bitmap.createBitmap(aBitmap.getWidth() + 2
+* borderWidth, aBitmap.getHeight() + 2
+* borderWidth, aBitmap.getConfig());
+Canvas canvas = new Canvas(aOut);
+canvas.drawColor(mContext.getResources().getColor(R.color.light_grey));
+canvas.drawRect(aRect, p);
+canvas.drawBitmap(aBitmap, null, aRect, null);
+
+mPreviews.put(aSlide, aOut);
 }
 
 public Bitmap getImage(int aSlide) {
-byte[] aImage = mPreviewImages.get(aSlide);
-if (aImage == null) {
-return BitmapFactory.decod

Re: Build error - testFdo60915

2013-03-22 Thread Marcos Souza
AHuahUAHauhAUAHU

Brazil makes me laught in LO too T.T

Yes this is my timezone


2013/3/22 Eike Rathke 

> Hi Marcos,
>
> On Friday, 2013-03-22 14:34:45 -0300, Marcos Souza wrote:
>
> > [build CXX] svx/source/unodraw/unopool.cxx
> > svl.cxx:321:Assertion
> > Test name: (anonymous namespace)::Test::testFdo60915
> > equality assertion failed
> > - Expected: 18/05/2446
> > - Actual  : 17/05/2446
>
> Let me guess, your environment is in timezone TZ=America/Sao_Paulo and
> a victim of https://bugs.freedesktop.org/show_bug.cgi?id=44286 ? Or
> something similar related..
>
> Anyhow, please try this patch
>
> http://cgit.freedesktop.org/libreoffice/core/commit/?id=70f1f6cd90d8e9a571959c41f88c9ae376846d0f
>
>   Eike
>
> --
> LibreOffice Calc developer. Number formatter stricken i18n
> transpositionizer.
> New GnuPG key 0x65632D3A : 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563
> 2D3A
> Old GnuPG key 0x293C05FD : 997A 4C60 CE41 0149 0DB3  9E96 2F1A D073 293C
> 05FD
> Support the FSFE, care about Free Software!
> https://fsfe.org/support/?erack
>



-- 
Att,

Marcos Paulo de Souza
Acadêmico de Ciencia da Computação - FURB - SC
Github: https://github.com/marcosps/
"Uma vida sem desafios é uma vida sem razão"
"A life without challenges, is a non reason life"
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Build error - testFdo60915

2013-03-22 Thread Eike Rathke
Hi Marcos,

On Friday, 2013-03-22 14:34:45 -0300, Marcos Souza wrote:

> [build CXX] svx/source/unodraw/unopool.cxx
> svl.cxx:321:Assertion
> Test name: (anonymous namespace)::Test::testFdo60915
> equality assertion failed
> - Expected: 18/05/2446
> - Actual  : 17/05/2446

Let me guess, your environment is in timezone TZ=America/Sao_Paulo and
a victim of https://bugs.freedesktop.org/show_bug.cgi?id=44286 ? Or
something similar related..

Anyhow, please try this patch
http://cgit.freedesktop.org/libreoffice/core/commit/?id=70f1f6cd90d8e9a571959c41f88c9ae376846d0f

  Eike

-- 
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
New GnuPG key 0x65632D3A : 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A
Old GnuPG key 0x293C05FD : 997A 4C60 CE41 0149 0DB3  9E96 2F1A D073 293C 05FD
Support the FSFE, care about Free Software! https://fsfe.org/support/?erack


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


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

2013-03-22 Thread Eike Rathke
 svl/qa/unit/svl.cxx |   18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

New commits:
commit 70f1f6cd90d8e9a571959c41f88c9ae376846d0f
Author: Eike Rathke 
Date:   Fri Mar 22 20:52:17 2013 +0100

chose date that does not suffer from historic time zone bug

When building in a time zone that suffers from the historical time zone
bug https://bugs.freedesktop.org/show_bug.cgi?id=44286 e.g.
TZ=America/Sao_Paulo the build failed. Chose a recent enough test date
to circumvent.

Change-Id: Iad6c99f6a0a656546924c94edd39aca92d92d47d

diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx
index 26a0b8d..0b481b8 100644
--- a/svl/qa/unit/svl.cxx
+++ b/svl/qa/unit/svl.cxx
@@ -325,25 +325,25 @@ void Test::testFdo60915()
 {
 LanguageType eLang = LANGUAGE_THAI;
 OUString sCode, sExpected;
-double fPreviewNumber = 1234; // equals 18/05/1903 (2446 B.E.)
+double fPreviewNumber = 36486; // equals 1999-11-22 (2542 B.E.)
 SvNumberFormatter aFormatter(m_xContext, eLang);
 {
 sCode = "[~buddhist]D/MM/";
-sExpected = "18/05/2446";
+sExpected = "22/11/2542";
 checkPreviewString(aFormatter, sCode, fPreviewNumber, eLang, 
sExpected);
 }
 {
 sCode = "[~buddhist]D/MM/YY";
-sExpected = "18/05/46";
+sExpected = "22/11/42";
 checkPreviewString(aFormatter, sCode, fPreviewNumber, eLang, 
sExpected);
 }
 {
 sCode = "[NatNum1][$-41E][~buddhist]D/MM/";
 sal_Unicode sTemp[] =
 {
-0x0E51, 0x0E58, 0x002F,
-0x0E50, 0x0E55, 0x002F,
-0x0E52, 0x0E54, 0x0E54, 0x0E56
+0x0E52, 0x0E52, 0x002F,
+0x0E51, 0x0E51, 0x002F,
+0x0E52, 0x0E55, 0x0E54, 0x0E52
 };
 sExpected = OUString(sTemp, SAL_N_ELEMENTS(sTemp));
 checkPreviewString(aFormatter, sCode, fPreviewNumber, eLang, 
sExpected);
@@ -352,9 +352,9 @@ void Test::testFdo60915()
 sCode = "[NatNum1][$-41E][~buddhist]D/MM/YY";
 sal_Unicode sTemp[] =
 {
-0x0E51, 0x0E58, 0x002F,
-0x0E50, 0x0E55, 0x002F,
-0x0E54, 0x0E56
+0x0E52, 0x0E52, 0x002F,
+0x0E51, 0x0E51, 0x002F,
+0x0E54, 0x0E52
 };
 sExpected = OUString(sTemp, SAL_N_ELEMENTS(sTemp));
 checkPreviewString(aFormatter, sCode, fPreviewNumber, eLang, 
sExpected);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-03-22 Thread Radek Doulik
 cppcanvas/source/inc/implrenderer.hxx|8 ++
 cppcanvas/source/mtfrenderer/emfplus.cxx |   85 ++-
 2 files changed, 67 insertions(+), 26 deletions(-)

New commits:
commit 8b1eac4a14e38913b8b33c0aeb98ea702589
Author: Radek Doulik 
Date:   Fri Mar 22 20:54:03 2013 +0100

implemented BeginContainerNoParams and EndContainer records

 - plus a bit of refactoring to reuse code

Change-Id: I416d2c47800752a27e2dc79f9b55b096e641062f

diff --git a/cppcanvas/source/inc/implrenderer.hxx 
b/cppcanvas/source/inc/implrenderer.hxx
index 4537368..addcdc2 100644
--- a/cppcanvas/source/inc/implrenderer.hxx
+++ b/cppcanvas/source/inc/implrenderer.hxx
@@ -174,6 +174,8 @@ static float GetSwapFloat( SvStream& rSt )
 OutDevState aDevState;
 } EmfPlusGraphicState;
 
+typedef ::std::map GraphicStateMap;
+
 class ImplRenderer : public virtual Renderer, protected 
CanvasGraphicHelper
 {
 public:
@@ -215,6 +217,8 @@ static float GetSwapFloat( SvStream& rSt )
 void MapToDevice (double &x, double &y);
 ::basegfx::B2DPoint Map (double ix, double iy);
 ::basegfx::B2DSize MapSize (double iwidth, double iheight);
+void GraphicStatePush (GraphicStateMap& map, sal_Int32 index, 
OutDevState& rState);
+void GraphicStatePop (GraphicStateMap& map, sal_Int32 index, 
OutDevState& rState);
 
 private:
 // default: disabled copy/assignment
@@ -300,8 +304,8 @@ static float GetSwapFloat( SvStream& rSt )
 sal_uInt16  mMFlags;
 SvMemoryStream  mMStream;
 /* emf+ graphic state stack */
-::std::map mGSStack;
-typedef ::std::map::iterator EPGSSIter;
+GraphicStateMap mGSStack;
+GraphicStateMap mGSContainerStack;
 };
 
 
diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx 
b/cppcanvas/source/mtfrenderer/emfplus.cxx
index 8989113..5cf3264 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -69,6 +69,8 @@
 #define EmfPlusRecordTypeSetCompositingQuality 16420
 #define EmfPlusRecordTypeSave 16421
 #define EmfPlusRecordTypeRestore 16422
+#define EmfPlusRecordTypeBeginContainerNoParams 16424
+#define EmfPlusRecordTypeEndContainer 16425
 #define EmfPlusRecordTypeSetWorldTransform 16426
 #define EmfPlusRecordTypeResetWorldTransform 16427
 #define EmfPlusRecordTypeMultiplyWorldTransform 16428
@@ -1221,6 +1223,43 @@ namespace cppcanvas
 return cellSize;
 }
 
+void ImplRenderer::GraphicStatePush(GraphicStateMap& map, sal_Int32 
index, OutDevState& rState)
+{
+GraphicStateMap::iterator iter = map.find( index );
+
+if ( iter != map.end() )
+{
+EmfPlusGraphicState state = iter->second;
+map.erase( iter );
+
+EMFP_DEBUG (printf ("stack index: %d found and erased\n", 
index));
+}
+
+EmfPlusGraphicState state;
+
+state.aWorldTransform = aWorldTransform;
+state.aDevState = rState;
+
+map[ index ] = state;
+}
+
+void ImplRenderer::GraphicStatePop(GraphicStateMap& map, sal_Int32 
index, OutDevState& rState)
+{
+GraphicStateMap::iterator iter = map.find( index );
+
+if ( iter != map.end() )
+{
+EMFP_DEBUG (printf ("stack index: %d found\n", index));
+
+EmfPlusGraphicState state = iter->second;
+
+aWorldTransform = state.aWorldTransform;
+rState.clip = state.aDevState.clip;
+rState.clipRect = state.aDevState.clipRect;
+rState.xClipPoly = state.aDevState.xClipPoly;
+}
+}
+
 void ImplRenderer::processEMFPlus( MetaCommentAction* pAct, const 
ActionFactoryParameters& rFactoryParms,
OutDevState& rState, const 
CanvasSharedPtr& rCanvas )
 {
@@ -1677,46 +1716,44 @@ namespace cppcanvas
 
 EMFP_DEBUG (printf ("EMF+ Save stack index: %d\n", 
stackIndex));
 
-EPGSSIter aIter = mGSStack.find( stackIndex );
-
-if ( aIter != mGSStack.end() )
-{
-EmfPlusGraphicState aState = aIter->second;
-mGSStack.erase( aIter );
+GraphicStatePush( mGSStack, stackIndex, rState );
 
-EMFP_DEBUG (printf ("stack index: %d found and 
erased\n", stackIndex));
-}
+break;
+}
+case EmfPlusRecordTypeRestore:
+{
+sal_uInt32 stackIndex;
 
-EmfPlusGraphicState aState;
+rMF >> stackIndex;
 
-

[Libreoffice-commits] core.git: Branch 'feature/formula-core-rework' - sc/source

2013-03-22 Thread Kohei Yoshida
 sc/source/ui/docshell/dbdocfun.cxx |7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

New commits:
commit d9d50f166770edf6388d9bf8a22a7479f316bf04
Author: Kohei Yoshida 
Date:   Fri Mar 22 15:47:37 2013 -0400

ScDBDocFunc is now ScBaseCell-free.

Change-Id: I666886c737b118b30faff6c3763d40c1c4b7fca7

diff --git a/sc/source/ui/docshell/dbdocfun.cxx 
b/sc/source/ui/docshell/dbdocfun.cxx
index a73b238..6e91815 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -39,7 +39,6 @@
 #include "dpobject.hxx"
 #include "dpsave.hxx"
 #include "dociter.hxx"  // for lcl_EmptyExcept
-#include "cell.hxx" // for lcl_EmptyExcept
 #include "editable.hxx"
 #include "attrib.hxx"
 #include "drwlayer.hxx"
@@ -1179,15 +1178,13 @@ namespace {
 bool lcl_EmptyExcept( ScDocument* pDoc, const ScRange& rRange, const ScRange& 
rExcept )
 {
 ScCellIterator aIter( pDoc, rRange );
-ScBaseCell* pCell = aIter.GetFirst();
-while (pCell)
+for (bool bHasCell = aIter.first(); bHasCell; bHasCell = aIter.next())
 {
-if ( !pCell->IsBlank() )  // real content?
+if (!aIter.get().isEmpty())  // real content?
 {
 if (!rExcept.In(aIter.GetPos()))
 return false;   // cell found
 }
-pCell = aIter.GetNext();
 }
 
 return true;// nothing found - empty
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/formula-core-rework' - 2 commits - sc/inc sc/source

2013-03-22 Thread Kohei Yoshida
 sc/inc/cellvalue.hxx  |8 ++
 sc/inc/global.hxx |1 
 sc/source/core/data/autonamecache.cxx |   29 ---
 sc/source/core/data/cellvalue.cxx |  116 +
 sc/source/core/tool/compiler.cxx  |2 
 sc/source/core/tool/interpr4.cxx  |1 
 sc/source/ui/unoobj/cellsuno.cxx  |  132 +++---
 sc/source/ui/unoobj/chart2uno.cxx |1 
 8 files changed, 199 insertions(+), 91 deletions(-)

New commits:
commit 3f490b0dcfae65ff588b67936490f9f7a795b005
Author: Kohei Yoshida 
Date:   Fri Mar 22 15:36:57 2013 -0400

Start switching ScCellIterator caller to alternative iteration method.

Change-Id: I8b39adaaff3874e26709579530fb74b2bf0543be

diff --git a/sc/inc/cellvalue.hxx b/sc/inc/cellvalue.hxx
index ac96274..16af46f 100644
--- a/sc/inc/cellvalue.hxx
+++ b/sc/inc/cellvalue.hxx
@@ -49,6 +49,14 @@ struct ScCellValue
  * Set cell value at specified position in specified document.
  */
 void commit( ScDocument& rDoc, const ScAddress& rPos );
+
+bool hasString() const;
+
+bool hasNumeric() const;
+
+bool isEmpty() const;
+
+bool equalsWithoutFormat( const ScCellValue& r ) const;
 };
 
 // TODO: temporary workaround.  To be removed later.
diff --git a/sc/source/core/data/autonamecache.cxx 
b/sc/source/core/data/autonamecache.cxx
index 8a79864..2bbc4b2 100644
--- a/sc/source/core/data/autonamecache.cxx
+++ b/sc/source/core/data/autonamecache.cxx
@@ -21,10 +21,11 @@
 
 #include "autonamecache.hxx"
 #include "dociter.hxx"
-#include "cell.hxx"
 #include "queryparam.hxx"
-
-// ---
+#include "cell.hxx"
+#include "cellvalue.hxx"
+#include "editutil.hxx"
+#include "document.hxx"
 
 ScAutoNameCache::ScAutoNameCache( ScDocument* pD ) :
 pDoc( pD ),
@@ -52,25 +53,28 @@ const ScAutoNameAddresses& 
ScAutoNameCache::GetNameOccurrences( const String& rN
 ScAutoNameAddresses& rAddresses = aNames[rName];
 
 ScCellIterator aIter( pDoc, ScRange( 0, 0, nCurrentTab, MAXCOL, MAXROW, 
nCurrentTab ) );
-for ( ScBaseCell* pCell = aIter.GetFirst(); pCell; pCell = aIter.GetNext() 
)
+for (bool bHasCell = aIter.first(); bHasCell; bHasCell = aIter.next())
 {
 // don't check code length here, always use the stored result
 // (AutoCalc is disabled during CompileXML)
-
-if ( pCell->HasStringData() )
+const ScCellValue& rVal = aIter.get();
+if (rVal.hasString())
 {
-String aStr;
-CellType eType = pCell->GetCellType();
-switch ( eType )
+OUString aStr;
+switch (rVal.meType)
 {
 case CELLTYPE_STRING:
-aStr = ((ScStringCell*)pCell)->GetString();
+aStr = *rVal.mpString;
 break;
 case CELLTYPE_FORMULA:
-aStr = ((ScFormulaCell*)pCell)->GetString();
+aStr = rVal.mpFormula->GetString();
 break;
 case CELLTYPE_EDIT:
-aStr = ((ScEditCell*)pCell)->GetString();
+{
+ScFieldEditEngine& rEngine = pDoc->GetEditEngine();
+rEngine.SetText(*rVal.mpEditText);
+aStr = ScEditUtil::GetMultilineString(rEngine); // string 
with line separators between paragraphs
+}
 break;
 case CELLTYPE_NONE:
 case CELLTYPE_VALUE:
diff --git a/sc/source/core/data/cellvalue.cxx 
b/sc/source/core/data/cellvalue.cxx
index 6a51c68..3706278 100644
--- a/sc/source/core/data/cellvalue.cxx
+++ b/sc/source/core/data/cellvalue.cxx
@@ -12,6 +12,7 @@
 #include "cell.hxx"
 #include "editeng/editobj.hxx"
 #include "stringutil.hxx"
+#include "formula/token.hxx"
 
 ScCellValue::ScCellValue() : meType(CELLTYPE_NONE), mfValue(0.0) {}
 ScCellValue::ScCellValue( double fValue ) : meType(CELLTYPE_VALUE), 
mfValue(fValue) {}
@@ -113,6 +114,121 @@ void ScCellValue::commit( ScDocument& rDoc, const 
ScAddress& rPos )
 }
 }
 
+bool ScCellValue::hasString() const
+{
+switch (meType)
+{
+case CELLTYPE_STRING:
+case CELLTYPE_EDIT:
+return true;
+case CELLTYPE_FORMULA:
+return !mpFormula->IsValue();
+default:
+return false;
+}
+}
+
+bool ScCellValue::hasNumeric() const
+{
+switch (meType)
+{
+case CELLTYPE_VALUE:
+return true;
+case CELLTYPE_FORMULA:
+return mpFormula->IsValue();
+default:
+return false;
+}
+}
+
+bool ScCellValue::isEmpty() const
+{
+return meType == CELLTYPE_NOTE || meType == CELLTYPE_NONE;
+}
+
+namespace {
+
+CellType adjustCellType( CellType eOrig )
+{
+switch (eOrig)
+{
+case CELLTYPE_NOTE:
+return CELLTYPE_NONE;
+case CELLTYPE_EDIT:
+ 

[Libreoffice-commits] core.git: distro-configs/LibreOfficeAndroid.conf distro-configs/LibreOfficeAndroidX86.conf

2013-03-22 Thread Tor Lillqvist
 distro-configs/LibreOfficeAndroid.conf|1 -
 distro-configs/LibreOfficeAndroidX86.conf |1 -
 2 files changed, 2 deletions(-)

New commits:
commit 98d72730b7c6320341b52ed18ed765b72cf922c1
Author: Tor Lillqvist 
Date:   Fri Mar 22 21:22:28 2013 +0200

There is no --disable-ext-report-builder any more

Change-Id: I05d3958b56cc8dc18773049deb40d4d4929b0ba4

diff --git a/distro-configs/LibreOfficeAndroid.conf 
b/distro-configs/LibreOfficeAndroid.conf
index 35c1663..087d48d 100644
--- a/distro-configs/LibreOfficeAndroid.conf
+++ b/distro-configs/LibreOfficeAndroid.conf
@@ -2,7 +2,6 @@
 --disable-cairo-canvas
 --disable-cups
 --disable-ext-presenter-minimizer
---disable-ext-report-builder
 --disable-gconf
 --disable-gnome-vfs
 --disable-gstreamer-0-10
diff --git a/distro-configs/LibreOfficeAndroidX86.conf 
b/distro-configs/LibreOfficeAndroidX86.conf
index b4bcca5..a01ae0e 100644
--- a/distro-configs/LibreOfficeAndroidX86.conf
+++ b/distro-configs/LibreOfficeAndroidX86.conf
@@ -2,7 +2,6 @@
 --disable-cairo-canvas
 --disable-cups
 --disable-ext-presenter-minimizer
---disable-ext-report-builder
 --disable-gconf
 --disable-gnome-vfs
 --disable-gstreamer-0-10
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[PATCH] Clean up Impress remove client source code a bit.

2013-03-22 Thread Artur Dryomov (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/2915

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/15/2915/1

Clean up Impress remove client source code a bit.

* Remove unnecessary semicolons.
* Remove empty methods that only call super methods.
* Replace String concatenation with StringBuilder.
* Fix possible NullPointerException on String comparison.
* Remove TODO comments generated via IDE.

Change-Id: Id2d2ebd29386080715fd743f81fbfae3a4a0a5ce
---
M android/sdremote/src/org/libreoffice/impressremote/BlankScreenFragment.java
M android/sdremote/src/org/libreoffice/impressremote/PresentationActivity.java
M android/sdremote/src/org/libreoffice/impressremote/SelectorActivity.java
M android/sdremote/src/org/libreoffice/impressremote/SettingsActivity.java
M android/sdremote/src/org/libreoffice/impressremote/ThumbnailFragment.java
M android/sdremote/src/org/libreoffice/impressremote/communication/Client.java
M 
android/sdremote/src/org/libreoffice/impressremote/communication/CommunicationService.java
M android/sdremote/src/org/libreoffice/impressremote/communication/Receiver.java
M android/sdremote/src/org/libreoffice/impressremote/communication/Server.java
M 
android/sdremote/src/org/libreoffice/impressremote/communication/ServerFinder.java
10 files changed, 7 insertions(+), 27 deletions(-)



diff --git 
a/android/sdremote/src/org/libreoffice/impressremote/BlankScreenFragment.java 
b/android/sdremote/src/org/libreoffice/impressremote/BlankScreenFragment.java
index be82eeb..8f172e5 100644
--- 
a/android/sdremote/src/org/libreoffice/impressremote/BlankScreenFragment.java
+++ 
b/android/sdremote/src/org/libreoffice/impressremote/BlankScreenFragment.java
@@ -75,7 +75,6 @@
 aListener);
 v.findViewById(R.id.blankscreen_return).setOnClickListener(aListener);
 mCommunicationService.getTransmitter().blankScreen();
-// TODO Auto-generated method stub
 return v;
 }
 
diff --git 
a/android/sdremote/src/org/libreoffice/impressremote/PresentationActivity.java 
b/android/sdremote/src/org/libreoffice/impressremote/PresentationActivity.java
index d3a0352..51e590f 100644
--- 
a/android/sdremote/src/org/libreoffice/impressremote/PresentationActivity.java
+++ 
b/android/sdremote/src/org/libreoffice/impressremote/PresentationActivity.java
@@ -529,12 +529,6 @@
 mActionBarManager.hidePopups();
 return super.onInterceptTouchEvent(aEvent);
 }
-
-@Override
-public boolean onTouchEvent(MotionEvent aEvent) {
-return super.onTouchEvent(aEvent);
-}
-
 }
 
 private BroadcastReceiver mListener = new BroadcastReceiver() {
diff --git 
a/android/sdremote/src/org/libreoffice/impressremote/SelectorActivity.java 
b/android/sdremote/src/org/libreoffice/impressremote/SelectorActivity.java
index 1b8c044..3b0f684 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/SelectorActivity.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/SelectorActivity.java
@@ -171,7 +171,6 @@
 
 @Override
 protected void onPause() {
-// TODO Auto-generated method stub
 super.onPause();
 if (mCommunicationService != null) {
 mCommunicationService.stopSearching();
diff --git 
a/android/sdremote/src/org/libreoffice/impressremote/SettingsActivity.java 
b/android/sdremote/src/org/libreoffice/impressremote/SettingsActivity.java
index 56d5bad..471e96b 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/SettingsActivity.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/SettingsActivity.java
@@ -18,7 +18,6 @@
 // but build with sdk 15
 @Override
 protected void onCreate(Bundle savedInstanceState) {
-// TODO Auto-generated method stub
 super.onCreate(savedInstanceState);
 getSupportActionBar().setDisplayHomeAsUpEnabled(true);
 addPreferencesFromResource(R.xml.preferences);
diff --git 
a/android/sdremote/src/org/libreoffice/impressremote/ThumbnailFragment.java 
b/android/sdremote/src/org/libreoffice/impressremote/ThumbnailFragment.java
index d1f2487..c939973 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/ThumbnailFragment.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/ThumbnailFragment.java
@@ -82,17 +82,6 @@
 mCurrentText = null;
 }
 
-@Override
-public void onCreate(Bundle savedInstanceState) {
-super.onCreate(savedInstanceState);
-
-}
-
-@Override
-public void onPause() {
-super.onPause();
-}
-
 private void setSelected(int position) {
 formatUnselected(mCurrentImage, mCurrentText);
 
diff --git 
a/android/sdremote/src/org/libreoffice/impressremote/communication/Client.java 
b/android/sdremote/src/org/libreoffice/impressremote/communication/Client.java
index ce5e3ad..198b873 100644
--- 
a/android/sdremote/src/org/libreoffice/impressremote/comm

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

2013-03-22 Thread Julien Nabet
 idlc/source/astunion.cxx |6 --
 1 file changed, 6 deletions(-)

New commits:
commit 25363b4e4594c610c643cd1025119bb6188677d1
Author: Julien Nabet 
Date:   Fri Mar 22 19:53:41 2013 +0100

coverity#440066 Logically dead code

Change-Id: I54d1b22859bd4f0a1e68ce79ed2ce4d7fbeb5107

diff --git a/idlc/source/astunion.cxx b/idlc/source/astunion.cxx
index 20daa67..827dbbd 100644
--- a/idlc/source/astunion.cxx
+++ b/idlc/source/astunion.cxx
@@ -47,12 +47,6 @@ AstUnion::AstUnion(const ::rtl::OString& name, AstType* 
pDiscType, AstScope* pSc
 if ( pDiscType->getNodeType() == NT_predefined )
 {
 pBaseType = (AstBaseType*)pDiscType;
-if ( !pBaseType )
-{
-m_pDiscriminantType = NULL;
-m_discExprType = ET_none;
-return;
-}
 m_pDiscriminantType = pDiscType;
 switch (pBaseType->getExprType())
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-03-22 Thread Julien Nabet
 idlc/source/astconstant.cxx |3 ---
 1 file changed, 3 deletions(-)

New commits:
commit f25fcba2f2ef699e8366d3681ae6c636798569a8
Author: Julien Nabet 
Date:   Fri Mar 22 19:41:57 2013 +0100

coverity#440065 Logically dead code

Change-Id: I6b735ca48bd996c71ad6c6103e68af2cd2890d98

diff --git a/idlc/source/astconstant.cxx b/idlc/source/astconstant.cxx
index 2ba9d29..727a757 100644
--- a/idlc/source/astconstant.cxx
+++ b/idlc/source/astconstant.cxx
@@ -54,7 +54,6 @@ sal_Bool AstConstant::dumpBlob(
 typereg::Writer & rBlob, sal_uInt16 index, bool published)
 {
 RTConstValueaConst;
-sal_Unicode*str = NULL;
 
 AstExprValue *exprVal = getConstValue()->getExprValue();
 switch (getConstValueType())
@@ -119,8 +118,6 @@ sal_Bool AstConstant::dumpBlob(
 index, getDocumentation(), OUString(),
 RT_ACCESS_CONST | (published ? RT_ACCESS_PUBLISHED : 0),
 OStringToOUString(name, RTL_TEXTENCODING_UTF8), type, aConst);
-if (str)
-delete[] str;
 
 return sal_True;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: [PATCH] String::AppendAscii cleanup

2013-03-22 Thread Ricardo Montania
Hmm..

Yes, compiles fine.


On Fri, Mar 22, 2013 at 2:23 PM, Eike Rathke  wrote:

> Hi,
>
> On Friday, 2013-03-22 16:53:20 +, Ricardo Montania (via Code Review)
> wrote:
>
> hum.. did that
>
> > --- a/cui/source/dialogs/postdlg.cxx
> > +++ b/cui/source/dialogs/postdlg.cxx
> > -xub_StrLen nLen = aStr.Len();
> > +xub_StrLen nLen = aStr.getLength();
>
> compile? Note that OUString::getLength() returns saL_int32 while
> xub_StrLen is sal_uInt16.
>
>   Eike
>
> --
> LibreOffice Calc developer. Number formatter stricken i18n
> transpositionizer.
> New GnuPG key 0x65632D3A : 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563
> 2D3A
> Old GnuPG key 0x293C05FD : 997A 4C60 CE41 0149 0DB3  9E96 2F1A D073 293C
> 05FD
> Support the FSFE, care about Free Software!
> https://fsfe.org/support/?erack
>



-- 
Ricardo Montania Prado de Campos
http://www.linuxafundo.com.br
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'feature/formula-core-rework' - sc/inc sc/Library_sc.mk sc/source

2013-03-22 Thread Kohei Yoshida
 sc/Library_sc.mk  |3 
 sc/inc/cell.hxx   |   12 --
 sc/inc/dociter.hxx|8 +
 sc/inc/formulaiter.hxx|   45 ++
 sc/source/core/data/cell.cxx  |   57 -
 sc/source/core/data/dociter.cxx   |  107 +-
 sc/source/core/data/document.cxx  |1 
 sc/source/core/data/formulaiter.cxx   |   80 +++
 sc/source/core/tool/detfunc.cxx   |1 
 sc/source/ui/Accessibility/AccessibleCell.cxx |   36 +++-
 sc/source/ui/app/transobj.cxx |1 
 sc/source/ui/docshell/tablink.cxx |1 
 sc/source/ui/unoobj/cellsuno.cxx  |1 
 13 files changed, 262 insertions(+), 91 deletions(-)

New commits:
commit 3f7d64b512cc86748613a3acaebcd4c0384704e6
Author: Kohei Yoshida 
Date:   Fri Mar 22 14:21:25 2013 -0400

Use ScCellValue instead of ScBaseCell in ScCellIterator.

But of course such migration has to be done in gradual steps.  For now,
ScCellIterator supports both methods.

Change-Id: I40cd8969b05598fe20916e43a5537217e824d418

diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk
index 1935b7a..2ee7004 100644
--- a/sc/Library_sc.mk
+++ b/sc/Library_sc.mk
@@ -143,7 +143,8 @@ $(eval $(call gb_Library_add_exception_objects,sc,\
sc/source/core/data/drawpage \
sc/source/core/data/drwlayer \
sc/source/core/data/fillinfo \
-sc/source/core/data/funcdesc \
+   sc/source/core/data/formulaiter \
+   sc/source/core/data/funcdesc \
sc/source/core/data/global \
sc/source/core/data/global2 \
sc/source/core/data/globalx \
diff --git a/sc/inc/cell.hxx b/sc/inc/cell.hxx
index 4230272..0d34698 100644
--- a/sc/inc/cell.hxx
+++ b/sc/inc/cell.hxx
@@ -602,18 +602,6 @@ public:
 bool   InterpretFormulaGroup();
 };
 
-//  Iterator for references in a formula cell
-class ScDetectiveRefIter
-{
-private:
-ScTokenArray* pCode;
-ScAddress aPos;
-public:
-ScDetectiveRefIter( ScFormulaCell* pCell );
-boolGetNextRef( ScRange& rRange );
-ScToken*GetNextRefToken();
-};
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/dociter.hxx b/sc/inc/dociter.hxx
index c104a33..80f3738 100644
--- a/sc/inc/dociter.hxx
+++ b/sc/inc/dociter.hxx
@@ -24,6 +24,7 @@
 #include 
 #include "global.hxx"
 #include "scdllapi.h"
+#include "cellvalue.hxx"
 
 #include 
 
@@ -217,11 +218,13 @@ private:
 ScAddress maStartPos;
 ScAddress maEndPos;
 ScAddress maCurPos;
+ScCellValue maCurCell;
 SCSIZE  nColRow;
 boolbSubTotal;
 
 ScBaseCell* GetThis();
 void init();
+bool getCurrent();
 public:
 ScCellIterator(ScDocument* pDocument,
SCCOL nSCol, SCROW nSRow, SCTAB nSTab,
@@ -232,6 +235,11 @@ public:
 ScBaseCell* GetFirst();
 ScBaseCell* GetNext();
 const ScAddress& GetPos() const { return maCurPos; }
+
+bool first();
+bool next();
+
+const ScCellValue& get() const;
 };
 
 class ScQueryCellIterator   // walk through all non-empty cells in an 
area
diff --git a/sc/inc/formulaiter.hxx b/sc/inc/formulaiter.hxx
new file mode 100644
index 000..dbde7e1
--- /dev/null
+++ b/sc/inc/formulaiter.hxx
@@ -0,0 +1,45 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef SC_FORMULAITER_HXX
+#define SC_FORMULAITER_HXX
+
+#include "address.hxx"
+
+class ScTokenArray;
+class ScFormulaCell;
+class ScToken;
+
+/**
+ * Iterator for references in a formula cell.
+ */
+class ScDetectiveRefIter
+{
+private:
+ScTokenArray* pCode;
+ScAddress aPos;
+public:
+ScDetectiveRefIter( ScFormulaCell* pCell );
+boolGetNextRef( ScRange& rRange );
+ScToken*GetNextRefToken();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx
index 4aa

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

2013-03-22 Thread Stephan Bergmann
 toolkit/source/controls/stdtabcontroller.cxx |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 9e2034c0330f969b6795dd9ec8771fdad34777a6
Author: Stephan Bergmann 
Date:   Fri Mar 22 19:13:34 2013 +0100

Missing solar mutex

...as witnessed by the triggered assert

MSVCR90!wassert+0x641
vcllo!ImplDbgTestSolarMutex+0x72 [c:\lo\core\vcl\source\app\dbggui.cxx @ 
1750]
tllo!DbgFunc+0x47a [c:\lo\core\tools\source\debug\debug.cxx @ 1120]
vcllo!DbgTestSolarMutex+0xd 
[c:\lo\core\solver\wntmsci12\inc\tools\debug.hxx @ 295]
vcllo!OutputDevice::ImplInitClipRegion+0x2d 
[c:\lo\core\vcl\source\gdi\outdev.cxx @ 913]
vcllo!Window::Invert+0xef [c:\lo\core\vcl\source\window\window2.cxx @ 411]
vcllo!ImplCursorInvert+0x437 [c:\lo\core\vcl\source\window\cursor.cxx @ 120]
vcllo!Cursor::ImplRestore+0x27 [c:\lo\core\vcl\source\window\cursor.cxx @ 
159]
vcllo!Cursor::ImplDoHide+0x40 [c:\lo\core\vcl\source\window\cursor.cxx @ 
216]
vcllo!Cursor::ImplHide+0x3c [c:\lo\core\vcl\source\window\cursor.cxx @ 234]
vcllo!Window::ImplGrabFocus+0x4aa [c:\lo\core\vcl\source\window\window.cxx 
@ 4053]
vcllo!Window::GrabFocus+0x52 [c:\lo\core\vcl\source\window\window.cxx @ 
7544]
tklo!StdTabController::ImplActivateControl+0x1fe 
[c:\lo\core\toolkit\source\controls\stdtabcontroller.cxx @ 152]
tklo!StdTabController::activateFirst+0x45 
[c:\lo\core\toolkit\source\controls\stdtabcontroller.cxx @ 354]
msci_uno!`anonymous namespace'::callVirtualMethod+0x8a 
[c:\lo\core\bridges\source\cpp_uno\msvc_win32_intel\uno2cpp.cxx @ 76]
msci_uno!`anonymous namespace'::cpp_call+0x4b3 
[c:\lo\core\bridges\source\cpp_uno\msvc_win32_intel\uno2cpp.cxx @ 257]
msci_uno!bridges::cpp_uno::shared::unoInterfaceProxyDispatch+0x321 
[c:\lo\core\bridges\source\cpp_uno\msvc_win32_intel\uno2cpp.cxx @ 438]
binaryurp_uno!binaryurp::IncomingRequest::execute_throw+0xaa8 
[c:\lo\core\binaryurp\source\incomingrequest.cxx @ 245]
binaryurp_uno!binaryurp::IncomingRequest::execute+0xe0 
[c:\lo\core\binaryurp\source\incomingrequest.cxx @ 74]
binaryurp_uno!request+0x6b [c:\lo\core\binaryurp\source\reader.cxx @ 85]
cppu3!cppu_threadpool::JobQueue::enter+0x28d 
[c:\lo\core\cppu\source\threadpool\jobqueue.cxx @ 115]
cppu3!cppu_threadpool::ORequestThread::run+0xc6 
[c:\lo\core\cppu\source\threadpool\thread.cxx @ 175]
cppu3!threadFunc+0x18 [c:\lo\core\solver\wntmsci12\inc\osl\thread.hxx @ 187]
sal3!oslWorkerWrapperFunction+0x23 [c:\lo\core\sal\osl\w32\thread.c @ 60]

during JunitTest_toolkit_unoapi on Windows (which does not use a headless 
mode
for those tests).

Whether locking the class instance's GetMutex() is really necessary here I 
do
not know, but at least be careful to lock the global solar mutex first.

Change-Id: Icbd7936f4bf8433ef6a36912566d43361e911429

diff --git a/toolkit/source/controls/stdtabcontroller.cxx 
b/toolkit/source/controls/stdtabcontroller.cxx
index f9d9ae1..08969cf 100644
--- a/toolkit/source/controls/stdtabcontroller.cxx
+++ b/toolkit/source/controls/stdtabcontroller.cxx
@@ -28,6 +28,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 
@@ -348,14 +349,16 @@ void StdTabController::activateTabOrder(  ) 
throw(RuntimeException)
 
 void StdTabController::activateFirst(  ) throw(RuntimeException)
 {
-::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+SolarMutexGuard aSolarGuard;
+::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); //TODO: necessary?
 
 ImplActivateControl( sal_True );
 }
 
 void StdTabController::activateLast(  ) throw(RuntimeException)
 {
-::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+SolarMutexGuard aSolarGuard;
+::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); //TODO: necessary?
 
 ImplActivateControl( sal_False );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-03-22 Thread Stephan Bergmann
 sw/inc/unotextcursor.hxx  |   22 +-
 sw/source/core/unocore/unoobj.cxx |7 +++
 2 files changed, 24 insertions(+), 5 deletions(-)

New commits:
commit 8d68b885b021a60af0fd199a167cbaeac1f15116
Author: Stephan Bergmann 
Date:   Fri Mar 22 19:12:21 2013 +0100

Looser throw specifiers

Change-Id: I671d5d6459a3e1305c3d7a5ff21b63a5f6d0a289

diff --git a/sw/inc/unotextcursor.hxx b/sw/inc/unotextcursor.hxx
index d0b0dde..93c1bcf 100644
--- a/sw/inc/unotextcursor.hxx
+++ b/sw/inc/unotextcursor.hxx
@@ -196,17 +196,29 @@ public:
 // XMultiPropertySet
 virtual void SAL_CALL setPropertyValues(
 const ::com::sun::star::uno::Sequence< ::rtl::OUString >& 
aPropertyNames,
-const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any 
>& aValues );
+const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any 
>& aValues )
+throw (
+css::beans::PropertyVetoException,
+css::lang::IllegalArgumentException,
+css::lang::WrappedTargetException, css::uno::RuntimeException);
+
 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > 
SAL_CALL
-getPropertyValues( const ::com::sun::star::uno::Sequence< 
::rtl::OUString >& aPropertyNames );
+getPropertyValues( const ::com::sun::star::uno::Sequence< 
::rtl::OUString >& aPropertyNames )
+throw (css::uno::RuntimeException);
+
 virtual void SAL_CALL addPropertiesChangeListener(
 const ::com::sun::star::uno::Sequence< ::rtl::OUString >& 
aPropertyNames,
-const ::com::sun::star::uno::Reference< 
css::beans::XPropertiesChangeListener >& xListener );
+const ::com::sun::star::uno::Reference< 
css::beans::XPropertiesChangeListener >& xListener )
+throw (css::uno::RuntimeException);
+
 virtual void SAL_CALL removePropertiesChangeListener(
-const ::com::sun::star::uno::Reference< 
css::beans::XPropertiesChangeListener >& xListener );
+const ::com::sun::star::uno::Reference< 
css::beans::XPropertiesChangeListener >& xListener )
+throw (css::uno::RuntimeException);
+
 virtual void SAL_CALL firePropertiesChangeEvent(
 const ::com::sun::star::uno::Sequence< ::rtl::OUString >& 
aPropertyNames,
-const ::com::sun::star::uno::Reference< 
css::beans::XPropertiesChangeListener >& xListener );
+const ::com::sun::star::uno::Reference< 
css::beans::XPropertiesChangeListener >& xListener )
+throw (css::uno::RuntimeException);
 
 // XMultiPropertyStates
 virtual void SAL_CALL setAllPropertiesToDefault()
diff --git a/sw/source/core/unocore/unoobj.cxx 
b/sw/source/core/unocore/unoobj.cxx
index 91b30f5..050b9cb 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -2335,6 +2335,9 @@ throw (beans::UnknownPropertyException, 
lang::WrappedTargetException,
 void SAL_CALL SwXTextCursor::setPropertyValues(
 const uno::Sequence< ::rtl::OUString >& aPropertyNames,
 const uno::Sequence< uno::Any >& aValues )
+throw (
+css::beans::PropertyVetoException, css::lang::IllegalArgumentException,
+css::lang::WrappedTargetException, css::uno::RuntimeException)
 {
 if( aValues.getLength() != aPropertyNames.getLength() )
 {
@@ -2367,6 +2370,7 @@ void SAL_CALL SwXTextCursor::setPropertyValues(
 
 uno::Sequence< uno::Any > SAL_CALL
 SwXTextCursor::getPropertyValues( const uno::Sequence< ::rtl::OUString >& 
aPropertyNames )
+throw (css::uno::RuntimeException)
 {
 // a banal implementation for now
 uno::Sequence< uno::Any > aValues( aPropertyNames.getLength() );
@@ -2378,11 +2382,13 @@ SwXTextCursor::getPropertyValues( const uno::Sequence< 
::rtl::OUString >& aPrope
 void SAL_CALL SwXTextCursor::addPropertiesChangeListener(
 const uno::Sequence< ::rtl::OUString >& /* aPropertyNames */,
 const uno::Reference< css::beans::XPropertiesChangeListener >& /* 
xListener */ )
+throw (css::uno::RuntimeException)
 {
 OSL_FAIL("SwXTextCursor::addPropertiesChangeListener(): not implemented");
 }
 void SAL_CALL SwXTextCursor::removePropertiesChangeListener(
 const uno::Reference< css::beans::XPropertiesChangeListener >& /* 
xListener */ )
+throw (css::uno::RuntimeException)
 {
 OSL_FAIL("SwXTextCursor::removePropertiesChangeListener(): not 
implemented");
 }
@@ -2390,6 +2396,7 @@ void SAL_CALL 
SwXTextCursor::removePropertiesChangeListener(
 void SAL_CALL SwXTextCursor::firePropertiesChangeEvent(
 const uno::Sequence< ::rtl::OUString >& /* aPropertyNames */,
 const uno::Reference< css::beans::XPropertiesChangeListener >& /* 
xListener */ )
+throw (css::uno::RuntimeException)
 {
 OSL_FAIL("SwXTextCursor::firePropertiesChangeEvent(): not implemented");
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/list

Re: Minutes of ESC call

2013-03-22 Thread Stephan Bergmann

On 03/22/2013 06:41 PM, Michael Stahl wrote:

On 22/03/13 18:25, Stephan Bergmann wrote:

On 03/21/2013 05:28 PM, Jan Holesovsky wrote:

* Kill include guards in .hxx, and use #pragma once instead
  + makes the headers nicer
  + the benchmark available on the net seems to suggest it speeds
up MSVC
  + Lubos' test seems to suggest that there is ~no difference for
gcc
+ consensus: let's just do it after 4.0.2 is out


The only drawback I can find is that #pragma once is non-standard and
therefore
---arguably
rightly so---recommends against its use.


hmm... does that really matter?


Hopefully not.  But if the claimed MSVC speedup was non-existent, it 
would be humble to go with the (not completely inadequate, after all) 
standard means and avoid one potential pitfall.  (/Every/ deviation from 
the standard, however minuscule, is bound to bite us one day down the 
road.)  Or maybe not.  Anyway, I should probably have inserted "very 
minor" before "drawback," or even kept away from the keyboard entirely... ;)


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


Re: Minutes of ESC call

2013-03-22 Thread Michael Stahl
On 22/03/13 18:25, Stephan Bergmann wrote:
> On 03/21/2013 05:28 PM, Jan Holesovsky wrote:
>> * Kill include guards in .hxx, and use #pragma once instead
>>  + makes the headers nicer
>>  + the benchmark available on the net seems to suggest it speeds
>>up MSVC
>>  + Lubos' test seems to suggest that there is ~no difference for
>>gcc
>>  + consensus: let's just do it after 4.0.2 is out
> 
> The only drawback I can find is that #pragma once is non-standard and 
> therefore 
> ---arguably
>  
> rightly so---recommends against its use.

hmm... does that really matter? what is the likelihood that anybody
wants to use something older than GCC 3.4 to build LO anyway?

after all we rely on the implementation providing two's complement
arithmetic as well in a lot of places which is not mandated by C++
standard... (not to mention small conveniences like shared libraries)

also the existing include guards are not a stellar example of standard
compliant code anyway, given that a lot of them define macros starting
with underscores, and thus trample over the part of the namespace
reserved for the implementation by the C++ standard...

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


Build error - testFdo60915

2013-03-22 Thread Marcos Souza
Hi guys,

I'm trying to build LO with head 683142294f291a77329a2d266124432aeba8522b
and I'm getting the following error message:

[build CXX] svx/source/unodraw/unopool.cxx
svl.cxx:321:Assertion
Test name: (anonymous namespace)::Test::testFdo60915
equality assertion failed
- Expected: 18/05/2446
- Actual  : 17/05/2446

Failures !!!
Run: 2   Failure total: 1   Failures: 1   Errors: 0

Anybody knows how to solve this?

-- 
Att,

Marcos Paulo de Souza
Acadêmico de Ciencia da Computação - FURB - SC
Github: https://github.com/marcosps/
"Uma vida sem desafios é uma vida sem razão"
"A life without challenges, is a non reason life"
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PUSHED] clean up DBG_ERRORn

2013-03-22 Thread Fridrich Strba (via Code Review)
Hi,

Thank you for your patch!  It has been merged to LibreOffice.

If you are interested in details, please visit

https://gerrit.libreoffice.org/2900

Approvals:
  Fridrich Strba: Verified; Looks good to me, approved


-- 
To view, visit https://gerrit.libreoffice.org/2900
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4f4188ba25b988128a539542f49797ea6985702e
Gerrit-PatchSet: 3
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Thomas Arnhold 
Gerrit-Reviewer: Fridrich Strba 

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


[Libreoffice-commits] core.git: oox/source sal/inc tools/source vcl/source

2013-03-22 Thread Thomas Arnhold
 oox/source/export/chartexport.cxx |3 +--
 sal/inc/sal/log-areas.dox |1 +
 tools/source/generic/config.cxx   |   11 ++-
 vcl/source/window/accel.cxx   |2 +-
 vcl/source/window/winproc.cxx |2 +-
 5 files changed, 6 insertions(+), 13 deletions(-)

New commits:
commit 5ea8a48a3b26ac326ea5fe4a637a2d9b59cd2b94
Author: Thomas Arnhold 
Date:   Thu Mar 21 10:19:50 2013 +0100

clean up DBG_ERRORn

Those were DBG_ERRORn before and were falsely changed to OSL_TRACE by me.

See:
1707a350af8a0909ae88c2b11deb714f8b2a93ff
533f89e49395bbc31baaab9ade46db934b383e14

Change-Id: I4f4188ba25b988128a539542f49797ea6985702e
Reviewed-on: https://gerrit.libreoffice.org/2900
Reviewed-by: Fridrich Strba 
Tested-by: Fridrich Strba 

diff --git a/oox/source/export/chartexport.cxx 
b/oox/source/export/chartexport.cxx
index ef3c014..4f4b83d 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -2417,8 +2417,7 @@ void ChartExport::exportDataPoints(
 catch( const uno::Exception & rEx )
 {
 (void)rEx; // avoid warning for pro build
-OSL_TRACE( "Exception caught during Export of data point: 
%s",
-OUStringToOString( rEx.Message, 
RTL_TEXTENCODING_ASCII_US ).getStr() );
+SAL_WARN( "oox", "Exception caught during Export of data 
point: " << rEx.Message );
 }
 }
 else
diff --git a/sal/inc/sal/log-areas.dox b/sal/inc/sal/log-areas.dox
index 3bb316f..07c7399 100644
--- a/sal/inc/sal/log-areas.dox
+++ b/sal/inc/sal/log-areas.dox
@@ -195,6 +195,7 @@ certain functionality.
 
 @li @c tools.debug
 @li @c tools.datetime
+@li @c tools.generic
 @li @c tools.memtools
 @li @c tools.rc - resource manager
 @li @c tools.stream - SvStream class
diff --git a/tools/source/generic/config.cxx b/tools/source/generic/config.cxx
index 9d2d284..dac13f0 100644
--- a/tools/source/generic/config.cxx
+++ b/tools/source/generic/config.cxx
@@ -537,15 +537,8 @@ static void ImplReadConfig( ImplConfigData* pData )
 
 static void ImplWriteConfig( ImplConfigData* pData )
 {
-#ifdef DBG_UTIL
-if ( DbgIsAssert() )
-{
-if ( pData->mnTimeStamp != ImplSysGetConfigTimeStamp( 
pData->maFileName ) )
-{
-OSL_TRACE( "Config overwrites modified configfile:\n %s", 
rtl::OUStringToOString(pData->maFileName, RTL_TEXTENCODING_UTF8).getStr() );
-}
-}
-#endif
+SAL_WARN_IF( pData->mnTimeStamp != ImplSysGetConfigTimeStamp( 
pData->maFileName ),
+"tools.generic", "Config overwrites modified configfile: " << 
pData->maFileName );
 
 // Read config list from buffer
 sal_uIntPtr nBufLen;
diff --git a/vcl/source/window/accel.cxx b/vcl/source/window/accel.cxx
index 261c4d0..653dac9 100644
--- a/vcl/source/window/accel.cxx
+++ b/vcl/source/window/accel.cxx
@@ -264,7 +264,7 @@ void Accelerator::ImplInsertAccel( sal_uInt16 nItemId, 
const KeyCode& rKeyCode,
 }
 else if ( !mpData->maKeyMap.insert( std::make_pair( nCode, pEntry ) 
).second )
 {
-OSL_TRACE( "Accelerator::InsertItem(): KeyCode (Key: %lx) already 
exists", nCode );
+SAL_WARN( "vcl.layout", "Accelerator::InsertItem(): KeyCode (Key: " << 
nCode << ") already exists" );
 delete pEntry;
 }
 else
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index b8f1cde..98c856b 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -2661,7 +2661,7 @@ long ImplWindowFrameProc( Window* pWindow, SalFrame* 
/*pFrame*/,
 break;
 #ifdef DBG_UTIL
 default:
-OSL_TRACE( "ImplWindowFrameProc(): unknown event (%lu)", 
(sal_uLong)nEvent );
+SAL_WARN( "vcl.layout", "ImplWindowFrameProc(): unknown event (" 
<< nEvent << ")" );
 break;
 #endif
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Minutes of ESC call

2013-03-22 Thread Stephan Bergmann

On 03/21/2013 05:28 PM, Jan Holesovsky wrote:

* Kill include guards in .hxx, and use #pragma once instead
 + makes the headers nicer
 + the benchmark available on the net seems to suggest it speeds
   up MSVC
 + Lubos' test seems to suggest that there is ~no difference for
   gcc
+ consensus: let's just do it after 4.0.2 is out


The only drawback I can find is that #pragma once is non-standard and 
therefore 
---arguably 
rightly so---recommends against its use.


Stephan

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


Re: [PATCH] String::AppendAscii cleanup

2013-03-22 Thread Eike Rathke
Hi,

On Friday, 2013-03-22 16:53:20 +, Ricardo Montania (via Code Review) wrote:

hum.. did that

> --- a/cui/source/dialogs/postdlg.cxx
> +++ b/cui/source/dialogs/postdlg.cxx
> -xub_StrLen nLen = aStr.Len();
> +xub_StrLen nLen = aStr.getLength();

compile? Note that OUString::getLength() returns saL_int32 while
xub_StrLen is sal_uInt16.

  Eike

-- 
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
New GnuPG key 0x65632D3A : 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A
Old GnuPG key 0x293C05FD : 997A 4C60 CE41 0149 0DB3  9E96 2F1A D073 293C 05FD
Support the FSFE, care about Free Software! https://fsfe.org/support/?erack


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


[Libreoffice-commits] core.git: sal/inc

2013-03-22 Thread Stephan Bergmann
 sal/inc/rtl/allocator.hxx   |6 ++
 sal/inc/rtl/instance.hxx|4 +---
 sal/inc/rtl/stringutils.hxx |4 
 sal/inc/sal/config.h|4 
 sal/inc/sal/types.h |4 
 5 files changed, 7 insertions(+), 15 deletions(-)

New commits:
commit 1f393e01ca9ed878e6abc2cfa2bc8cf8e64f2ef3
Author: Stephan Bergmann 
Date:   Fri Mar 22 18:19:55 2013 +0100

For convenience, include config_global.h in sal/config.h

...which must be included first thing everywhere anyway.

Change-Id: Idbbf941b526f48a89d6398e19404b1ff0e23a6b4

diff --git a/sal/inc/rtl/allocator.hxx b/sal/inc/rtl/allocator.hxx
index 2cbf95b..05575c2 100644
--- a/sal/inc/rtl/allocator.hxx
+++ b/sal/inc/rtl/allocator.hxx
@@ -19,14 +19,12 @@
 #ifndef INCLUDED_RTL_ALLOCATOR_HXX
 #define INCLUDED_RTL_ALLOCATOR_HXX
 
+#include "sal/config.h"
+
 #include "sal/types.h"
 #include "rtl/alloc.h"
 #include 
 
-#if defined LIBO_INTERNAL_ONLY
-#include "config_global.h"
-#endif
-
 /// @cond INTERNAL
 
 //##
diff --git a/sal/inc/rtl/instance.hxx b/sal/inc/rtl/instance.hxx
index 912a3d4..1efda80 100644
--- a/sal/inc/rtl/instance.hxx
+++ b/sal/inc/rtl/instance.hxx
@@ -20,9 +20,7 @@
 #ifndef INCLUDED_RTL_INSTANCE_HXX
 #define INCLUDED_RTL_INSTANCE_HXX
 
-#if defined LIBO_INTERNAL_ONLY
-#include 
-#endif
+#include "sal/config.h"
 
 #include "osl/doublecheckedlocking.h"
 #include "osl/getglobalmutex.hxx"
diff --git a/sal/inc/rtl/stringutils.hxx b/sal/inc/rtl/stringutils.hxx
index 765319d..7ca2281 100644
--- a/sal/inc/rtl/stringutils.hxx
+++ b/sal/inc/rtl/stringutils.hxx
@@ -31,10 +31,6 @@
 
 #include "sal/config.h"
 
-#if defined LIBO_INTERNAL_ONLY
-#include 
-#endif
-
 // Manually defining RTL_DISABLE_FAST_STRING allows to force turning fast 
string concatenation off
 // (e.g. for debugging).
 #ifndef RTL_DISABLE_FAST_STRING
diff --git a/sal/inc/sal/config.h b/sal/inc/sal/config.h
index 03e24c6..e990e35 100644
--- a/sal/inc/sal/config.h
+++ b/sal/inc/sal/config.h
@@ -20,6 +20,10 @@
 #ifndef _SAL_CONFIG_H_
 #define _SAL_CONFIG_H_
 
+#if defined LIBO_INTERNAL_ONLY
+#include "config_global.h"
+#endif
+
 #ifndef INCLUDED_STDLIB_H
 #include 
 #define INCLUDED_STDLIB_H
diff --git a/sal/inc/sal/types.h b/sal/inc/sal/types.h
index b89b056..346abf6 100644
--- a/sal/inc/sal/types.h
+++ b/sal/inc/sal/types.h
@@ -23,10 +23,6 @@
 #include 
 #include 
 
-#if defined LIBO_INTERNAL_ONLY
-#include 
-#endif
-
 #include 
 
 #ifdef __cplusplus
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[PUSHED] String::AppendAscii cleanup

2013-03-22 Thread Fridrich Strba (via Code Review)
Hi,

Thank you for your patch!  It has been merged to LibreOffice.

If you are interested in details, please visit

https://gerrit.libreoffice.org/2914

Approvals:
  Fridrich Strba: Verified; Looks good to me, approved


-- 
To view, visit https://gerrit.libreoffice.org/2914
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I3c1ff291488b7747e143982aa7ea95169175c2c2
Gerrit-PatchSet: 2
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Ricardo Montania 
Gerrit-Reviewer: Fridrich Strba 

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


[Libreoffice-commits] core.git: basctl/source connectivity/source cui/source

2013-03-22 Thread Ricardo Montania
 basctl/source/basicide/baside2.cxx   |4 ++--
 connectivity/source/drivers/dbase/DIndex.cxx |7 +++
 connectivity/source/drivers/dbase/DTable.cxx |4 ++--
 cui/source/dialogs/hyphen.cxx|8 
 cui/source/dialogs/postdlg.cxx   |   16 
 cui/source/options/optdict.cxx   |6 +++---
 6 files changed, 22 insertions(+), 23 deletions(-)

New commits:
commit 9c281fda84bea4407bb8265d1e125fc6e429064d
Author: Ricardo Montania 
Date:   Fri Mar 22 13:52:16 2013 -0300

String::AppendAscii cleanup

Change-Id: I3c1ff291488b7747e143982aa7ea95169175c2c2
Reviewed-on: https://gerrit.libreoffice.org/2914
Reviewed-by: Fridrich Strba 
Tested-by: Fridrich Strba 

diff --git a/basctl/source/basicide/baside2.cxx 
b/basctl/source/basicide/baside2.cxx
index 72d594d..f8962c5 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -1339,7 +1339,7 @@ EntryDescriptor ModulWindow::CreateEntryDescriptor()
 ScriptDocument aDocument( GetDocument() );
 String aLibName( GetLibName() );
 LibraryLocation eLocation = aDocument.getLibraryLocation( aLibName );
-String aModName( GetName() );
+OUString aModName( GetName() );
 String aLibSubName;
 if( xBasic.Is() && aDocument.isInVBAMode() && XModule().Is() )
 {
@@ -1355,7 +1355,7 @@ EntryDescriptor ModulWindow::CreateEntryDescriptor()
 ModuleInfoHelper::getObjectName( xLib, aModName, sObjName 
);
 if( !sObjName.isEmpty() )
 {
-aModName.AppendAscii(" 
(").Append(sObjName).AppendAscii(")");
+aModName += " (" + sObjName + ")";
 }
 }
 break;
diff --git a/connectivity/source/drivers/dbase/DIndex.cxx 
b/connectivity/source/drivers/dbase/DIndex.cxx
index 0cb4630..1e70a5c 100644
--- a/connectivity/source/drivers/dbase/DIndex.cxx
+++ b/connectivity/source/drivers/dbase/DIndex.cxx
@@ -509,16 +509,15 @@ sal_Bool ODbaseIndex::CreateImpl()
 aName = getString(xCol->getFastPropertyValue(PROPERTY_ID_NAME));
 
 const String 
aQuote(m_pTable->getConnection()->getMetaData()->getIdentifierQuoteString());
-String aStatement;
-aStatement.AssignAscii("SELECT ");
+OUString aStatement( "SELECT " );
 aStatement += aQuote;
 aStatement += aName;
 aStatement += aQuote;
-aStatement.AppendAscii(" FROM ");
+aStatement += " FROM ";
 aStatement += aQuote;
 aStatement += m_pTable->getName().getStr();
 aStatement += aQuote;
-aStatement.AppendAscii(" ORDER BY ");
+aStatement += " ORDER BY ";
 aStatement += aQuote;
 aStatement += aName;
 aStatement += aQuote;
diff --git a/connectivity/source/drivers/dbase/DTable.cxx 
b/connectivity/source/drivers/dbase/DTable.cxx
index ee2d7df..386d802 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -2318,8 +2318,8 @@ namespace
 aURL.SetURL(aName);
 
 aURL.setExtension( _sExtension );
-String sNewName(newName);
-sNewName.AppendAscii(".");
+OUString sNewName(newName);
+sNewName += ".";
 sNewName += _sExtension;
 
 try
diff --git a/cui/source/dialogs/hyphen.cxx b/cui/source/dialogs/hyphen.cxx
index 82bef8d..26326647 100644
--- a/cui/source/dialogs/hyphen.cxx
+++ b/cui/source/dialogs/hyphen.cxx
@@ -521,10 +521,10 @@ SvxHyphenWordDialog::~SvxHyphenWordDialog()
 void SvxHyphenWordDialog::SetWindowTitle( LanguageType nLang )
 {
 String aLangStr( SvtLanguageTable::GetLanguageString( nLang ) );
-String aTmp( aLabel );
-aTmp.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " (" ) );
-aTmp.Append( aLangStr );
-aTmp.Append( sal_Unicode( ')' ) );
+OUString aTmp( aLabel );
+aTmp += " (";
+aTmp += aLangStr;
+aTmp += ")";
 SetText( aTmp );
 }
 
diff --git a/cui/source/dialogs/postdlg.cxx b/cui/source/dialogs/postdlg.cxx
index cec8c01..4e2465e 100644
--- a/cui/source/dialogs/postdlg.cxx
+++ b/cui/source/dialogs/postdlg.cxx
@@ -134,8 +134,8 @@ SvxPostItDialog::~SvxPostItDialog()
 
 void SvxPostItDialog::ShowLastAuthor(const String& rAuthor, const String& 
rDate)
 {
-String sTxt( rAuthor );
-sTxt.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ", " ) );
+OUString sTxt( rAuthor );
+sTxt += ", ";
 sTxt += rDate;
 m_pLastEditFT->SetText( sTxt );
 }
@@ -187,23 +187,23 @@ IMPL_LINK_NOARG(SvxPostItDialog, Stamp)
 Time aTime( Time::SYSTEM );
 String aTmp( SvtUserOptions().GetID() );
 const LocaleDataWrapper& rLocaleWrapper( 
Application::GetSettings().GetLocaleDataWrapper() );
-String aStr( m_pEditED->GetText() );
-aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "\n " ) );
+OUString aStr( m_pEditED->GetText() );
+aStr += "\n ";
 
 if ( aTmp.L

[PUSHED] get rid of two-argument compareToAscii

2013-03-22 Thread Fridrich Strba (via Code Review)
Hi,

Thank you for your patch!  It has been merged to LibreOffice.

If you are interested in details, please visit

https://gerrit.libreoffice.org/2907

Approvals:
  Thomas Arnhold: Looks good to me, but someone else must approve
  Fridrich Strba: Verified; Looks good to me, approved


-- 
To view, visit https://gerrit.libreoffice.org/2907
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic33c8089283def615999ddf80cd12f6fe219ed17
Gerrit-PatchSet: 2
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Christian Lohmaier 
Gerrit-Reviewer: Fridrich Strba 
Gerrit-Reviewer: Thomas Arnhold 

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


[PUSHED libreoffice-4-0] fdo#61390: Fixed the tabstop in the TemplateView.

2013-03-22 Thread Fridrich Strba (via Code Review)
Hi,

Thank you for your patch!  It has been merged to LibreOffice.

If you are interested in details, please visit

https://gerrit.libreoffice.org/2913

Approvals:
  Fridrich Strba: Verified; Looks good to me, approved


-- 
To view, visit https://gerrit.libreoffice.org/2913
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I887b11646efb9a839da11cd3e20cdf7e532caf3e
Gerrit-PatchSet: 3
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Bosdonnat Cedric 
Gerrit-Reviewer: Fridrich Strba 

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


[PUSHED libreoffice-4-0] fdo#61390: simple keybard support in TemplateManager

2013-03-22 Thread Fridrich Strba (via Code Review)
Hi,

Thank you for your patch!  It has been merged to LibreOffice.

If you are interested in details, please visit

https://gerrit.libreoffice.org/2912

Approvals:
  Fridrich Strba: Verified; Looks good to me, approved


-- 
To view, visit https://gerrit.libreoffice.org/2912
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I5ba67583c835bcc00b075071411c0d6590a07f9a
Gerrit-PatchSet: 3
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Bosdonnat Cedric 
Gerrit-Reviewer: Fridrich Strba 

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


[PUSHED libreoffice-4-0] Template Manager: removed some dead selection code

2013-03-22 Thread Fridrich Strba (via Code Review)
Hi,

Thank you for your patch!  It has been merged to LibreOffice.

If you are interested in details, please visit

https://gerrit.libreoffice.org/2911

Approvals:
  Fridrich Strba: Verified; Looks good to me, approved


-- 
To view, visit https://gerrit.libreoffice.org/2911
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib5ebcd928e77a115f4f62a50724656c33ae13c61
Gerrit-PatchSet: 3
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Bosdonnat Cedric 
Gerrit-Reviewer: Fridrich Strba 

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


[Libreoffice-commits] core.git: config_host/README

2013-03-22 Thread Stephan Bergmann
 config_host/README |   14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 43f59b86cd2c65bf408bea8108b56839b21b8b4e
Author: Stephan Bergmann 
Date:   Fri Mar 22 18:12:05 2013 +0100

Consistent "config_XXX.h" naming

Change-Id: Ie7cb4356fd2400753934ca907f09cf240ada734e

diff --git a/config_host/README b/config_host/README
index 05068b3..4f9d3ce 100644
--- a/config_host/README
+++ b/config_host/README
@@ -11,20 +11,20 @@ Adding a new setting:
 =
 
 - do AC_DEFINE(HAVE_FOO) in configure.ac when a setting should be set
-- choose the proper config_host/config_xxx.h file to use
+- choose the proper config_host/config_XXX.h file to use
 - if it is a global setting (such as availability of a compiler feature),
 use config_host/config_global.h
-- otherwise check if there is a matching config_host/config_hxx.h file
+- otherwise check if there is a matching config_host/config_XXX.h file
 - if none matches, add a new one:
-- add config_host/config_xxx.h.in here, with just #ifndef include guard
-- add AC_CONFIG_HEADERS([config_host/config_xxx.h]) next to the others
+- add config_host/config_XXX.h.in here, with just #ifndef include guard
+- add AC_CONFIG_HEADERS([config_host/config_XXX.h]) next to the others
 in configure.ac
-- add config_hxx.h to config_host/.gitignore
-- add #undef HAVE_FOO to the config_host/config_hxx.h , possibly with a comment
+- add config_XXX.h to config_host/.gitignore
+- add #undef HAVE_FOO to the config_host/config_XXX.h , possibly with a comment
 - if the setting is an on/off setting (i.e. not a value of anything),
   add the following block right after it
 #ifndef HAVE_FOO
 #define HAVE_FOO 0
 #endif
-- add #include  before any #if HAVE_FOO in a source file
+- add #include  before any #if HAVE_FOO in a source file
 - make sure you use #if HAVE_FOO, do not use #ifdef
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: vcl/aqua

2013-03-22 Thread Christian Lohmaier
 vcl/aqua/source/dtrans/DataFlavorMapping.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 683142294f291a77329a2d266124432aeba8522b
Author: Christian Lohmaier 
Date:   Fri Mar 22 14:00:19 2013 +0100

get rid of two-argument compareToAscii

As I don't see a point in comparing a mimetype with only a
substring, it probably could be a simple compareToAscii, but
play it save and use startsWith.

Change-Id: Ic33c8089283def615999ddf80cd12f6fe219ed17
Reviewed-on: https://gerrit.libreoffice.org/2907
Reviewed-by: Thomas Arnhold 
Reviewed-by: Fridrich Strba 
Tested-by: Fridrich Strba 

diff --git a/vcl/aqua/source/dtrans/DataFlavorMapping.cxx 
b/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
index a1a69ff..6cfc2c9 100644
--- a/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
+++ b/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
@@ -526,7 +526,7 @@ NSString* DataFlavorMapper::openOfficeToSystemFlavor(const 
DataFlavor& oOOFlavor
 
   for (size_t i = 0; i < SIZE_FLAVOR_MAP; i++)
 {
-  if (oOOFlavor.MimeType.compareToAscii(flavorMap[i].OOoFlavor, 
strlen(flavorMap[i].OOoFlavor)) == 0)
+  if (oOOFlavor.MimeType.startsWith(flavorMap[i].OOoFlavor))
 {
   sysFlavor = flavorMap[i].SystemFlavor;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - 2 commits - sfx2/inc sfx2/source

2013-03-22 Thread Cédric Bosdonnat
 sfx2/inc/sfx2/templateview.hxx   |1 
 sfx2/inc/sfx2/thumbnailview.hxx  |7 +
 sfx2/source/control/templateabstractview.cxx |   10 ++
 sfx2/source/control/templateview.cxx |   16 +---
 sfx2/source/control/templateview.src |6 -
 sfx2/source/control/thumbnailview.cxx|  104 +--
 6 files changed, 117 insertions(+), 27 deletions(-)

New commits:
commit 9296cf4088a0637f0326803fe220816ebc8daf22
Author: Cédric Bosdonnat 
Date:   Fri Mar 22 16:33:20 2013 +0100

fdo#61390: Fixed the tabstop in the TemplateView.

Change-Id: I887b11646efb9a839da11cd3e20cdf7e532caf3e
(cherry picked from commit 7a25aa2821ccf7318ce4a13efe171763989009d5)
Reviewed-on: https://gerrit.libreoffice.org/2913
Reviewed-by: Fridrich Strba 
Tested-by: Fridrich Strba 

diff --git a/sfx2/inc/sfx2/templateview.hxx b/sfx2/inc/sfx2/templateview.hxx
index 3e2a7c8..e219905 100644
--- a/sfx2/inc/sfx2/templateview.hxx
+++ b/sfx2/inc/sfx2/templateview.hxx
@@ -51,7 +51,6 @@ protected:
 private:
 TemplateAbstractView* mpMasterView;
 
-ControlmaButtons;
 PushButton maAllButton;
 FixedText  maFTName;
 sal_uInt16 mnId;
diff --git a/sfx2/source/control/templateabstractview.cxx 
b/sfx2/source/control/templateabstractview.cxx
index de2091f..14ab811 100644
--- a/sfx2/source/control/templateabstractview.cxx
+++ b/sfx2/source/control/templateabstractview.cxx
@@ -114,7 +114,7 @@ bool ViewFilter_Keyword::operator ()(const 
ThumbnailViewItem *pItem)
 
 TemplateAbstractView::TemplateAbstractView (Window *pParent, WinBits 
nWinStyle, bool bDisableTransientChildren)
 : ThumbnailView(pParent,nWinStyle,bDisableTransientChildren),
-  mpItemView(new TemplateView(this)),
+  mpItemView(new TemplateView(pParent)),
   mbFilteredResults(false),
   meFilterOption(FILTER_APP_WRITER)
 {
@@ -123,7 +123,7 @@ TemplateAbstractView::TemplateAbstractView (Window 
*pParent, WinBits nWinStyle,
 
 TemplateAbstractView::TemplateAbstractView(Window *pParent, const ResId 
&rResId, bool bDisableTransientChildren)
 : ThumbnailView(pParent,rResId,bDisableTransientChildren),
-  mpItemView(new TemplateView(this)),
+  mpItemView(new TemplateView(pParent)),
   mbFilteredResults(false),
   meFilterOption(FILTER_APP_WRITER)
 {
@@ -190,8 +190,14 @@ void TemplateAbstractView::filterTemplatesByApp (const 
FILTER_APPLICATION &eApp)
 
 void TemplateAbstractView::showOverlay (bool bVisible)
 {
+Show(!bVisible);
 mpItemView->Show(bVisible);
 
+mpItemView->SetPosSizePixel(GetPosPixel(), GetSizePixel());
+mpItemView->SetStyle(GetStyle());
+
+mpItemView->GrabFocus();
+
 // Clear items is the overlay is closed.
 if (!bVisible)
 {
diff --git a/sfx2/source/control/templateview.cxx 
b/sfx2/source/control/templateview.cxx
index 615465d..46ebeaa 100644
--- a/sfx2/source/control/templateview.cxx
+++ b/sfx2/source/control/templateview.cxx
@@ -34,14 +34,13 @@ using namespace drawinglayer::attribute;
 using namespace drawinglayer::primitive2d;
 
 TemplateView::TemplateView (Window *pParent)
-: ThumbnailView(pParent,WB_VSCROLL),
+: ThumbnailView(pParent,WB_VSCROLL | WB_TABSTOP),
   mpMasterView(NULL),
-  maButtons(this, SfxResId(CONTROL_BUTTONS)),
-  maAllButton(&maButtons, SfxResId(BTN_ALL_TEMPLATES)),
-  maFTName(&maButtons, SfxResId(FT_NAME)),
+  maAllButton(this, SfxResId(BTN_ALL_TEMPLATES)),
+  maFTName(this, SfxResId(FT_NAME)),
   mnId(0)
 {
-mnHeaderHeight = maButtons.GetSizePixel().getHeight();
+mnHeaderHeight = maAllButton.GetSizePixel().getHeight() + 
maAllButton.GetPosPixel().Y() * 2;
 maAllButton.SetStyle(maAllButton.GetStyle() | WB_FLATBUTTON);
 }
 
@@ -88,13 +87,8 @@ void TemplateView::Resize()
 Size aWinSize = GetOutputSize();
 
 // Set the buttons panel and buttons size
-Size aPanelSize = maButtons.GetSizePixel();
-int nDeltaW = aWinSize.getWidth() - aPanelSize.getWidth();
-aPanelSize.setWidth(aWinSize.getWidth());
-maButtons.SetSizePixel(aPanelSize);
-
 Size aNameSize = maFTName.GetSizePixel();
-aNameSize.setWidth(aNameSize.getWidth() + nDeltaW);
+aNameSize.setWidth( aWinSize.getWidth() - maFTName.GetPosPixel().X());
 maFTName.SetSizePixel(aNameSize);
 
 ThumbnailView::Resize();
diff --git a/sfx2/source/control/templateview.src 
b/sfx2/source/control/templateview.src
index db4d575..8549c96 100644
--- a/sfx2/source/control/templateview.src
+++ b/sfx2/source/control/templateview.src
@@ -8,12 +8,6 @@
 
 #include "templateview.hrc"
 
-Control CONTROL_BUTTONS
-{
-Size = MAP_APPFONT( 290, 17 );
-TabStop = False;
-};
-
 PushButton BTN_ALL_TEMPLATES
 {
 Pos = MAP_APPFONT( 1, 1 );
commit 43bbcfc7a1625aa79b69c443c492f0969b31baad
Author: Cédric Bosdonnat 
Date:   Fri Mar 22 11:43:11 2013 +0100

fdo#61390: simple keybard support in TemplateManager

Adds support for the UP, DOWN, LEFT, RIGHT and RETURN ke

[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - sfx2/inc sfx2/source

2013-03-22 Thread Cédric Bosdonnat
 sfx2/inc/sfx2/thumbnailview.hxx  |8 -
 sfx2/source/control/thumbnailview.cxx|  125 +--
 sfx2/source/control/thumbnailviewacc.cxx |2 
 3 files changed, 24 insertions(+), 111 deletions(-)

New commits:
commit e2ce03c2eaf1bdf6a3b736052be8e2ed8ef8c6ca
Author: Cédric Bosdonnat 
Date:   Thu Mar 21 11:49:01 2013 +0100

Template Manager: removed some dead selection code

(cherry picked from commit bfd1bcb204ed3ca35df1455a346a0ee7254a1191)

Conflicts:
sfx2/source/control/thumbnailview.cxx

Change-Id: Ib5ebcd928e77a115f4f62a50724656c33ae13c61
Reviewed-on: https://gerrit.libreoffice.org/2911
Reviewed-by: Fridrich Strba 
Tested-by: Fridrich Strba 

diff --git a/sfx2/inc/sfx2/thumbnailview.hxx b/sfx2/inc/sfx2/thumbnailview.hxx
index 8eb9426..efc5e78 100644
--- a/sfx2/inc/sfx2/thumbnailview.hxx
+++ b/sfx2/inc/sfx2/thumbnailview.hxx
@@ -202,10 +202,7 @@ public:
 
 void SelectItem( sal_uInt16 nItemId );
 
-sal_uInt16 GetSelectItemId() const { return mnSelItemId; }
-
-bool IsItemSelected( sal_uInt16 nItemId ) const
-{ return nItemId == mnSelItemId; }
+bool IsItemSelected( sal_uInt16 nItemId ) const;
 
 void deselectItem (const sal_uInt16 nItemId);
 
@@ -258,8 +255,6 @@ protected:
 
 virtual void DataChanged( const DataChangedEvent& rDCEvt );
 
-virtual bool StartDrag( const CommandEvent& rCEvt, Region& rRegion );
-
 virtual ::com::sun::star::uno::Reference< 
::com::sun::star::accessibility::XAccessible > CreateAccessible();
 
 protected:
@@ -310,7 +305,6 @@ protected:
 long mnVisLines;
 long mnLines;
 sal_uInt16 mnScrBarOffset;
-sal_uInt16 mnSelItemId;
 sal_uInt16 mnHighItemId;
 sal_uInt16 mnCols;
 sal_uInt16 mnFirstLine;
diff --git a/sfx2/source/control/thumbnailview.cxx 
b/sfx2/source/control/thumbnailview.cxx
index 57dba07..63ba189 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -92,7 +92,6 @@ void ThumbnailView::ImplInit()
 mnLines = 0;
 mnFirstLine = 0;
 mnScrBarOffset = 1;
-mnSelItemId = 0;
 mnHighItemId= 0;
 mnCols  = 0;
 mnSpacing   = 0;
@@ -589,11 +588,7 @@ void ThumbnailView::GetFocus()
 
 if ( nSelected == -1 && mItemList.size( ) > 0 )
 {
-mItemList[0]->setSelection(true);
-maItemStateHdl.Call(mItemList[0]);
-
-if (IsReallyVisible() && IsUpdateMode())
-Invalidate();
+SelectItem( 1 );
 }
 
 // Tell the accessible object that we got the focus.
@@ -710,10 +705,9 @@ void ThumbnailView::RemoveItem( sal_uInt16 nItemId )
 }
 
 // reset variables
-if ( (mnHighItemId == nItemId) || (mnSelItemId == nItemId) )
+if ( (mnHighItemId == nItemId) )
 {
 mnHighItemId= 0;
-mnSelItemId = 0;
 }
 
 CalculateItemPositions();
@@ -729,7 +723,6 @@ void ThumbnailView::Clear()
 // reset variables
 mnFirstLine = 0;
 mnHighItemId= 0;
-mnSelItemId = 0;
 
 CalculateItemPositions();
 
@@ -777,19 +770,18 @@ void ThumbnailView::setItemDimensions(long itemWidth, 
long thumbnailHeight, long
 
 void ThumbnailView::SelectItem( sal_uInt16 nItemId )
 {
-size_t nItemPos = 0;
+size_t nItemPos = GetItemPos( nItemId );
+if ( nItemPos == THUMBNAILVIEW_ITEM_NOTFOUND )
+return;
 
-if ( nItemId )
+ThumbnailViewItem* pItem = mItemList[nItemPos];
+if (!pItem->isSelected())
 {
-nItemPos = GetItemPos( nItemId );
-if ( nItemPos == THUMBNAILVIEW_ITEM_NOTFOUND )
-return;
-}
+mItemList[nItemPos]->setSelection(true);
+maItemStateHdl.Call(mItemList[nItemPos]);
 
-if ( mnSelItemId != nItemId)
-{
-sal_uInt16 nOldItem = mnSelItemId ? mnSelItemId : 1;
-mnSelItemId = nItemId;
+if (IsReallyVisible() && IsUpdateMode())
+Invalidate();
 
 bool bNewOut = IsReallyVisible() && IsUpdateMode();
 
@@ -815,44 +807,8 @@ void ThumbnailView::SelectItem( sal_uInt16 nItemId )
 
 if( ImplHasAccessibleListeners() )
 {
-// focus event (deselect)
-if( nOldItem )
-{
-const size_t nPos = GetItemPos( nItemId );
-
-if( nPos != THUMBNAILVIEW_ITEM_NOTFOUND )
-{
-ThumbnailViewAcc* pItemAcc = 
ThumbnailViewAcc::getImplementation(
-mItemList[nPos]->GetAccessible( 
mbIsTransientChildrenDisabled ) );
-
-if( pItemAcc )
-{
-::com::sun::star::uno::Any aOldAny, aNewAny;
-if( !mbIsTransientChildrenDisabled )
-{
-aOldAny <<= ::com::sun::star::uno::Reference< 
::com::sun::star::uno::XInterface >(
-static_cast< ::cppu::OWeakObject* >(

[Libreoffice-commits] core.git: Branch 'feature/formula-core-rework' - sc/inc sc/source

2013-03-22 Thread Kohei Yoshida
 sc/inc/dociter.hxx|   18 ---
 sc/inc/document.hxx   |1 
 sc/source/core/data/autonamecache.cxx |2 
 sc/source/core/data/dociter.cxx   |  146 +-
 sc/source/core/data/document.cxx  |4 
 sc/source/core/tool/chgtrack.cxx  |8 -
 sc/source/core/tool/compiler.cxx  |   18 +--
 sc/source/core/tool/detfunc.cxx   |   22 +--
 sc/source/core/tool/interpr5.cxx  |2 
 sc/source/ui/Accessibility/AccessibleCell.cxx |2 
 sc/source/ui/app/transobj.cxx |4 
 sc/source/ui/docshell/dbdocfun.cxx|2 
 sc/source/ui/unoobj/cellsuno.cxx  |   27 +---
 sc/source/ui/view/viewfunc.cxx|3 
 14 files changed, 105 insertions(+), 154 deletions(-)

New commits:
commit 47f3f7201907013196232884937975e23617eb6c
Author: Kohei Yoshida 
Date:   Fri Mar 22 13:03:23 2013 -0400

Simplify ScCellIterator.

Change-Id: I33b10e68434fe0047f8e7c3959b87a51f3460d29

diff --git a/sc/inc/dociter.hxx b/sc/inc/dociter.hxx
index 3683111..c104a33 100644
--- a/sc/inc/dociter.hxx
+++ b/sc/inc/dociter.hxx
@@ -214,19 +214,14 @@ class ScCellIterator// walk through all cells 
in an area
 {   // for SubTotal no hidden and no sub-total 
lines
 private:
 ScDocument* pDoc;
-SCCOL   nStartCol;
-SCROW   nStartRow;
-SCTAB   nStartTab;
-SCCOL   nEndCol;
-SCROW   nEndRow;
-SCTAB   nEndTab;
-SCCOL   nCol;
-SCROW   nRow;
-SCTAB   nTab;
+ScAddress maStartPos;
+ScAddress maEndPos;
+ScAddress maCurPos;
 SCSIZE  nColRow;
 boolbSubTotal;
 
 ScBaseCell* GetThis();
+void init();
 public:
 ScCellIterator(ScDocument* pDocument,
SCCOL nSCol, SCROW nSRow, SCTAB nSTab,
@@ -236,10 +231,7 @@ public:
const ScRange& rRange, bool bSTotal = 
false);
 ScBaseCell* GetFirst();
 ScBaseCell* GetNext();
-SCCOL   GetCol() const { return nCol; }
-SCROW   GetRow() const { return nRow; }
-SCTAB   GetTab() const { return nTab; }
-ScAddress   GetPos() const { return ScAddress( nCol, nRow, nTab ); }
+const ScAddress& GetPos() const { return maCurPos; }
 };
 
 class ScQueryCellIterator   // walk through all non-empty cells in an 
area
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index e0f19cd..742bfc9 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1213,6 +1213,7 @@ public:
 double& rResult );
 
 SC_DLLPUBLIC const SfxPoolItem* GetAttr( SCCOL nCol, SCROW nRow, 
SCTAB nTab, sal_uInt16 nWhich ) const;
+SC_DLLPUBLIC const SfxPoolItem* GetAttr( const ScAddress& rPos, sal_uInt16 
nWhich ) const;
 SC_DLLPUBLIC const ScPatternAttr*   GetPattern( SCCOL nCol, SCROW nRow, 
SCTAB nTab ) const;
 SC_DLLPUBLIC const ScPatternAttr*GetMostUsedPattern( SCCOL nCol, SCROW 
nStartRow, SCROW nEndRow, SCTAB nTab ) const;
 const ScPatternAttr*GetSelectionPattern( const ScMarkData& rMark, bool 
bDeep = true );
diff --git a/sc/source/core/data/autonamecache.cxx 
b/sc/source/core/data/autonamecache.cxx
index 4dde59f..f0e98dc 100644
--- a/sc/source/core/data/autonamecache.cxx
+++ b/sc/source/core/data/autonamecache.cxx
@@ -84,7 +84,7 @@ const ScAutoNameAddresses& 
ScAutoNameCache::GetNameOccurrences( const String& rN
 }
 if ( ScGlobal::GetpTransliteration()->isEqual( aStr, rName ) )
 {
-rAddresses.push_back( ScAddress( aIter.GetCol(), 
aIter.GetRow(), aIter.GetTab() ) );
+rAddresses.push_back(aIter.GetPos());
 }
 }
 }
diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index 33533f6..d5417d5 100644
--- a/sc/source/core/data/dociter.cxx
+++ b/sc/source/core/data/dociter.cxx
@@ -940,152 +940,114 @@ ScCellIterator::ScCellIterator( ScDocument* pDocument,
 SCCOL nSCol, SCROW nSRow, SCTAB nSTab,
 SCCOL nECol, SCROW nERow, SCTAB nETab, bool 
bSTotal ) :
 pDoc( pDocument ),
-nStartCol( nSCol),
-nStartRow( nSRow),
-nStartTab( nSTab ),
-nEndCol( nECol ),
-nEndRow( nERow),
-nEndTab( nETab ),
+maStartPos(nSCol, nSRow, nSTab),
+maEndPos(nECol, nERow, nETab),
+nColRow(0),
 bSubTotal(bSTotal)
-
 {
-SCTAB nDocMaxTab = pDocument->GetTableCount() - 1;
-
-PutInOrder( nStartCol, nEndCol);
-PutInOrder( nStartRow, nEndRow);
-PutInOrder( nStartTab, nEndTab );
-
-if (!ValidCol(nStartCol)) nStartCol = MAXCOL;
-if (!ValidCol(nEndCol)) nEndCol = MAXCOL;
-if (!ValidRow(nStartRow)) nStartRow = MAXR

[PATCH] String::AppendAscii cleanup

2013-03-22 Thread Ricardo Montania (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/2914

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/14/2914/1

String::AppendAscii cleanup

Change-Id: I3c1ff291488b7747e143982aa7ea95169175c2c2
---
M basctl/source/basicide/baside2.cxx
M connectivity/source/drivers/dbase/DIndex.cxx
M connectivity/source/drivers/dbase/DTable.cxx
M cui/source/dialogs/hyphen.cxx
M cui/source/dialogs/postdlg.cxx
M cui/source/options/optdict.cxx
6 files changed, 22 insertions(+), 23 deletions(-)



diff --git a/basctl/source/basicide/baside2.cxx 
b/basctl/source/basicide/baside2.cxx
index 72d594d..f8962c5 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -1339,7 +1339,7 @@
 ScriptDocument aDocument( GetDocument() );
 String aLibName( GetLibName() );
 LibraryLocation eLocation = aDocument.getLibraryLocation( aLibName );
-String aModName( GetName() );
+OUString aModName( GetName() );
 String aLibSubName;
 if( xBasic.Is() && aDocument.isInVBAMode() && XModule().Is() )
 {
@@ -1355,7 +1355,7 @@
 ModuleInfoHelper::getObjectName( xLib, aModName, sObjName 
);
 if( !sObjName.isEmpty() )
 {
-aModName.AppendAscii(" 
(").Append(sObjName).AppendAscii(")");
+aModName += " (" + sObjName + ")";
 }
 }
 break;
diff --git a/connectivity/source/drivers/dbase/DIndex.cxx 
b/connectivity/source/drivers/dbase/DIndex.cxx
index 0cb4630..1e70a5c 100644
--- a/connectivity/source/drivers/dbase/DIndex.cxx
+++ b/connectivity/source/drivers/dbase/DIndex.cxx
@@ -509,16 +509,15 @@
 aName = getString(xCol->getFastPropertyValue(PROPERTY_ID_NAME));
 
 const String 
aQuote(m_pTable->getConnection()->getMetaData()->getIdentifierQuoteString());
-String aStatement;
-aStatement.AssignAscii("SELECT ");
+OUString aStatement( "SELECT " );
 aStatement += aQuote;
 aStatement += aName;
 aStatement += aQuote;
-aStatement.AppendAscii(" FROM ");
+aStatement += " FROM ";
 aStatement += aQuote;
 aStatement += m_pTable->getName().getStr();
 aStatement += aQuote;
-aStatement.AppendAscii(" ORDER BY ");
+aStatement += " ORDER BY ";
 aStatement += aQuote;
 aStatement += aName;
 aStatement += aQuote;
diff --git a/connectivity/source/drivers/dbase/DTable.cxx 
b/connectivity/source/drivers/dbase/DTable.cxx
index ee2d7df..386d802 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -2318,8 +2318,8 @@
 aURL.SetURL(aName);
 
 aURL.setExtension( _sExtension );
-String sNewName(newName);
-sNewName.AppendAscii(".");
+OUString sNewName(newName);
+sNewName += ".";
 sNewName += _sExtension;
 
 try
diff --git a/cui/source/dialogs/hyphen.cxx b/cui/source/dialogs/hyphen.cxx
index 82bef8d..26326647 100644
--- a/cui/source/dialogs/hyphen.cxx
+++ b/cui/source/dialogs/hyphen.cxx
@@ -521,10 +521,10 @@
 void SvxHyphenWordDialog::SetWindowTitle( LanguageType nLang )
 {
 String aLangStr( SvtLanguageTable::GetLanguageString( nLang ) );
-String aTmp( aLabel );
-aTmp.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " (" ) );
-aTmp.Append( aLangStr );
-aTmp.Append( sal_Unicode( ')' ) );
+OUString aTmp( aLabel );
+aTmp += " (";
+aTmp += aLangStr;
+aTmp += ")";
 SetText( aTmp );
 }
 
diff --git a/cui/source/dialogs/postdlg.cxx b/cui/source/dialogs/postdlg.cxx
index cec8c01..4e2465e 100644
--- a/cui/source/dialogs/postdlg.cxx
+++ b/cui/source/dialogs/postdlg.cxx
@@ -134,8 +134,8 @@
 
 void SvxPostItDialog::ShowLastAuthor(const String& rAuthor, const String& 
rDate)
 {
-String sTxt( rAuthor );
-sTxt.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ", " ) );
+OUString sTxt( rAuthor );
+sTxt += ", ";
 sTxt += rDate;
 m_pLastEditFT->SetText( sTxt );
 }
@@ -187,23 +187,23 @@
 Time aTime( Time::SYSTEM );
 String aTmp( SvtUserOptions().GetID() );
 const LocaleDataWrapper& rLocaleWrapper( 
Application::GetSettings().GetLocaleDataWrapper() );
-String aStr( m_pEditED->GetText() );
-aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "\n " ) );
+OUString aStr( m_pEditED->GetText() );
+aStr += "\n ";
 
 if ( aTmp.Len() > 0 )
 {
 aStr += aTmp;
-aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ", " ) );
+aStr += ", ";
 }
 aStr += rLocaleWrapper.getDate(aDate);
-aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ", " ) );
+aStr += ", ";
 aStr += rLocaleWrapper.getTime(aTime, sal_False, sal_False);
-aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " \n" ) );
+aStr += " \n";
 
 aStr = convertLineEnd(aStr, GetSystemLineEnd());
 
   

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

2013-03-22 Thread Eike Rathke
 basic/source/runtime/methods.cxx |   17 ++---
 1 file changed, 14 insertions(+), 3 deletions(-)

New commits:
commit e8638ad5a7196ea79d90415b86a99a4c9f110a5e
Author: Eike Rathke 
Date:   Fri Mar 22 17:42:20 2013 +0100

in Val() check status after stringToDouble()

instead of calling checkArithmeticOverflow()

Change-Id: I2e3307ee054db77bab0a106d886823dba9e56ea8

diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 0318b82..76c8dd9 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -1782,9 +1782,20 @@ RTLFUNC(Val)
 }
 else
 {
-// #57844 use localized function
-nResult = ::rtl::math::stringToDouble( aStr, '.', ',', NULL, NULL 
);
-checkArithmeticOverflow( nResult );
+rtl_math_ConversionStatus eStatus = rtl_math_ConversionStatus_Ok;
+sal_Int32 nParseEnd = 0;
+nResult = ::rtl::math::stringToDouble( aStr, '.', ',', &eStatus, 
&nParseEnd );
+if ( eStatus != rtl_math_ConversionStatus_Ok )
+StarBASIC::Error( SbERR_MATH_OVERFLOW );
+/* TODO: we should check whether all characters were parsed here,
+ * but earlier code silently ignored trailing nonsense such as "1x"
+ * resulting in 1 with the side effect that any alpha-only-string
+ * like "x" resulted in 0. Not changing that now (2013-03-22) as
+ * user macros may rely on it. */
+#if 0
+else if ( nParseEnd != aStr.getLength() )
+StarBASIC::Error( SbERR_CONVERSION );
+#endif
 }
 
 rPar.Get(0)->PutDouble( nResult );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - cppuhelper/inc cppuhelper/ZipPackage_cppuhelper_odk_headers.mk sw/inc sw/source

2013-03-22 Thread Michael Meeks
 cppuhelper/ZipPackage_cppuhelper_odk_headers.mk |1 
 cppuhelper/inc/cppuhelper/implbase13.hxx|  299 
 sw/inc/unotextcursor.hxx|   21 +
 sw/source/core/unocore/unoobj.cxx   |   62 
 sw/source/core/unocore/unoparagraph.cxx |3 
 5 files changed, 384 insertions(+), 2 deletions(-)

New commits:
commit 1d0c1d4b8298c52b226e5c39b4dd98f9ec38a222
Author: Michael Meeks 
Date:   Thu Mar 21 21:44:14 2013 +

implement part of XMultiPropertySet on SwXTextCursor.

Change-Id: I903f049a3bdba96a8e1ac613ca8b9443a062fe8f

diff --git a/sw/inc/unotextcursor.hxx b/sw/inc/unotextcursor.hxx
index 485a4df..d0b0dde 100644
--- a/sw/inc/unotextcursor.hxx
+++ b/sw/inc/unotextcursor.hxx
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -34,7 +35,7 @@
 #include 
 #include 
 
-#include 
+#include 
 
 #include 
 
@@ -47,10 +48,11 @@ struct SwPosition;
 class SwUnoCrsr;
 
 
-typedef ::cppu::WeakImplHelper12
+typedef ::cppu::WeakImplHelper13
 <   ::com::sun::star::lang::XServiceInfo
 ,   ::com::sun::star::beans::XPropertySet
 ,   ::com::sun::star::beans::XPropertyState
+,   ::com::sun::star::beans::XMultiPropertySet
 ,   ::com::sun::star::beans::XMultiPropertyStates
 ,   ::com::sun::star::container::XEnumerationAccess
 ,   ::com::sun::star::container::XContentEnumerationAccess
@@ -191,6 +193,21 @@ public:
 ::com::sun::star::lang::WrappedTargetException,
 ::com::sun::star::uno::RuntimeException);
 
+// XMultiPropertySet
+virtual void SAL_CALL setPropertyValues(
+const ::com::sun::star::uno::Sequence< ::rtl::OUString >& 
aPropertyNames,
+const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any 
>& aValues );
+virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > 
SAL_CALL
+getPropertyValues( const ::com::sun::star::uno::Sequence< 
::rtl::OUString >& aPropertyNames );
+virtual void SAL_CALL addPropertiesChangeListener(
+const ::com::sun::star::uno::Sequence< ::rtl::OUString >& 
aPropertyNames,
+const ::com::sun::star::uno::Reference< 
css::beans::XPropertiesChangeListener >& xListener );
+virtual void SAL_CALL removePropertiesChangeListener(
+const ::com::sun::star::uno::Reference< 
css::beans::XPropertiesChangeListener >& xListener );
+virtual void SAL_CALL firePropertiesChangeEvent(
+const ::com::sun::star::uno::Sequence< ::rtl::OUString >& 
aPropertyNames,
+const ::com::sun::star::uno::Reference< 
css::beans::XPropertiesChangeListener >& xListener );
+
 // XMultiPropertyStates
 virtual void SAL_CALL setAllPropertiesToDefault()
 throw (::com::sun::star::uno::RuntimeException);
diff --git a/sw/source/core/unocore/unoobj.cxx 
b/sw/source/core/unocore/unoobj.cxx
index 75b7f0b..91b30f5 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -2332,6 +2332,68 @@ throw (beans::UnknownPropertyException, 
lang::WrappedTargetException,
 return getPropertyDefaults ( aSequence ).getConstArray()[0];
 }
 
+void SAL_CALL SwXTextCursor::setPropertyValues(
+const uno::Sequence< ::rtl::OUString >& aPropertyNames,
+const uno::Sequence< uno::Any >& aValues )
+{
+if( aValues.getLength() != aPropertyNames.getLength() )
+{
+OSL_FAIL( "mis-matched property value sequences" );
+throw lang::IllegalArgumentException();
+}
+
+SolarMutexGuard aGuard;
+
+SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
+
+// a little lame to have to copy into this.
+uno::Sequence< beans::PropertyValue > aPropertyValues( aValues.getLength() 
);
+for ( sal_Int32 i = 0; i < aPropertyNames.getLength(); i++ )
+{
+if ( aPropertyNames[ i ].equalsAsciiL(
+SW_PROP_NAME(UNO_NAME_IS_SKIP_HIDDEN_TEXT)) ||
+ aPropertyNames[ i ].equalsAsciiL(
+SW_PROP_NAME(UNO_NAME_IS_SKIP_PROTECTED_TEXT)) )
+{
+// the behaviour of these is hard to model in a group
+OSL_ASSERT("invalid property name for batch setting");
+throw lang::IllegalArgumentException();
+}
+aPropertyValues[ i ].Name = aPropertyNames[ i ];
+aPropertyValues[ i ].Value = aValues[ i ];
+}
+SwUnoCursorHelper::SetPropertyValues( rUnoCursor, m_pImpl->m_rPropSet, 
aPropertyValues );
+}
+
+uno::Sequence< uno::Any > SAL_CALL
+SwXTextCursor::getPropertyValues( const uno::Sequence< ::rtl::OUString >& 
aPropertyNames )
+{
+// a banal implementation for now
+uno::Sequence< uno::Any > aValues( aPropertyNames.getLength() );
+for (sal_Int32 i = 0; i < aPropertyNames.getLength(); i++)
+aValues[i] = getPropertyValue( aPropertyNames[ i ] );
+return aValues;
+}
+
+void SAL_CALL SwXTextCursor::addPropertiesChangeListener(
+const uno::Sequence< ::rtl::OUString >& /* aPropertyNames */,
+

[PUSHED libreoffice-4-0] Template Manager: fixed control WinBits reset... was breakin...

2013-03-22 Thread Petr Mladek (via Code Review)
Hi,

Thank you for your patch!  It has been merged to LibreOffice.

If you are interested in details, please visit

https://gerrit.libreoffice.org/2909

Approvals:
  Petr Mladek: Verified; Looks good to me, approved


-- 
To view, visit https://gerrit.libreoffice.org/2909
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I6e542ecc0e0f5a2b3e0ca59a52bb809b1a23284f
Gerrit-PatchSet: 2
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Bosdonnat Cedric 
Gerrit-Reviewer: Petr Mladek 

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


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

2013-03-22 Thread Cédric Bosdonnat
 sfx2/source/doc/templatedlg.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 617b885df741da12535b14798ee101872476f7bc
Author: Cédric Bosdonnat 
Date:   Wed Mar 20 16:03:29 2013 +0100

Template Manager: fixed control WinBits reset... was breaking tabstop

Change-Id: I6e542ecc0e0f5a2b3e0ca59a52bb809b1a23284f
(cherry picked from commit 5fa5f95612c53511fb951660b4ad397321e8)
Reviewed-on: https://gerrit.libreoffice.org/2909
Reviewed-by: Petr Mladek 
Tested-by: Petr Mladek 

diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index e9f85eb..b9d3945 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -163,7 +163,7 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg (Window 
*parent)
 
mpSearchEdit->SetUpdateDataHdl(LINK(this,SfxTemplateManagerDlg,SearchUpdateHdl));
 mpSearchEdit->EnableUpdateData();
 
-maView->SetStyle(WB_VSCROLL);
+maView->SetStyle(maView->GetStyle() | WB_VSCROLL);
 maView->setItemMaxTextLength(TEMPLATE_ITEM_MAX_TEXT_LENGTH);
 
 
maView->setItemDimensions(TEMPLATE_ITEM_MAX_WIDTH,TEMPLATE_ITEM_THUMBNAIL_MAX_HEIGHT,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[PUSHED libreoffice-4-0] Template Manager: select first item when getting focus if no...

2013-03-22 Thread Michael Meeks (via Code Review)
Hi,

Thank you for your patch!  It has been merged to LibreOffice.

If you are interested in details, please visit

https://gerrit.libreoffice.org/2910

Approvals:
  Michael Meeks: Verified; Looks good to me, approved


-- 
To view, visit https://gerrit.libreoffice.org/2910
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie012e010ca92728725535345c76fc9f5eb31a254
Gerrit-PatchSet: 2
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Bosdonnat Cedric 
Gerrit-Reviewer: Michael Meeks 

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


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

2013-03-22 Thread Cédric Bosdonnat
 sfx2/source/control/thumbnailview.cxx |   19 ++-
 1 file changed, 18 insertions(+), 1 deletion(-)

New commits:
commit 8396ef6b53bc2363aff158be34eeb93cd21fc2be
Author: Cédric Bosdonnat 
Date:   Wed Mar 20 17:06:31 2013 +0100

Template Manager: select first item when getting focus if no selection

Change-Id: Ie012e010ca92728725535345c76fc9f5eb31a254
(cherry picked from commit ec2f84b376f595b0553297d25b7716f6b97e1b87)
Reviewed-on: https://gerrit.libreoffice.org/2910
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 

diff --git a/sfx2/source/control/thumbnailview.cxx 
b/sfx2/source/control/thumbnailview.cxx
index c996f0f..57dba07 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -579,12 +579,29 @@ void ThumbnailView::Paint( const Rectangle &aRect)
 
 void ThumbnailView::GetFocus()
 {
-Control::GetFocus();
+// Select the first item if nothing selected
+int nSelected = -1;
+for (size_t i = 0, n = mItemList.size(); i < n && nSelected == -1; ++i)
+{
+if (mItemList[i]->isSelected())
+nSelected = i;
+}
+
+if ( nSelected == -1 && mItemList.size( ) > 0 )
+{
+mItemList[0]->setSelection(true);
+maItemStateHdl.Call(mItemList[0]);
+
+if (IsReallyVisible() && IsUpdateMode())
+Invalidate();
+}
 
 // Tell the accessible object that we got the focus.
 ThumbnailViewAcc* pAcc = ThumbnailViewAcc::getImplementation( 
GetAccessible( sal_False ) );
 if( pAcc )
 pAcc->GetFocus();
+
+Control::GetFocus();
 }
 
 void ThumbnailView::LoseFocus()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-03-22 Thread Miklos Vajna
 sw/qa/extras/odfexport/data/fdo60769.odt |binary
 sw/qa/extras/odfexport/odfexport.cxx |   28 
 sw/source/core/unocore/unoportenum.cxx   |   12 
 xmloff/source/text/txtparae.cxx  |   20 
 4 files changed, 52 insertions(+), 8 deletions(-)

New commits:
commit 7aa93e2c7c17e11f612bd4313e7c819aa49a9f26
Author: Miklos Vajna 
Date:   Wed Mar 20 10:39:08 2013 +0100

fdo#60769 implement odf export of multi-paragraph comment ranges

(cherry picked from commits 287c254d5ebf9b58ca63a8c271e523adf0d34b82 and
1fba17854b2be4fdbe436f44da3ae57a1f75a27c)

Conflicts:
sw/qa/extras/odfexport/odfexport.cxx

Reviewed-on: https://gerrit.libreoffice.org/2873
Reviewed-by: Noel Power 
Tested-by: Noel Power 

(cherry picked from commit 473cd59a71706ada01f8be68c7dfd008ca9bb716)

Change-Id: Ic4a5a1bc685917f2b26be4ab645203f706719c80
Reviewed-on: https://gerrit.libreoffice.org/2908
Reviewed-by: Michael Meeks 
Reviewed-by: Fridrich Strba 
Reviewed-by: Petr Mladek 
Tested-by: Petr Mladek 

diff --git a/sw/qa/extras/odfexport/data/fdo60769.odt 
b/sw/qa/extras/odfexport/data/fdo60769.odt
new file mode 100644
index 000..b3c3937
Binary files /dev/null and b/sw/qa/extras/odfexport/data/fdo60769.odt differ
diff --git a/sw/qa/extras/odfexport/odfexport.cxx 
b/sw/qa/extras/odfexport/odfexport.cxx
index 7d93b3b..1252fe9 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -33,6 +33,7 @@ class Test : public SwModelTestBase
 public:
 void testFdo38244();
 void testFirstHeaderFooter();
+void testFdo60769();
 
 CPPUNIT_TEST_SUITE(Test);
 #if !defined(MACOSX) && !defined(WNT)
@@ -49,6 +50,7 @@ void Test::run()
 MethodEntry aMethods[] = {
 {"fdo38244.odt", &Test::testFdo38244},
 {"first-header-footer.odt", &Test::testFirstHeaderFooter},
+{"fdo60769.odt", &Test::testFdo60769},
 };
 for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i)
 {
@@ -116,6 +118,32 @@ void Test::testFirstHeaderFooter()
 CPPUNIT_ASSERT_EQUAL(OUString("Left footer2"),  
parseDump("/root/page[6]/footer/txt/text()"));
 }
 
+void Test::testFdo60769()
+{
+// Test multi-paragraph comment range feature.
+uno::Reference xTextDocument(mxComponent, 
uno::UNO_QUERY);
+uno::Reference 
xParaEnumAccess(xTextDocument->getText(), uno::UNO_QUERY);
+uno::Reference xParaEnum = 
xParaEnumAccess->createEnumeration();
+uno::Reference 
xRunEnumAccess(xParaEnum->nextElement(), uno::UNO_QUERY);
+uno::Reference xRunEnum = 
xRunEnumAccess->createEnumeration();
+while (xRunEnum->hasMoreElements())
+{
+uno::Reference 
xPropertySet(xRunEnum->nextElement(), uno::UNO_QUERY);
+OUString aType =  getProperty(xPropertySet, 
"TextPortionType");
+// First paragraph: no field end, no anchor
+CPPUNIT_ASSERT(aType == "Text" || aType == "TextFieldStart");
+}
+
+xRunEnumAccess.set(xParaEnum->nextElement(), uno::UNO_QUERY);
+while (xRunEnum->hasMoreElements())
+{
+uno::Reference 
xPropertySet(xRunEnum->nextElement(), uno::UNO_QUERY);
+OUString aType =  getProperty(xPropertySet, 
"TextPortionType");
+// Second paragraph: no field start
+CPPUNIT_ASSERT(aType == "Text" || aType == "TextFieldEnd" || aType == 
"TextFieldEnd");
+}
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(Test);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/core/unocore/unoportenum.cxx 
b/sw/source/core/unocore/unoportenum.cxx
index d05b8f5..2829d3f 100644
--- a/sw/source/core/unocore/unoportenum.cxx
+++ b/sw/source/core/unocore/unoportenum.cxx
@@ -754,6 +754,18 @@ lcl_ExportHints(
 Reference xField =
 SwXTextField::CreateSwXTextField(*pDoc, 
pAttr->GetFld());
 pPortion->SetTextField(xField);
+
+// If this is a postit field and it has a fieldmark
+// associated, set the fieldmark as a bookmark.
+const SwField* pField = pAttr->GetFld().GetFld();
+if (pField->Which() == RES_POSTITFLD)
+{
+const SwPostItField* pPostItField = 
dynamic_cast(pField);
+IDocumentMarkAccess* pMarkAccess = 
pDoc->getIDocumentMarkAccess();
+IDocumentMarkAccess::const_iterator_t it = 
pMarkAccess->findMark(pPostItField->GetName());
+if (it != pMarkAccess->getMarksEnd())
+
pPortion->SetBookmark(SwXFieldmark::CreateXFieldmark(*pDoc, *it->get()));
+}
 }
 break;
 case RES_TXTATR_FLYCNT   :
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index 96cb842..36f7f0c 100644
--- a/xmlo

[PATCH libreoffice-4-0] fdo#61390: Fixed the tabstop in the TemplateView.

2013-03-22 Thread Bosdonnat Cedric (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/2913

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/13/2913/1

fdo#61390: Fixed the tabstop in the TemplateView.

Change-Id: I887b11646efb9a839da11cd3e20cdf7e532caf3e
(cherry picked from commit 7a25aa2821ccf7318ce4a13efe171763989009d5)
---
M sfx2/inc/sfx2/templateview.hxx
M sfx2/source/control/templateabstractview.cxx
M sfx2/source/control/templateview.cxx
M sfx2/source/control/templateview.src
4 files changed, 13 insertions(+), 20 deletions(-)



diff --git a/sfx2/inc/sfx2/templateview.hxx b/sfx2/inc/sfx2/templateview.hxx
index 3e2a7c8..e219905 100644
--- a/sfx2/inc/sfx2/templateview.hxx
+++ b/sfx2/inc/sfx2/templateview.hxx
@@ -51,7 +51,6 @@
 private:
 TemplateAbstractView* mpMasterView;
 
-ControlmaButtons;
 PushButton maAllButton;
 FixedText  maFTName;
 sal_uInt16 mnId;
diff --git a/sfx2/source/control/templateabstractview.cxx 
b/sfx2/source/control/templateabstractview.cxx
index de2091f..14ab811 100644
--- a/sfx2/source/control/templateabstractview.cxx
+++ b/sfx2/source/control/templateabstractview.cxx
@@ -114,7 +114,7 @@
 
 TemplateAbstractView::TemplateAbstractView (Window *pParent, WinBits 
nWinStyle, bool bDisableTransientChildren)
 : ThumbnailView(pParent,nWinStyle,bDisableTransientChildren),
-  mpItemView(new TemplateView(this)),
+  mpItemView(new TemplateView(pParent)),
   mbFilteredResults(false),
   meFilterOption(FILTER_APP_WRITER)
 {
@@ -123,7 +123,7 @@
 
 TemplateAbstractView::TemplateAbstractView(Window *pParent, const ResId 
&rResId, bool bDisableTransientChildren)
 : ThumbnailView(pParent,rResId,bDisableTransientChildren),
-  mpItemView(new TemplateView(this)),
+  mpItemView(new TemplateView(pParent)),
   mbFilteredResults(false),
   meFilterOption(FILTER_APP_WRITER)
 {
@@ -190,8 +190,14 @@
 
 void TemplateAbstractView::showOverlay (bool bVisible)
 {
+Show(!bVisible);
 mpItemView->Show(bVisible);
 
+mpItemView->SetPosSizePixel(GetPosPixel(), GetSizePixel());
+mpItemView->SetStyle(GetStyle());
+
+mpItemView->GrabFocus();
+
 // Clear items is the overlay is closed.
 if (!bVisible)
 {
diff --git a/sfx2/source/control/templateview.cxx 
b/sfx2/source/control/templateview.cxx
index 615465d..46ebeaa 100644
--- a/sfx2/source/control/templateview.cxx
+++ b/sfx2/source/control/templateview.cxx
@@ -34,14 +34,13 @@
 using namespace drawinglayer::primitive2d;
 
 TemplateView::TemplateView (Window *pParent)
-: ThumbnailView(pParent,WB_VSCROLL),
+: ThumbnailView(pParent,WB_VSCROLL | WB_TABSTOP),
   mpMasterView(NULL),
-  maButtons(this, SfxResId(CONTROL_BUTTONS)),
-  maAllButton(&maButtons, SfxResId(BTN_ALL_TEMPLATES)),
-  maFTName(&maButtons, SfxResId(FT_NAME)),
+  maAllButton(this, SfxResId(BTN_ALL_TEMPLATES)),
+  maFTName(this, SfxResId(FT_NAME)),
   mnId(0)
 {
-mnHeaderHeight = maButtons.GetSizePixel().getHeight();
+mnHeaderHeight = maAllButton.GetSizePixel().getHeight() + 
maAllButton.GetPosPixel().Y() * 2;
 maAllButton.SetStyle(maAllButton.GetStyle() | WB_FLATBUTTON);
 }
 
@@ -88,13 +87,8 @@
 Size aWinSize = GetOutputSize();
 
 // Set the buttons panel and buttons size
-Size aPanelSize = maButtons.GetSizePixel();
-int nDeltaW = aWinSize.getWidth() - aPanelSize.getWidth();
-aPanelSize.setWidth(aWinSize.getWidth());
-maButtons.SetSizePixel(aPanelSize);
-
 Size aNameSize = maFTName.GetSizePixel();
-aNameSize.setWidth(aNameSize.getWidth() + nDeltaW);
+aNameSize.setWidth( aWinSize.getWidth() - maFTName.GetPosPixel().X());
 maFTName.SetSizePixel(aNameSize);
 
 ThumbnailView::Resize();
diff --git a/sfx2/source/control/templateview.src 
b/sfx2/source/control/templateview.src
index db4d575..8549c96 100644
--- a/sfx2/source/control/templateview.src
+++ b/sfx2/source/control/templateview.src
@@ -8,12 +8,6 @@
 
 #include "templateview.hrc"
 
-Control CONTROL_BUTTONS
-{
-Size = MAP_APPFONT( 290, 17 );
-TabStop = False;
-};
-
 PushButton BTN_ALL_TEMPLATES
 {
 Pos = MAP_APPFONT( 1, 1 );

-- 
To view, visit https://gerrit.libreoffice.org/2913
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I887b11646efb9a839da11cd3e20cdf7e532caf3e
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Bosdonnat Cedric 

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


[PATCH libreoffice-4-0] fdo#61390: simple keybard support in TemplateManager

2013-03-22 Thread Bosdonnat Cedric (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/2912

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/12/2912/1

fdo#61390: simple keybard support in TemplateManager

Adds support for the UP, DOWN, LEFT, RIGHT and RETURN keys in the
thumbnails view but doesn't handle the modifiers yet. There are still
some problems with the focus and key input outside the top level

(cherry picked from commit ee819bdd2dab5756cc3bad74f24e50bd7409f308)

Conflicts:
sfx2/source/control/thumbnailview.cxx

Change-Id: I5ba67583c835bcc00b075071411c0d6590a07f9a
---
M sfx2/inc/sfx2/thumbnailview.hxx
M sfx2/source/control/thumbnailview.cxx
2 files changed, 104 insertions(+), 7 deletions(-)



diff --git a/sfx2/inc/sfx2/thumbnailview.hxx b/sfx2/inc/sfx2/thumbnailview.hxx
index efc5e78..95e6b53 100644
--- a/sfx2/inc/sfx2/thumbnailview.hxx
+++ b/sfx2/inc/sfx2/thumbnailview.hxx
@@ -202,6 +202,8 @@
 
 void SelectItem( sal_uInt16 nItemId );
 
+void DeselectItem( sal_uInt16 nItemId );
+
 bool IsItemSelected( sal_uInt16 nItemId ) const;
 
 void deselectItem (const sal_uInt16 nItemId);
@@ -239,6 +241,8 @@
 
 protected:
 
+virtual void KeyInput( const KeyEvent& rKEvt );
+
 virtual void MouseButtonDown( const MouseEvent& rMEvt );
 
 virtual void MouseButtonUp( const MouseEvent& rMEvt );
@@ -272,8 +276,6 @@
 using Control::ImplInitSettings;
 using Window::ImplInit;
 
-void calculateColumnsRows ();
-
 void CalculateItemPositions ();
 
 SFX2_DLLPRIVATE void ImplInit();
@@ -294,6 +296,7 @@
 protected:
 
 ValueItemList mItemList;
+ValueItemList mFilteredItemList; ///< Cache to store the filtered items
 ScrollBar* mpScrBar;
 Rectangle maItemListRect;
 long mnHeaderHeight;
diff --git a/sfx2/source/control/thumbnailview.cxx 
b/sfx2/source/control/thumbnailview.cxx
index 63ba189..f78a308 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -214,6 +214,8 @@
 WinBits nStyle = GetStyle();
 ScrollBar*  pDelScrBar = NULL;
 
+mFilteredItemList.clear();
+
 // consider the scrolling
 if ( nStyle & WB_VSCROLL )
 ImplInitScrollBar();
@@ -298,6 +300,7 @@
 
 if (maFilterFunc(pItem))
 {
+mFilteredItemList.push_back(pItem);
 if ((nCurCount >= nFirstItem) && (nCurCount < nLastItem))
 {
 if( !pItem->isVisible())
@@ -490,6 +493,73 @@
 return 0;
 }
 
+void ThumbnailView::KeyInput( const KeyEvent& rKEvt )
+{
+// Get the last selected item in the list
+size_t nLastPos = 0;
+bool bFoundLast = false;
+for ( long i = mFilteredItemList.size() - 1; !bFoundLast && i >= 0; --i )
+{
+ThumbnailViewItem* pItem = mFilteredItemList[i];
+if ( pItem->isSelected() )
+{
+nLastPos = i;
+bFoundLast = true;
+}
+}
+
+KeyCode aKeyCode = rKEvt.GetKeyCode();
+ThumbnailViewItem* pNext = NULL;
+switch ( aKeyCode.GetCode() )
+{
+case KEY_RIGHT:
+{
+size_t nNextPos = nLastPos;
+if ( bFoundLast && nLastPos < mFilteredItemList.size( ) - 1 )
+nNextPos = nLastPos + 1;
+pNext = mFilteredItemList[nNextPos];
+}
+break;
+case KEY_LEFT:
+{
+size_t nNextPos = nLastPos;
+if ( nLastPos > 0 )
+nNextPos = nLastPos - 1;
+pNext = mFilteredItemList[nNextPos];
+}
+break;
+case KEY_DOWN:
+{
+size_t nNextPos = nLastPos;
+if ( bFoundLast && nLastPos < mFilteredItemList.size( ) - 
mnCols )
+nNextPos = nLastPos + mnCols;
+pNext = mFilteredItemList[nNextPos];
+}
+break;
+case KEY_UP:
+{
+size_t nNextPos = nLastPos;
+if ( nLastPos >= mnCols )
+nNextPos = nLastPos - mnCols;
+pNext = mFilteredItemList[nNextPos];
+}
+break;
+case KEY_RETURN:
+{
+if ( bFoundLast )
+OnItemDblClicked( mFilteredItemList[nLastPos] );
+}
+default:
+Control::KeyInput( rKEvt );
+}
+
+if ( pNext && pNext->isVisible() )
+{
+deselectItems();
+SelectItem(pNext->mnId);
+}
+}
+
 void ThumbnailView::MouseButtonDown( const MouseEvent& rMEvt )
 {
 if ( rMEvt.IsLeft() )
@@ -500,12 +570,17 @@
 {
 if ( rMEvt.GetClicks() == 1 )
 {
-if (!pItem->isSelected() && !rMEvt.IsMod1())
-deselectItems( );
-pItem->setSelection(true);
+if (pItem->isSelected() && rMEvt.IsMod1())
+DeselectItem( pItem->mnId

[PATCH libreoffice-4-0] Template Manager: removed some dead selection code

2013-03-22 Thread Bosdonnat Cedric (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/2911

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/11/2911/1

Template Manager: removed some dead selection code

(cherry picked from commit bfd1bcb204ed3ca35df1455a346a0ee7254a1191)

Conflicts:
sfx2/source/control/thumbnailview.cxx

Change-Id: Ib5ebcd928e77a115f4f62a50724656c33ae13c61
---
M sfx2/inc/sfx2/thumbnailview.hxx
M sfx2/source/control/thumbnailview.cxx
M sfx2/source/control/thumbnailviewacc.cxx
3 files changed, 24 insertions(+), 111 deletions(-)



diff --git a/sfx2/inc/sfx2/thumbnailview.hxx b/sfx2/inc/sfx2/thumbnailview.hxx
index 8eb9426..efc5e78 100644
--- a/sfx2/inc/sfx2/thumbnailview.hxx
+++ b/sfx2/inc/sfx2/thumbnailview.hxx
@@ -202,10 +202,7 @@
 
 void SelectItem( sal_uInt16 nItemId );
 
-sal_uInt16 GetSelectItemId() const { return mnSelItemId; }
-
-bool IsItemSelected( sal_uInt16 nItemId ) const
-{ return nItemId == mnSelItemId; }
+bool IsItemSelected( sal_uInt16 nItemId ) const;
 
 void deselectItem (const sal_uInt16 nItemId);
 
@@ -258,8 +255,6 @@
 
 virtual void DataChanged( const DataChangedEvent& rDCEvt );
 
-virtual bool StartDrag( const CommandEvent& rCEvt, Region& rRegion );
-
 virtual ::com::sun::star::uno::Reference< 
::com::sun::star::accessibility::XAccessible > CreateAccessible();
 
 protected:
@@ -310,7 +305,6 @@
 long mnVisLines;
 long mnLines;
 sal_uInt16 mnScrBarOffset;
-sal_uInt16 mnSelItemId;
 sal_uInt16 mnHighItemId;
 sal_uInt16 mnCols;
 sal_uInt16 mnFirstLine;
diff --git a/sfx2/source/control/thumbnailview.cxx 
b/sfx2/source/control/thumbnailview.cxx
index 57dba07..63ba189 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -92,7 +92,6 @@
 mnLines = 0;
 mnFirstLine = 0;
 mnScrBarOffset = 1;
-mnSelItemId = 0;
 mnHighItemId= 0;
 mnCols  = 0;
 mnSpacing   = 0;
@@ -589,11 +588,7 @@
 
 if ( nSelected == -1 && mItemList.size( ) > 0 )
 {
-mItemList[0]->setSelection(true);
-maItemStateHdl.Call(mItemList[0]);
-
-if (IsReallyVisible() && IsUpdateMode())
-Invalidate();
+SelectItem( 1 );
 }
 
 // Tell the accessible object that we got the focus.
@@ -710,10 +705,9 @@
 }
 
 // reset variables
-if ( (mnHighItemId == nItemId) || (mnSelItemId == nItemId) )
+if ( (mnHighItemId == nItemId) )
 {
 mnHighItemId= 0;
-mnSelItemId = 0;
 }
 
 CalculateItemPositions();
@@ -729,7 +723,6 @@
 // reset variables
 mnFirstLine = 0;
 mnHighItemId= 0;
-mnSelItemId = 0;
 
 CalculateItemPositions();
 
@@ -777,19 +770,18 @@
 
 void ThumbnailView::SelectItem( sal_uInt16 nItemId )
 {
-size_t nItemPos = 0;
+size_t nItemPos = GetItemPos( nItemId );
+if ( nItemPos == THUMBNAILVIEW_ITEM_NOTFOUND )
+return;
 
-if ( nItemId )
+ThumbnailViewItem* pItem = mItemList[nItemPos];
+if (!pItem->isSelected())
 {
-nItemPos = GetItemPos( nItemId );
-if ( nItemPos == THUMBNAILVIEW_ITEM_NOTFOUND )
-return;
-}
+mItemList[nItemPos]->setSelection(true);
+maItemStateHdl.Call(mItemList[nItemPos]);
 
-if ( mnSelItemId != nItemId)
-{
-sal_uInt16 nOldItem = mnSelItemId ? mnSelItemId : 1;
-mnSelItemId = nItemId;
+if (IsReallyVisible() && IsUpdateMode())
+Invalidate();
 
 bool bNewOut = IsReallyVisible() && IsUpdateMode();
 
@@ -815,44 +807,8 @@
 
 if( ImplHasAccessibleListeners() )
 {
-// focus event (deselect)
-if( nOldItem )
-{
-const size_t nPos = GetItemPos( nItemId );
-
-if( nPos != THUMBNAILVIEW_ITEM_NOTFOUND )
-{
-ThumbnailViewAcc* pItemAcc = 
ThumbnailViewAcc::getImplementation(
-mItemList[nPos]->GetAccessible( 
mbIsTransientChildrenDisabled ) );
-
-if( pItemAcc )
-{
-::com::sun::star::uno::Any aOldAny, aNewAny;
-if( !mbIsTransientChildrenDisabled )
-{
-aOldAny <<= ::com::sun::star::uno::Reference< 
::com::sun::star::uno::XInterface >(
-static_cast< ::cppu::OWeakObject* >( pItemAcc 
));
-ImplFireAccessibleEvent 
(::com::sun::star::accessibility::AccessibleEventId::ACTIVE_DESCENDANT_CHANGED, 
aOldAny, aNewAny );
-}
-else
-{
-aOldAny <<= 
::com::sun::star::accessibility::AccessibleStateType::FOCUSED;
-pItemAcc->FireAccessibleEvent( 
::com::sun::star::accessibility::Acc

[PATCH libreoffice-4-0] Template Manager: select first item when getting focus if no...

2013-03-22 Thread Bosdonnat Cedric (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/2910

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/10/2910/1

Template Manager: select first item when getting focus if no selection

Change-Id: Ie012e010ca92728725535345c76fc9f5eb31a254
(cherry picked from commit ec2f84b376f595b0553297d25b7716f6b97e1b87)
---
M sfx2/source/control/thumbnailview.cxx
1 file changed, 18 insertions(+), 1 deletion(-)



diff --git a/sfx2/source/control/thumbnailview.cxx 
b/sfx2/source/control/thumbnailview.cxx
index c996f0f..57dba07 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -579,12 +579,29 @@
 
 void ThumbnailView::GetFocus()
 {
-Control::GetFocus();
+// Select the first item if nothing selected
+int nSelected = -1;
+for (size_t i = 0, n = mItemList.size(); i < n && nSelected == -1; ++i)
+{
+if (mItemList[i]->isSelected())
+nSelected = i;
+}
+
+if ( nSelected == -1 && mItemList.size( ) > 0 )
+{
+mItemList[0]->setSelection(true);
+maItemStateHdl.Call(mItemList[0]);
+
+if (IsReallyVisible() && IsUpdateMode())
+Invalidate();
+}
 
 // Tell the accessible object that we got the focus.
 ThumbnailViewAcc* pAcc = ThumbnailViewAcc::getImplementation( 
GetAccessible( sal_False ) );
 if( pAcc )
 pAcc->GetFocus();
+
+Control::GetFocus();
 }
 
 void ThumbnailView::LoseFocus()

-- 
To view, visit https://gerrit.libreoffice.org/2910
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie012e010ca92728725535345c76fc9f5eb31a254
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Bosdonnat Cedric 

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


[PATCH libreoffice-4-0] Template Manager: fixed control WinBits reset... was breakin...

2013-03-22 Thread Bosdonnat Cedric (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/2909

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/09/2909/1

Template Manager: fixed control WinBits reset... was breaking tabstop

Change-Id: I6e542ecc0e0f5a2b3e0ca59a52bb809b1a23284f
(cherry picked from commit 5fa5f95612c53511fb951660b4ad397321e8)
---
M sfx2/source/doc/templatedlg.cxx
1 file changed, 1 insertion(+), 1 deletion(-)



diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index e9f85eb..b9d3945 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -163,7 +163,7 @@
 
mpSearchEdit->SetUpdateDataHdl(LINK(this,SfxTemplateManagerDlg,SearchUpdateHdl));
 mpSearchEdit->EnableUpdateData();
 
-maView->SetStyle(WB_VSCROLL);
+maView->SetStyle(maView->GetStyle() | WB_VSCROLL);
 maView->setItemMaxTextLength(TEMPLATE_ITEM_MAX_TEXT_LENGTH);
 
 
maView->setItemDimensions(TEMPLATE_ITEM_MAX_WIDTH,TEMPLATE_ITEM_THUMBNAIL_MAX_HEIGHT,

-- 
To view, visit https://gerrit.libreoffice.org/2909
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6e542ecc0e0f5a2b3e0ca59a52bb809b1a23284f
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Bosdonnat Cedric 

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


[Libreoffice-commits] core.git: sfx2/inc sfx2/source

2013-03-22 Thread Cédric Bosdonnat
 sfx2/inc/sfx2/templateview.hxx   |1 -
 sfx2/source/control/templateabstractview.cxx |   10 --
 sfx2/source/control/templateview.cxx |   16 +---
 sfx2/source/control/templateview.src |6 --
 4 files changed, 13 insertions(+), 20 deletions(-)

New commits:
commit 7a25aa2821ccf7318ce4a13efe171763989009d5
Author: Cédric Bosdonnat 
Date:   Fri Mar 22 16:33:20 2013 +0100

fdo#61390: Fixed the tabstop in the TemplateView.

Change-Id: I887b11646efb9a839da11cd3e20cdf7e532caf3e

diff --git a/sfx2/inc/sfx2/templateview.hxx b/sfx2/inc/sfx2/templateview.hxx
index b7ff215..104cb11 100644
--- a/sfx2/inc/sfx2/templateview.hxx
+++ b/sfx2/inc/sfx2/templateview.hxx
@@ -54,7 +54,6 @@ private:
 Link maOpenHdl;
 TemplateAbstractView* mpMasterView;
 
-ControlmaButtons;
 PushButton maAllButton;
 FixedText  maFTName;
 sal_uInt16 mnId;
diff --git a/sfx2/source/control/templateabstractview.cxx 
b/sfx2/source/control/templateabstractview.cxx
index 737f087..b6cd646 100644
--- a/sfx2/source/control/templateabstractview.cxx
+++ b/sfx2/source/control/templateabstractview.cxx
@@ -115,7 +115,7 @@ bool ViewFilter_Keyword::operator ()(const 
ThumbnailViewItem *pItem)
 
 TemplateAbstractView::TemplateAbstractView (Window *pParent, WinBits 
nWinStyle, bool bDisableTransientChildren)
 : ThumbnailView(pParent,nWinStyle,bDisableTransientChildren),
-  mpItemView(new TemplateView(this)),
+  mpItemView(new TemplateView(pParent)),
   mbFilteredResults(false),
   meFilterOption(FILTER_APP_WRITER)
 {
@@ -124,7 +124,7 @@ TemplateAbstractView::TemplateAbstractView (Window 
*pParent, WinBits nWinStyle,
 
 TemplateAbstractView::TemplateAbstractView(Window *pParent, const ResId 
&rResId, bool bDisableTransientChildren)
 : ThumbnailView(pParent,rResId,bDisableTransientChildren),
-  mpItemView(new TemplateView(this)),
+  mpItemView(new TemplateView(pParent)),
   mbFilteredResults(false),
   meFilterOption(FILTER_APP_WRITER)
 {
@@ -186,8 +186,14 @@ void TemplateAbstractView::filterTemplatesByApp (const 
FILTER_APPLICATION &eApp)
 
 void TemplateAbstractView::showOverlay (bool bVisible)
 {
+Show(!bVisible);
 mpItemView->Show(bVisible);
 
+mpItemView->SetPosSizePixel(GetPosPixel(), GetSizePixel());
+mpItemView->SetStyle(GetStyle());
+
+mpItemView->GrabFocus();
+
 // Clear items is the overlay is closed.
 if (!bVisible)
 {
diff --git a/sfx2/source/control/templateview.cxx 
b/sfx2/source/control/templateview.cxx
index 21b2603..a19c8c5 100644
--- a/sfx2/source/control/templateview.cxx
+++ b/sfx2/source/control/templateview.cxx
@@ -34,14 +34,13 @@ using namespace drawinglayer::attribute;
 using namespace drawinglayer::primitive2d;
 
 TemplateView::TemplateView (Window *pParent)
-: ThumbnailView(pParent,WB_VSCROLL),
+: ThumbnailView(pParent,WB_VSCROLL | WB_TABSTOP),
   mpMasterView(NULL),
-  maButtons(this, SfxResId(CONTROL_BUTTONS)),
-  maAllButton(&maButtons, SfxResId(BTN_ALL_TEMPLATES)),
-  maFTName(&maButtons, SfxResId(FT_NAME)),
+  maAllButton(this, SfxResId(BTN_ALL_TEMPLATES)),
+  maFTName(this, SfxResId(FT_NAME)),
   mnId(0)
 {
-mnHeaderHeight = maButtons.GetSizePixel().getHeight();
+mnHeaderHeight = maAllButton.GetSizePixel().getHeight() + 
maAllButton.GetPosPixel().Y() * 2;
 maAllButton.SetStyle(maAllButton.GetStyle() | WB_FLATBUTTON);
 }
 
@@ -88,13 +87,8 @@ void TemplateView::Resize()
 Size aWinSize = GetOutputSize();
 
 // Set the buttons panel and buttons size
-Size aPanelSize = maButtons.GetSizePixel();
-int nDeltaW = aWinSize.getWidth() - aPanelSize.getWidth();
-aPanelSize.setWidth(aWinSize.getWidth());
-maButtons.SetSizePixel(aPanelSize);
-
 Size aNameSize = maFTName.GetSizePixel();
-aNameSize.setWidth(aNameSize.getWidth() + nDeltaW);
+aNameSize.setWidth( aWinSize.getWidth() - maFTName.GetPosPixel().X());
 maFTName.SetSizePixel(aNameSize);
 
 ThumbnailView::Resize();
diff --git a/sfx2/source/control/templateview.src 
b/sfx2/source/control/templateview.src
index 1f78a88..5836a95 100644
--- a/sfx2/source/control/templateview.src
+++ b/sfx2/source/control/templateview.src
@@ -9,12 +9,6 @@
 
 #include "templateview.hrc"
 
-Control CONTROL_BUTTONS
-{
-Size = MAP_APPFONT( 290, 17 );
-TabStop = False;
-};
-
 PushButton BTN_ALL_TEMPLATES
 {
 Pos = MAP_APPFONT( 1, 1 );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-03-22 Thread Tor Lillqvist
 vcl/source/window/syschild.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit a4b4942ff6d79394a3120cd1c55eb21a10769a30
Author: Tor Lillqvist 
Date:   Fri Mar 22 17:53:09 2013 +0200

Don't include Java-related headers when they aren't needed

Change-Id: Ia971f98c904b69ce126a03d4737833b8e9e57369

diff --git a/vcl/source/window/syschild.cxx b/vcl/source/window/syschild.cxx
index fee36d4..93086e9 100644
--- a/vcl/source/window/syschild.cxx
+++ b/vcl/source/window/syschild.cxx
@@ -42,9 +42,12 @@
 #endif
 
 #include 
+
+#ifdef SOLAR_JAVA
 #include 
 #include 
 #include 
+#endif
 
 using namespace ::com::sun::star;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[PUSHED libreoffice-4-0] fdo#62288 fix RTF import of table paragraph margins

2013-03-22 Thread Fridrich Strba (via Code Review)
Hi,

Thank you for your patch!  It has been merged to LibreOffice.

If you are interested in details, please visit

https://gerrit.libreoffice.org/2906

Approvals:
  Fridrich Strba: Verified; Looks good to me, approved


-- 
To view, visit https://gerrit.libreoffice.org/2906
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I5cbb1df72bf1211f85ef69ab64d5b46cbce5c742
Gerrit-PatchSet: 2
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Miklos Vajna 
Gerrit-Reviewer: Fridrich Strba 

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


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

2013-03-22 Thread Miklos Vajna
 sw/qa/extras/rtfimport/data/fdo62288.rtf   |   23 +++
 sw/qa/extras/rtfimport/rtfimport.cxx   |   15 +++
 writerfilter/source/rtftok/rtfdocumentimpl.cxx |9 +
 3 files changed, 47 insertions(+)

New commits:
commit cd8de6c4138d227a48d01b05212f5aaf53b67aab
Author: Miklos Vajna 
Date:   Fri Mar 22 11:08:12 2013 +0100

fdo#62288 fix RTF import of table paragraph margins

Regression from 4a507f732d82c188ad81b022cbe3037951e58ac3. The problem
was that in some cases \pard can't reset all paragraph properties. The
original commit just made this keyword a noop when it occurred between
\cell and \row, but this is too much. At least margins do need
resetting.

Change-Id: I5cbb1df72bf1211f85ef69ab64d5b46cbce5c742
(cherry picked from commit 24d5261f5a122e22675210445056cdf67663237b)
Reviewed-on: https://gerrit.libreoffice.org/2906
Reviewed-by: Fridrich Strba 
Tested-by: Fridrich Strba 

diff --git a/sw/qa/extras/rtfimport/data/fdo62288.rtf 
b/sw/qa/extras/rtfimport/data/fdo62288.rtf
new file mode 100644
index 000..f5ec592
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/fdo62288.rtf
@@ -0,0 +1,23 @@
+{\rtf1
+\paperw11907\paperh16840\margl567\margr567\margt567\margb567 
+\sb113\sa113
+{\b\fs22\cf1\kerning1\cgrid0 Objectives}
+{\fs24\kerning1\cgrid0 
+\par }
+\trowd \trgaph10\trleft-10 \clvertalt\cltxlrtb \cellx4808\clvertalt\cltxlrtb 
\cellx5375\clvertalt\cltxlrtb \cellx10194\clvertalt\cltxlrtb \cellx10762\pard 
\li567\nowidctlpar\intbl\adjustright 
+{\cf1\kerning1\cgrid0 One}
+{\fs24\kerning1\cgrid0 \cell }
+\pard \qc\nowidctlpar\intbl\adjustright 
+{\cf1\kerning1\cgrid0 [ ]}
+{\fs24\kerning1\cgrid0 \cell }
+\pard \li567\nowidctlpar\intbl\adjustright 
+{\cf1\kerning1\cgrid0 Two}
+{
+\fs24\kerning1\cgrid0 \cell }
+\pard \qc\nowidctlpar\intbl\adjustright 
+{\cf1\kerning1\cgrid0 [ ]}
+{\fs24\kerning1\cgrid0 \cell }
+\pard \widctlpar\intbl\adjustright 
+{\fs24\kerning1\cgrid0 \row }
+\pard\par
+}
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx 
b/sw/qa/extras/rtfimport/rtfimport.cxx
index 07583fc..e54812f 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -142,6 +142,7 @@ public:
 void testFdo59638();
 void testFdo60722();
 void testFdo61909();
+void testFdo62288();
 
 CPPUNIT_TEST_SUITE(Test);
 #if !defined(MACOSX) && !defined(WNT)
@@ -234,6 +235,7 @@ void Test::run()
 {"fdo59638.rtf", &Test::testFdo59638},
 {"fdo60722.rtf", &Test::testFdo60722},
 {"fdo61909.rtf", &Test::testFdo61909},
+{"fdo62288.rtf", &Test::testFdo62288},
 };
 for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i)
 {
@@ -1142,6 +1144,19 @@ void Test::testFdo61909()
 CPPUNIT_ASSERT_EQUAL(COL_AUTO, getProperty(xTextRange, 
"CharBackColor"));
 }
 
+void Test::testFdo62288()
+{
+uno::Reference xTextTablesSupplier(mxComponent, 
uno::UNO_QUERY);
+uno::Reference 
xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
+uno::Reference xTable(xTables->getByIndex(0), 
uno::UNO_QUERY);
+uno::Reference xCell(xTable->getCellByName("B1"), 
uno::UNO_QUERY);
+uno::Reference 
xParaEnumAccess(xCell->getText(), uno::UNO_QUERY);
+uno::Reference xParaEnum = 
xParaEnumAccess->createEnumeration();
+uno::Reference xPara(xParaEnum->nextElement(), 
uno::UNO_QUERY);
+// Margins were inherited from the previous cell, even there was a \pard 
there.
+CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty(xPara, 
"ParaLeftMargin"));
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(Test);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx 
b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 34b779d..3f18695 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -2172,11 +2172,20 @@ int RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
 // \pard is allowed between \cell and \row, but in that case it 
should not reset the fact that we're inside a table.
 if (m_aStates.top().nCells == 0)
 {
+// Reset everything.
 m_aStates.top().aParagraphSprms = 
m_aDefaultState.aParagraphSprms;
 m_aStates.top().aParagraphAttributes = 
m_aDefaultState.aParagraphAttributes;
 if (m_aStates.top().nDestinationState != DESTINATION_SHAPETEXT)
 m_pCurrentBuffer = 0;
 }
+else
+{
+// Reset only margins.
+lcl_eraseNestedAttribute(m_aStates.top().aParagraphSprms, 
NS_ooxml::LN_CT_PPrBase_spacing, NS_ooxml::LN_CT_Spacing_before);
+lcl_eraseNestedAttribute(m_aStates.top().aParagraphSprms, 
NS_ooxml::LN_CT_PPrBase_spacing, NS_ooxml::LN_CT_Spacing_after);
+m_aStates.top().aParagraphSprms.erase(NS_sprm::LN_PDxaLeft);
+m_aStates.top().

[Libreoffice-commits] core.git: Branch 'feature/formula-core-rework' - sc/inc sc/source

2013-03-22 Thread Kohei Yoshida
 sc/inc/cellvalue.hxx  |4 +
 sc/source/core/data/cellvalue.cxx |   18 +++
 sc/source/ui/docshell/docfunc.cxx |   89 +-
 sc/source/ui/inc/undocell.hxx |2 
 sc/source/ui/undo/undocell.cxx|   40 -
 5 files changed, 102 insertions(+), 51 deletions(-)

New commits:
commit 3e885b5972999d69c14a46bf2507471376760d09
Author: Kohei Yoshida 
Date:   Fri Mar 22 11:23:08 2013 -0400

Get change tracking to work again with these new ScDocFunc methods.

Change-Id: Icdbf2af7bc552bc8f4914cc8bd036ed45934c461

diff --git a/sc/inc/cellvalue.hxx b/sc/inc/cellvalue.hxx
index 409e178..ac96274 100644
--- a/sc/inc/cellvalue.hxx
+++ b/sc/inc/cellvalue.hxx
@@ -51,6 +51,10 @@ struct ScCellValue
 void commit( ScDocument& rDoc, const ScAddress& rPos );
 };
 
+// TODO: temporary workaround.  To be removed later.
+class ScBaseCell;
+ScBaseCell* getHackedBaseCell( ScDocument* pDoc, const ScCellValue& rVal );
+
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/cellvalue.cxx 
b/sc/source/core/data/cellvalue.cxx
index fe038ce..6a51c68 100644
--- a/sc/source/core/data/cellvalue.cxx
+++ b/sc/source/core/data/cellvalue.cxx
@@ -113,4 +113,22 @@ void ScCellValue::commit( ScDocument& rDoc, const 
ScAddress& rPos )
 }
 }
 
+ScBaseCell* getHackedBaseCell( ScDocument* pDoc, const ScCellValue& rVal )
+{
+switch (rVal.meType)
+{
+case CELLTYPE_STRING:
+return new ScStringCell(*rVal.mpString);
+case CELLTYPE_EDIT:
+return new ScEditCell(rVal.mpEditText->Clone(), pDoc);
+case CELLTYPE_VALUE:
+return new ScValueCell(rVal.mfValue);
+case CELLTYPE_FORMULA:
+return rVal.mpFormula->Clone();
+default:
+;
+}
+return NULL;
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/docshell/docfunc.cxx 
b/sc/source/ui/docshell/docfunc.cxx
index 70ca4c3..1bc8021 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -808,51 +808,6 @@ sal_Bool ScDocFunc::SetNormalString( bool& o_rbNumFmtSet, 
const ScAddress& rPos,
 return sal_True;
 }
 
-namespace {
-
-void pushUndoSetCell( ScDocShell& rDocShell, ScDocument* pDoc, const 
ScAddress& rPos, const ScCellValue& rNewVal )
-{
-svl::IUndoManager* pUndoMgr = rDocShell.GetUndoManager();
-switch (pDoc->GetCellType(rPos))
-{
-case CELLTYPE_NONE:
-case CELLTYPE_NOTE:
-// Empty cell.
-pUndoMgr->AddUndoAction(new ScUndoSetCell(&rDocShell, rPos, 
rNewVal));
-break;
-case CELLTYPE_VALUE:
-{
-double fOldVal = pDoc->GetValue(rPos);
-pUndoMgr->AddUndoAction(new ScUndoSetCell(&rDocShell, rPos, 
fOldVal, rNewVal));
-}
-break;
-case CELLTYPE_STRING:
-{
-OUString aOldStr = pDoc->GetString(rPos);
-pUndoMgr->AddUndoAction(new ScUndoSetCell(&rDocShell, rPos, 
aOldStr, rNewVal));
-}
-break;
-case CELLTYPE_EDIT:
-{
-const EditTextObject* pOldText = pDoc->GetEditText(rPos);
-if (pOldText)
-pUndoMgr->AddUndoAction(new ScUndoSetCell(&rDocShell, rPos, 
*pOldText, rNewVal));
-}
-break;
-case CELLTYPE_FORMULA:
-{
-const ScFormulaCell* pCell = pDoc->GetFormulaCell(rPos);
-if (pCell)
-pUndoMgr->AddUndoAction(new ScUndoSetCell(&rDocShell, rPos, 
*pCell, rNewVal));
-}
-break;
-default:
-;
-}
-}
-
-}
-
 bool ScDocFunc::SetValueCell( const ScAddress& rPos, double fVal, bool 
bInteraction )
 {
 ScDocShellModificator aModificator( rDocShell );
@@ -861,11 +816,20 @@ bool ScDocFunc::SetValueCell( const ScAddress& rPos, 
double fVal, bool bInteract
 
 bool bHeight = pDoc->HasAttrib(rPos, HASATTR_NEEDHEIGHT);
 
+ScCellValue aOldVal;
 if (bUndo)
-pushUndoSetCell(rDocShell, pDoc, rPos, fVal);
+aOldVal.assign(*pDoc, rPos);
 
 pDoc->SetValue(rPos, fVal);
 
+if (bUndo)
+{
+svl::IUndoManager* pUndoMgr = rDocShell.GetUndoManager();
+ScCellValue aNewVal;
+aNewVal.assign(*pDoc, rPos);
+pUndoMgr->AddUndoAction(new ScUndoSetCell(&rDocShell, rPos, aOldVal, 
aNewVal));
+}
+
 if (bHeight)
 AdjustRowHeight(rPos);
 
@@ -886,13 +850,22 @@ bool ScDocFunc::SetStringCell( const ScAddress& rPos, 
const OUString& rStr, bool
 
 bool bHeight = pDoc->HasAttrib(rPos, HASATTR_NEEDHEIGHT);
 
+ScCellValue aOldVal;
 if (bUndo)
-pushUndoSetCell(rDocShell, pDoc, rPos, rStr);
+aOldVal.assign(*pDoc, rPos);
 
 ScSetStringParam aParam;
 aParam.setTextInput();
 pDoc->SetString(rPos, rStr, &aParam);
 
+if (bUndo)
+{
+svl::IUndoManager* pUndoMgr = rDocShell.GetUndoManager();
+ScCellValue aN

Re: Pivot Table data provider extension framework (removal possibility)

2013-03-22 Thread Eike Rathke
Hi Kohei,

On Thursday, 2013-03-21 12:24:01 -0400, Kohei Yoshida wrote:

> and I propose to remove the last choice from this dialog as the first step.
> 
> If, by 4.1, nobody complains, then we assume it's safe to remove
> this.

Sounds good.

  Eike

-- 
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
New GnuPG key 0x65632D3A : 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A
Old GnuPG key 0x293C05FD : 997A 4C60 CE41 0149 0DB3  9E96 2F1A D073 293C 05FD
Support the FSFE, care about Free Software! https://fsfe.org/support/?erack


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


[PATCH libreoffice-4-0-2] fdo#60769 implement odf export of multi-paragraph comment ra...

2013-03-22 Thread Miklos Vajna (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/2908

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/08/2908/1

fdo#60769 implement odf export of multi-paragraph comment ranges

(cherry picked from commits 287c254d5ebf9b58ca63a8c271e523adf0d34b82 and
1fba17854b2be4fdbe436f44da3ae57a1f75a27c)

Conflicts:
sw/qa/extras/odfexport/odfexport.cxx

Reviewed-on: https://gerrit.libreoffice.org/2873
Reviewed-by: Noel Power 
Tested-by: Noel Power 

(cherry picked from commit 473cd59a71706ada01f8be68c7dfd008ca9bb716)

Change-Id: Ic4a5a1bc685917f2b26be4ab645203f706719c80
---
A sw/qa/extras/odfexport/data/fdo60769.odt
M sw/qa/extras/odfexport/odfexport.cxx
M sw/source/core/unocore/unoportenum.cxx
M xmloff/source/text/txtparae.cxx
4 files changed, 52 insertions(+), 8 deletions(-)



diff --git a/sw/qa/extras/odfexport/data/fdo60769.odt 
b/sw/qa/extras/odfexport/data/fdo60769.odt
new file mode 100644
index 000..b3c3937
--- /dev/null
+++ b/sw/qa/extras/odfexport/data/fdo60769.odt
Binary files differ
diff --git a/sw/qa/extras/odfexport/odfexport.cxx 
b/sw/qa/extras/odfexport/odfexport.cxx
index 7d93b3b..1252fe9 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -33,6 +33,7 @@
 public:
 void testFdo38244();
 void testFirstHeaderFooter();
+void testFdo60769();
 
 CPPUNIT_TEST_SUITE(Test);
 #if !defined(MACOSX) && !defined(WNT)
@@ -49,6 +50,7 @@
 MethodEntry aMethods[] = {
 {"fdo38244.odt", &Test::testFdo38244},
 {"first-header-footer.odt", &Test::testFirstHeaderFooter},
+{"fdo60769.odt", &Test::testFdo60769},
 };
 for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i)
 {
@@ -116,6 +118,32 @@
 CPPUNIT_ASSERT_EQUAL(OUString("Left footer2"),  
parseDump("/root/page[6]/footer/txt/text()"));
 }
 
+void Test::testFdo60769()
+{
+// Test multi-paragraph comment range feature.
+uno::Reference xTextDocument(mxComponent, 
uno::UNO_QUERY);
+uno::Reference 
xParaEnumAccess(xTextDocument->getText(), uno::UNO_QUERY);
+uno::Reference xParaEnum = 
xParaEnumAccess->createEnumeration();
+uno::Reference 
xRunEnumAccess(xParaEnum->nextElement(), uno::UNO_QUERY);
+uno::Reference xRunEnum = 
xRunEnumAccess->createEnumeration();
+while (xRunEnum->hasMoreElements())
+{
+uno::Reference 
xPropertySet(xRunEnum->nextElement(), uno::UNO_QUERY);
+OUString aType =  getProperty(xPropertySet, 
"TextPortionType");
+// First paragraph: no field end, no anchor
+CPPUNIT_ASSERT(aType == "Text" || aType == "TextFieldStart");
+}
+
+xRunEnumAccess.set(xParaEnum->nextElement(), uno::UNO_QUERY);
+while (xRunEnum->hasMoreElements())
+{
+uno::Reference 
xPropertySet(xRunEnum->nextElement(), uno::UNO_QUERY);
+OUString aType =  getProperty(xPropertySet, 
"TextPortionType");
+// Second paragraph: no field start
+CPPUNIT_ASSERT(aType == "Text" || aType == "TextFieldEnd" || aType == 
"TextFieldEnd");
+}
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(Test);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/core/unocore/unoportenum.cxx 
b/sw/source/core/unocore/unoportenum.cxx
index d05b8f5..2829d3f 100644
--- a/sw/source/core/unocore/unoportenum.cxx
+++ b/sw/source/core/unocore/unoportenum.cxx
@@ -754,6 +754,18 @@
 Reference xField =
 SwXTextField::CreateSwXTextField(*pDoc, 
pAttr->GetFld());
 pPortion->SetTextField(xField);
+
+// If this is a postit field and it has a fieldmark
+// associated, set the fieldmark as a bookmark.
+const SwField* pField = pAttr->GetFld().GetFld();
+if (pField->Which() == RES_POSTITFLD)
+{
+const SwPostItField* pPostItField = 
dynamic_cast(pField);
+IDocumentMarkAccess* pMarkAccess = 
pDoc->getIDocumentMarkAccess();
+IDocumentMarkAccess::const_iterator_t it = 
pMarkAccess->findMark(pPostItField->GetName());
+if (it != pMarkAccess->getMarksEnd())
+
pPortion->SetBookmark(SwXFieldmark::CreateXFieldmark(*pDoc, *it->get()));
+}
 }
 break;
 case RES_TXTATR_FLYCNT   :
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index 96cb842..36f7f0c 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -2198,7 +2198,6 @@
 static const OUString sMeta("InContentMetadata");
 static const OUString sFieldMarkName("__FieldMark_");
 bool bPrevCharIsSpace = bPrvChrIsSpc;
-bool bAnnotationStarted = false;
 
 /* This is  used for exporting to strict OpenDocument 1.2, in which case 
tradi

TemplateManager refactoring

2013-03-22 Thread Cedric Bosdonnat
Hello Rafael,

I just hit another problem due to the TemplateView class. Did you manage
to merge this one back into the TemplateAbstractView?

I'll try to workaround it for the while... but it would really be
awesome to have that in ;)

Regards,
--
Cedric

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


[ANN] LibreOffice 3.6.6 RC1 available

2013-03-22 Thread Thorsten Behrens
Dear Community,

The Document Foundation is happy to announce the first release
candidate of LibreOffice 3.6.6. The upcoming 3.6.6 will be the sixth
in a series of frequent bugfix releases for our stable 3.6
branch. Please be aware that LibreOffice 3.6.6 RC1 is not ready for
production use, you should continue to use LibreOffice 3.6.5 for that.

The release is available for Windows, Linux and Mac OS X from our QA
builds download page at

  http://www.libreoffice.org/download/pre-releases/

Should you find bugs, please report them to the FreeDesktop Bugzilla:

  https://bugs.freedesktop.org

A good way to assess the release candidate quality is to run some
specific manual tests on it, our TCM wiki page has more details:

 
http://wiki.documentfoundation.org/QA/Testing/Regression_Tests#Full_Regression_Test

  - or checkout our manual test database for starting right away -

 http://manual-test.libreoffice.org/runtests/

For other ways to get involved with this exciting project - you can
e.g. contribute code:

  http://www.libreoffice.org/get-involved/developers/

translate LibreOffice to your language:

  http://wiki.documentfoundation.org/Translation_for_3.5

or help with funding our operations:

  http://donate.libreoffice.org/

A list of known issues and fixed bugs with 3.6.6 RC1 is available
from our wiki:

  http://wiki.documentfoundation.org/Releases/3.6.6/RC1

Let us close again with a BIG Thank You! to all of you having
contributed to the LibreOffice project - this release would not have
been possible without your help.

Yours,

The Document Foundation Board of Directors

The Document Foundation, Zimmerstr. 69, 10117 Berlin, Germany
Rechtsfähige Stiftung des bürgerlichen Rechts
Legal details: http://www.documentfoundation.org/imprint


signature.asc
Description: Digital signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: configure.ac

2013-03-22 Thread Fridrich Štrba
 configure.ac |6 --
 1 file changed, 6 deletions(-)

New commits:
commit 9f78c8ed2c1ebeed54621ff3d4c0e5a7b9e811b3
Author: Fridrich Å trba 
Date:   Fri Mar 22 15:36:34 2013 +0100

Removing some old HH crack

Change-Id: I4b9b2db500af6cff2cfb1bc17002baf08715

diff --git a/configure.ac b/configure.ac
index 9a69275..7aaacba 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7608,12 +7608,6 @@ int main(int argc, char **argv) {
 LIBS=$save_LIBS
 else
 AC_MSG_RESULT([internal])
-AC_MSG_CHECKING([for mysqlcppconn module])
-if test -d mysqlcppconn; then
-AC_MSG_RESULT([OK])
-else
-AC_MSG_ERROR([not existing. get it (did you get the -extensions 
tarball?)])
-fi
 BUILD_TYPE="$BUILD_TYPE MYSQLCPPCONN"
 SYSTEM_MYSQL_CPPCONN=NO
 fi
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - comphelper/inc comphelper/source sd/source xmloff/source

2013-03-22 Thread Michael Stahl
 comphelper/inc/comphelper/propertysethelper.hxx  |   10 -
 comphelper/source/property/propertysethelper.cxx |   11 +++---
 sd/source/ui/unoidl/UnoDocumentSettings.cxx  |   25 +--
 xmloff/source/draw/sdxmlexp.cxx  |   15 ++---
 4 files changed, 43 insertions(+), 18 deletions(-)

New commits:
commit 3605407693c83e5e5e0af6f7ec4a3863bc7178b0
Author: Michael Stahl 
Date:   Fri Mar 22 14:24:13 2013 +0100

sd::DocumentSettings: throwing UnknownPropertyException ...

... for properties that are in the PropertySetInfo just because there's
no document or shell is just plain wrong.

Change-Id: I84f4f930f492753b20ba04ec4d41c905d674b9ba

diff --git a/comphelper/inc/comphelper/propertysethelper.hxx 
b/comphelper/inc/comphelper/propertysethelper.hxx
index 6aa647f..c9f1b4d 100644
--- a/comphelper/inc/comphelper/propertysethelper.hxx
+++ b/comphelper/inc/comphelper/propertysethelper.hxx
@@ -46,12 +46,12 @@ private:
 PropertySetHelperImpl* mp;
 
 protected:
-virtual void _setPropertyValues( const comphelper::PropertyMapEntry** 
ppEntries, const ::com::sun::star::uno::Any* pValues ) 
throw(::com::sun::star::beans::UnknownPropertyException, 
::com::sun::star::beans::PropertyVetoException, 
::com::sun::star::lang::IllegalArgumentException, 
::com::sun::star::lang::WrappedTargetException ) = 0;
-virtual void _getPropertyValues( const comphelper::PropertyMapEntry** 
ppEntries, ::com::sun::star::uno::Any* pValue ) 
throw(::com::sun::star::beans::UnknownPropertyException, 
::com::sun::star::lang::WrappedTargetException ) = 0;
+virtual void _setPropertyValues( const comphelper::PropertyMapEntry** 
ppEntries, const ::com::sun::star::uno::Any* pValues ) 
throw(::com::sun::star::beans::UnknownPropertyException, 
::com::sun::star::beans::PropertyVetoException, 
::com::sun::star::lang::IllegalArgumentException, 
::com::sun::star::lang::WrappedTargetException, 
::com::sun::star::uno::RuntimeException ) = 0;
+virtual void _getPropertyValues( const comphelper::PropertyMapEntry** 
ppEntries, ::com::sun::star::uno::Any* pValue ) 
throw(::com::sun::star::beans::UnknownPropertyException, 
::com::sun::star::lang::WrappedTargetException, 
::com::sun::star::uno::RuntimeException ) = 0;
 
-virtual void _getPropertyStates( const comphelper::PropertyMapEntry** 
ppEntries, ::com::sun::star::beans::PropertyState* pStates ) 
throw(::com::sun::star::beans::UnknownPropertyException );
-virtual void _setPropertyToDefault( const comphelper::PropertyMapEntry* 
pEntry )  throw(::com::sun::star::beans::UnknownPropertyException );
-virtual ::com::sun::star::uno::Any _getPropertyDefault( const 
comphelper::PropertyMapEntry* pEntry ) 
throw(::com::sun::star::beans::UnknownPropertyException, 
::com::sun::star::lang::WrappedTargetException );
+virtual void _getPropertyStates( const comphelper::PropertyMapEntry** 
ppEntries, ::com::sun::star::beans::PropertyState* pStates ) 
throw(::com::sun::star::beans::UnknownPropertyException, 
::com::sun::star::uno::RuntimeException );
+virtual void _setPropertyToDefault( const comphelper::PropertyMapEntry* 
pEntry )  throw(::com::sun::star::beans::UnknownPropertyException, 
::com::sun::star::uno::RuntimeException );
+virtual ::com::sun::star::uno::Any _getPropertyDefault( const 
comphelper::PropertyMapEntry* pEntry ) 
throw(::com::sun::star::beans::UnknownPropertyException, 
::com::sun::star::lang::WrappedTargetException, 
::com::sun::star::uno::RuntimeException );
 
 public:
 PropertySetHelper( comphelper::PropertySetInfo* pInfo ) throw();
diff --git a/comphelper/source/property/propertysethelper.cxx 
b/comphelper/source/property/propertysethelper.cxx
index 979f1c9..27b4c0e 100644
--- a/comphelper/source/property/propertysethelper.cxx
+++ b/comphelper/source/property/propertysethelper.cxx
@@ -282,17 +282,22 @@ Any SAL_CALL PropertySetHelper::getPropertyDefault( const 
::rtl::OUString& aProp
 return _getPropertyDefault( pEntry );
 }
 
-void PropertySetHelper::_getPropertyStates( const 
comphelper::PropertyMapEntry**, PropertyState* ) throw(UnknownPropertyException 
)
+void PropertySetHelper::_getPropertyStates(
+const comphelper::PropertyMapEntry**, PropertyState*)
+throw (UnknownPropertyException, RuntimeException)
 {
 OSL_FAIL( "you have to implement this yourself!");
 }
 
-void PropertySetHelper::_setPropertyToDefault( const 
comphelper::PropertyMapEntry* )  throw(UnknownPropertyException )
+void
+PropertySetHelper::_setPropertyToDefault(const comphelper::PropertyMapEntry*)
+throw (UnknownPropertyException, RuntimeException)
 {
 OSL_FAIL( "you have to implement this yourself!");
 }
 
-Any PropertySetHelper::_getPropertyDefault( const 
comphelper::PropertyMapEntry* ) throw(UnknownPropertyException, 
WrappedTargetException )
+Any PropertySetHelper::_getPropertyDefault(const comphelper::PropertyMapEntry*)
+throw (UnknownPropertyException, WrappedTargetException, RuntimeExcept

[Libreoffice-commits] core.git: libmariadb/configs

2013-03-22 Thread Fridrich Štrba
 libmariadb/configs/linux_my_config.h |   44 +--
 libmariadb/configs/mac_my_config.h   |   44 +--
 2 files changed, 44 insertions(+), 44 deletions(-)

New commits:
commit e8a526e1f5626673a572d53dc1c8db6d8aadba13
Author: Fridrich Å trba 
Date:   Fri Mar 22 15:23:20 2013 +0100

Remove some unnecessary warnings

Change-Id: I19a8931e8cda700c87d632fb6abeda9fa88c6041

diff --git a/libmariadb/configs/linux_my_config.h 
b/libmariadb/configs/linux_my_config.h
index 817fa9e..6007d85 100644
--- a/libmariadb/configs/linux_my_config.h
+++ b/libmariadb/configs/linux_my_config.h
@@ -160,7 +160,7 @@
  */
 /* Types we may use */
 #define SIZEOF_CHAR 1
-#if SIZEOF_CHAR
+#ifdef SIZEOF_CHAR
 # define HAVE_CHAR 1
 #endif
 
@@ -169,17 +169,17 @@
 #else
 #define SIZEOF_CHARP 4
 #endif
-#if SIZEOF_CHARP
+#ifdef SIZEOF_CHARP
 # define HAVE_CHARP 1
 #endif
 
 #define SIZEOF_SHORT 2
-#if SIZEOF_SHORT
+#ifdef SIZEOF_SHORT
 # define HAVE_SHORT 1
 #endif
 
 #define SIZEOF_INT 4
-#if SIZEOF_INT
+#ifdef SIZEOF_INT
 # define HAVE_INT 1
 #endif
 
@@ -188,12 +188,12 @@
 #else
 #define SIZEOF_LONG 4
 #endif
-#if SIZEOF_LONG
+#ifdef SIZEOF_LONG
 # define HAVE_LONG 1
 #endif
 
 #define SIZEOF_LONG_LONG 8
-#if SIZEOF_LONG_LONG
+#ifdef SIZEOF_LONG_LONG
 # define HAVE_LONG_LONG 1
 #endif
 
@@ -202,12 +202,12 @@
 #else
 #define SIZEOF_OFF_T 4
 #endif
-#if SIZEOF_OFF_T
+#ifdef SIZEOF_OFF_T
 # define HAVE_OFF_T 1
 #endif
 
 #define SIZEOF_SIGSET_T 128
-#if SIZEOF_SIGSET_T
+#ifdef SIZEOF_SIGSET_T
 # define HAVE_SIGSET_T 1
 #endif
 
@@ -216,17 +216,17 @@
 #else
 #define SIZEOF_SIZE_T 4
 #endif
-#if SIZEOF_SIZE_T
+#ifdef SIZEOF_SIZE_T
 # define HAVE_SIZE_T 1
 #endif
 
 /* #undef SIZEOF_UCHAR */
-#if SIZEOF_UCHAR
+#ifdef SIZEOF_UCHAR
 # define HAVE_UCHAR 1
 #endif
 
 #define SIZEOF_UINT 4
-#if SIZEOF_UINT
+#ifdef SIZEOF_UINT
 # define HAVE_UINT 1
 #endif
 
@@ -235,52 +235,52 @@
 #else
 #define SIZEOF_ULONG 4
 #endif
-#if SIZEOF_ULONG
+#ifdef SIZEOF_ULONG
 # define HAVE_ULONG 1
 #endif
 
 /* #undef SIZEOF_INT8 */
-#if SIZEOF_INT8
+#ifdef SIZEOF_INT8
 # define HAVE_INT8 1
 #endif
 /* #undef SIZEOF_UINT8 */
-#if SIZEOF_UINT8
+#ifdef SIZEOF_UINT8
 # define HAVE_UINT8 1
 #endif
 
 /* #undef SIZEOF_INT16 */
-#if SIZEOF_INT16
+#ifdef SIZEOF_INT16
 # define HAVE_INT16 1
 #endif
 /* #undef SIZEOF_UINT16 */
-#if SIZEOF_UINT16
+#ifdef SIZEOF_UINT16
 # define HAVE_UINT16 1
 #endif
 
 /* #undef SIZEOF_INT32 */
-#if SIZEOF_INT32
+#ifdef SIZEOF_INT32
 # define HAVE_INT32 1
 #endif
 /* #undef SIZEOF_UINT32 */
-#if SIZEOF_UINT32
+#ifdef SIZEOF_UINT32
 # define HAVE_UINT32 1
 #endif
 /* #undef SIZEOF_U_INT32_T */
-#if SIZEOF_U_INT32_T
+#ifdef SIZEOF_U_INT32_T
 # define HAVE_U_INT32_T 1
 #endif
 
 /* #undef SIZEOF_INT64 */
-#if SIZEOF_INT64
+#ifdef SIZEOF_INT64
 # define HAVE_INT64 1
 #endif
 /* #undef SIZEOF_UINT64 */
-#if SIZEOF_UINT64
+#ifdef SIZEOF_UINT64
 # define HAVE_UINT64 1
 #endif
 
 /* #undef SIZEOF_SOCKLEN_T */
-#if SIZEOF_SOCKLEN_T
+#ifdef SIZEOF_SOCKLEN_T
 # define HAVE_SOCKLEN_T 1
 #endif
 
diff --git a/libmariadb/configs/mac_my_config.h 
b/libmariadb/configs/mac_my_config.h
index 44d822f..baa4f18 100644
--- a/libmariadb/configs/mac_my_config.h
+++ b/libmariadb/configs/mac_my_config.h
@@ -160,107 +160,107 @@
  */
 /* Types we may use */
 #define SIZEOF_CHAR 1
-#if SIZEOF_CHAR
+#ifdef SIZEOF_CHAR
 # define HAVE_CHAR 1
 #endif
 
 #define SIZEOF_CHARP 4
-#if SIZEOF_CHARP
+#ifdef SIZEOF_CHARP
 # define HAVE_CHARP 1
 #endif
 
 #define SIZEOF_SHORT 2
-#if SIZEOF_SHORT
+#ifdef SIZEOF_SHORT
 # define HAVE_SHORT 1
 #endif
 
 #define SIZEOF_INT 4
-#if SIZEOF_INT
+#ifdef SIZEOF_INT
 # define HAVE_INT 1
 #endif
 
 #define SIZEOF_LONG 4
-#if SIZEOF_LONG
+#ifdef SIZEOF_LONG
 # define HAVE_LONG 1
 #endif
 
 #define SIZEOF_LONG_LONG 8
-#if SIZEOF_LONG_LONG
+#ifdef SIZEOF_LONG_LONG
 # define HAVE_LONG_LONG 1
 #endif
 
 #define SIZEOF_OFF_T 8
-#if SIZEOF_OFF_T
+#ifdef SIZEOF_OFF_T
 # define HAVE_OFF_T 1
 #endif
 
 #define SIZEOF_SIGSET_T 4
-#if SIZEOF_SIGSET_T
+#ifdef SIZEOF_SIGSET_T
 # define HAVE_SIGSET_T 1
 #endif
 
 #define SIZEOF_SIZE_T 4
-#if SIZEOF_SIZE_T
+#ifdef SIZEOF_SIZE_T
 # define HAVE_SIZE_T 1
 #endif
 
 /* #undef SIZEOF_UCHAR */
-#if SIZEOF_UCHAR
+#ifdef SIZEOF_UCHAR
 # define HAVE_UCHAR 1
 #endif
 
 #define SIZEOF_UINT 4
-#if SIZEOF_UINT
+#ifdef SIZEOF_UINT
 # define HAVE_UINT 1
 #endif
 
 /* #undef SIZEOF_ULONG */
-#if SIZEOF_ULONG
+#ifdef SIZEOF_ULONG
 # define HAVE_ULONG 1
 #endif
 
 /* #undef SIZEOF_INT8 */
-#if SIZEOF_INT8
+#ifdef SIZEOF_INT8
 # define HAVE_INT8 1
 #endif
 /* #undef SIZEOF_UINT8 */
-#if SIZEOF_UINT8
+#ifdef SIZEOF_UINT8
 # define HAVE_UINT8 1
 #endif
 
 /* #undef SIZEOF_INT16 */
-#if SIZEOF_INT16
+#ifdef SIZEOF_INT16
 # define HAVE_INT16 1
 #endif
 /* #undef SIZEOF_UINT16 */
-#if SIZEOF_UINT16
+#ifdef SIZEOF_UINT16
 # define HAVE_UINT16 1
 #endif
 
 /* #undef SIZEOF_INT32 */
-#if SIZEOF_INT32
+#ifdef SIZEOF_INT32
 # define HAVE_INT32 1
 #endif
 /* #undef SIZEOF_U

[Libreoffice-commits] core.git: libmariadb/configs libmariadb/my_config.h libmariadb/mysql_version.h libmariadb/UnpackedTarball_mariadb.mk

2013-03-22 Thread Fridrich Štrba
 libmariadb/UnpackedTarball_mariadb.mk |   12 -
 libmariadb/configs/linux_my_config.h  |  297 ++
 libmariadb/configs/mac_my_config.h|  277 +++
 libmariadb/configs/mysql_version.h|   24 ++
 libmariadb/my_config.h|  164 --
 libmariadb/mysql_version.h|   24 --
 6 files changed, 606 insertions(+), 192 deletions(-)

New commits:
commit ab374c8e5d3b41e7cda2b7f55ad209683ffa48fe
Author: Fridrich Å trba 
Date:   Fri Mar 22 15:00:31 2013 +0100

Some more granularity in the libmariadb build

Change-Id: I99a6506443c789fb278684464a3973c1b4961ba4

diff --git a/libmariadb/UnpackedTarball_mariadb.mk 
b/libmariadb/UnpackedTarball_mariadb.mk
index fa3324e..f80bed6 100644
--- a/libmariadb/UnpackedTarball_mariadb.mk
+++ b/libmariadb/UnpackedTarball_mariadb.mk
@@ -11,11 +11,15 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,mariadb))
 
 $(eval $(call gb_UnpackedTarball_set_tarball,mariadb,$(MARIADB_TARBALL)))
 
-# This was generated on a 64-bit linux, will have to conditionalize it if it 
is broken
-# for another configuration.
-$(eval $(call 
gb_UnpackedTarball_add_file,mariadb,include/my_config.h,libmariadb/my_config.h))
+$(eval $(call 
gb_UnpackedTarball_add_file,mariadb,include/mysql_version.h,libmariadb/configs/mysql_version.h))
 
-$(eval $(call 
gb_UnpackedTarball_add_file,mariadb,include/mysql_version.h,libmariadb/mysql_version.h))
+ifneq ($(OS),WNT)
+ifeq ($(OS),MACOSX)
+$(eval $(call 
gb_UnpackedTarball_add_file,mariadb,include/my_config.h,libmariadb/configs/mac_my_config.h))
+else
+$(eval $(call 
gb_UnpackedTarball_add_file,mariadb,include/my_config.h,libmariadb/configs/linux_my_config.h))
+endif
+endif # $(OS),WNT
 
 $(eval $(call gb_UnpackedTarball_set_patchlevel,mariadb,1))
 
diff --git a/libmariadb/configs/linux_my_config.h 
b/libmariadb/configs/linux_my_config.h
new file mode 100644
index 000..817fa9e
--- /dev/null
+++ b/libmariadb/configs/linux_my_config.h
@@ -0,0 +1,297 @@
+
+#define HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE 1
+
+/*
+ * Include file constants (processed in LibmysqlIncludeFiles.txt 1
+ */
+#define HAVE_ALLOCA_H 1
+#define HAVE_ARPA_INET_H 1
+#define HAVE_CRYPT_H 1
+#define HAVE_DIRENT_H 1
+#define HAVE_DLFCN_H 1
+#define HAVE_EXECINFO_H 1
+#define HAVE_FCNTL_H 1
+#define HAVE_FENV_H 1
+#define HAVE_FLOAT_H 1
+/* #undef HAVE_FPU_CONTROL_H */
+#define HAVE_GRP_H 1
+/* #undef HAVE_IEEEFP_H */
+#define HAVE_LIMITS_H 1
+#define HAVE_MALLOC_H 1
+#define HAVE_MEMORY_H 1
+#define HAVE_NETINET_IN_H 1
+#define HAVE_PATHS_H 1
+#define HAVE_PWD_H 1
+#define HAVE_SCHED_H 1
+/* #undef HAVE_SELECT_H */
+#define HAVE_STDDEF_H 1
+#define HAVE_STDINT_H 1
+#define HAVE_STDLIB_H 1
+#define HAVE_STRING_H 1
+#define HAVE_STRINGS_H 1
+/* #undef HAVE_SYNCH_H */
+/* #undef HAVE_SYS_FPU_H */
+#define HAVE_SYS_IOCTL_H 1
+#define HAVE_SYS_IPC_H 1
+#define HAVE_SYS_MMAN_H 1
+#define HAVE_SYS_PRCTL_H 1
+#define HAVE_SYS_SELECT_H 1
+#define HAVE_SYS_SHM_H 1
+#define HAVE_SYS_SOCKET_H 1
+#define HAVE_SYS_STAT_H 1
+/* #undef HAVE_SYS_STREAM_H */
+#define HAVE_SYS_TIMEB_H 1
+#define HAVE_SYS_TYPES_H 1
+#define HAVE_SYS_UN_H 1
+/* #undef HAVE_SYSENT_H */
+#define HAVE_TERMIO_H 1
+#define HAVE_TERMIOS_H 1
+#define HAVE_UNISTD_H 1
+#define HAVE_UTIME_H 1
+
+/*
+ * function definitions - processed in LibmysqlFunctions.txt 
+ */
+#define HAVE_ACCESS 1
+/* #undef HAVE_AIOWAIT */
+#define HAVE_ALARM 1
+/* #undef HAVE_ALLOCA */
+#define HAVE_BCMP 1
+/* #undef HAVE_BFILL */
+/* #undef HAVE_BMOVE */
+#define HAVE_BZERO 1
+/* #undef HAVE_CLOCK_GETTIME */
+/* #undef HAVE_COMPRESS */
+/* #undef HAVE_CRYPT */
+#define HAVE_DLERROR 1
+#define HAVE_DLOPEN 1
+#define HAVE_FCHMOD 1
+#define HAVE_FCNTL 1
+/* #undef HAVE_FCONVERT */
+#define HAVE_FDATASYNC 1
+/* #undef HAVE_FESETROUND */
+#define HAVE_FINITE 1
+#define HAVE_FSEEKO 1
+#define HAVE_FSYNC 1
+#define HAVE_GETADDRINFO 1
+#define HAVE_GETCWD 1
+#define HAVE_GETHOSTBYADDR_R 1
+#define HAVE_GETHOSTBYNAME_R 1
+/* #undef HAVE_GETHRTIME */
+#define HAVE_GETNAMEINFO 1
+#define HAVE_GETPAGESIZE 1
+#define HAVE_GETPASS 1
+/* #undef HAVE_GETPASSPHRASE */
+#define HAVE_GETPWNAM 1
+#define HAVE_GETPWUID 1
+#define HAVE_GETRLIMIT 1
+#define HAVE_GETRUSAGE 1
+#define HAVE_GETWD 1
+#define HAVE_GMTIME_R 1
+#define HAVE_INITGROUPS 1
+#define HAVE_LDIV 1
+#define HAVE_LOCALTIME_R 1
+/* #undef HAVE_LOG2 */
+#define HAVE_LONGJMP 1
+#define HAVE_LSTAT 1
+#define HAVE_MADVISE 1
+#define HAVE_MALLINFO 1
+#define HAVE_MEMALIGN 1
+#define HAVE_MEMCPY 1
+#define HAVE_MEMMOVE 1
+#define HAVE_MKSTEMP 1
+#define HAVE_MLOCK 1
+#define HAVE_MLOCKALL 1
+#define HAVE_MMAP 1
+#define HAVE_MMAP64 1
+#define HAVE_PERROR 1
+#define HAVE_POLL 1
+#define HAVE_PREAD 1
+/* #undef HAVE_PTHREAD_ATTR_CREATE */
+/* #undef HAVE_PTHREAD_ATTR_GETSTACKSIZE */
+/* #undef HAVE_PTHREAD_ATTR_SETPRIO */
+#define HAVE_PTHREAD_ATTR_SETSCHEDPARAM 1
+#define HAVE_PTHREAD_ATTR_SETSCOPE 1
+/* #undef HAVE_PTHREAD_ATTR_SETS

Re: NumericBox unsafe double conversion

2013-03-22 Thread Zolnai Tamás
2013/3/22 Stephan Bergmann 

> On 03/22/2013 11:44 AM, Zolnai Tamás wrote:
>
>> Otherwise in ImplNumericGetValue() the problem of overflow/underflow can
>> be avoid with these lines
>> sal_Int64 nValue = aStr.toInt64()
>> if( OUString::valueOf(nValue) != aStr )
>> {
>>  if( bNegative )
>>  rValue = SAL_MIN_INT64;
>>  else
>>  rValue = SAL_MAX_INT64;
>>  return sal_True;
>> }
>>
>
> ...but only if aStr is known to be in canonical form, esp. neither
> contains minus zero nor contains excessive leading zero digits.  None of
> that is guaranteed for ImplNumericGetValue in its current form (and also
> consider nDecDigits > 0, where input rStr="0" and nDecDigits=2, say, would
> lead to aStr="000" and the above comparison erroneously failing).
>

Oh, that's true. Thanks. I extend the check to take notice of these two
things.
>From that matter, why is that the toInt64() function doesn't pay attention
on overflow/underflow? Maybe it would simpler to handle these "flows" in
that function.


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


[Libreoffice-commits] core.git: Branch 'feature/formula-core-rework' - sc/inc sc/source

2013-03-22 Thread Kohei Yoshida
 sc/inc/document.hxx  |2 --
 sc/source/core/data/cell2.cxx|2 +-
 sc/source/core/data/document.cxx |   22 --
 sc/source/core/data/table6.cxx   |   15 ---
 sc/source/ui/app/transobj.cxx|1 -
 sc/source/ui/undo/undocell.cxx   |4 +++-
 6 files changed, 16 insertions(+), 30 deletions(-)

New commits:
commit 70af04307ad62f362a18318096a37d425bbd8f35
Author: Kohei Yoshida 
Date:   Fri Mar 22 09:41:42 2013 -0400

Remove a variant of PutCell().

Change-Id: I6100d30954536a3683be69363f1fc13d54cacfef

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 783281e..e0f19cd 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -744,8 +744,6 @@ public:
 SC_DLLPUBLIC void EnsureTable( SCTAB nTab );
 
 SC_DLLPUBLIC void   PutCell( const ScAddress&, ScBaseCell* pCell, 
bool bForceTab = false );
-SC_DLLPUBLIC void   PutCell( SCCOL nCol, SCROW nRow, SCTAB nTab, 
ScBaseCell* pCell,
-bool bForceTab = false );
 SC_DLLPUBLIC void   PutCell(SCCOL nCol, SCROW nRow, SCTAB nTab, 
ScBaseCell* pCell,
 sal_uLong nFormatIndex, bool bForceTab = false);
 //  return TRUE = number format is set
diff --git a/sc/source/core/data/cell2.cxx b/sc/source/core/data/cell2.cxx
index 5bd3846..0e217f2 100644
--- a/sc/source/core/data/cell2.cxx
+++ b/sc/source/core/data/cell2.cxx
@@ -1442,7 +1442,7 @@ void ScFormulaCell::UpdateTranspose( const ScRange& 
rSource, const ScAddress& rD
 ScFormulaCell* pFCell = new ScFormulaCell( pUndoDoc, aPos, pOld,
 eTempGrammar, cMatrixFlag);
 pFCell->aResult.SetToken( NULL);  // to recognize it as changed 
later (Cut/Paste!)
-pUndoDoc->PutCell( aPos.Col(), aPos.Row(), aPos.Tab(), pFCell );
+pUndoDoc->SetFormulaCell(aPos, pFCell);
 }
 
 bCompile = true;
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index d5ceb08..7064ee2 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -2925,28 +2925,6 @@ void ScDocument::FillTabMarked( SCTAB nSrcTab, const 
ScMarkData& rMark,
 }
 }
 
-
-void ScDocument::PutCell( SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell* 
pCell, bool bForceTab )
-{
-if (ValidTab(nTab))
-{
-if ( bForceTab && ( nTab >= static_cast(maTabs.size()) || 
!maTabs[nTab]) )
-{
-bool bExtras = !bIsUndo;// Spaltenbreiten, Zeilenhoehen, 
Flags
-
-if (nTab >= static_cast(maTabs.size()))
-maTabs.resize(nTab + 1,NULL);
-maTabs[nTab] = new ScTable(this, nTab,
-OUString("temp"),
-bExtras, bExtras);
-}
-
-if (maTabs[nTab])
-maTabs[nTab]->PutCell( nCol, nRow, pCell );
-}
-}
-
-
 void ScDocument::PutCell( const ScAddress& rPos, ScBaseCell* pCell, bool 
bForceTab )
 {
 SCTAB nTab = rPos.Tab();
diff --git a/sc/source/core/data/table6.cxx b/sc/source/core/data/table6.cxx
index 640ed59..6df2249 100644
--- a/sc/source/core/data/table6.cxx
+++ b/sc/source/core/data/table6.cxx
@@ -31,6 +31,7 @@
 #include "editutil.hxx"
 #include "detfunc.hxx"
 #include "postit.hxx"
+#include "stringutil.hxx"
 
 //--
 
@@ -966,10 +967,14 @@ bool ScTable::SearchRangeForAllEmptyCells(
 {
 aCol[nCol].Insert(i, new ScStringCell(rNewStr));
 if (pUndoDoc)
+{
 // TODO: I'm using a string cell with empty 
content to
 // trigger deletion of cell instance on undo.  
Maybe I
 // should create a new cell type for this?
-pUndoDoc->PutCell(nCol, i, nTab, new 
ScStringCell(String()));
+ScSetStringParam aParam;
+aParam.setTextInput();
+pUndoDoc->SetString(ScAddress(nCol, i, nTab), 
EMPTY_OUSTRING);
+}
 }
 rUndoStr = String();
 }
@@ -999,10 +1004,14 @@ bool ScTable::SearchRangeForAllEmptyCells(
 {
 aCol[nCol].Insert(nRow, new 
ScStringCell(rSearchItem.GetReplaceString()));
 if (pUndoDoc)
+{
 // TODO: I'm using a string cell with empty content to
 // trigger deletion of cell instance on undo.  Maybe I
 // should create a new cell type for this?
-pUndoDoc->PutCell(nCol, nRow, nTab, new 
ScStringCell(String()));
+ScSetStringParam aParam;
+   

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

2013-03-22 Thread Miklos Vajna
 sw/qa/extras/odfimport/data/fdo55814.odt |binary
 sw/qa/extras/odfimport/odfimport.cxx |   16 
 2 files changed, 16 insertions(+)

New commits:
commit f7b5afc895930f0ef67b2c67c98fc429f45e067d
Author: Miklos Vajna 
Date:   Fri Mar 22 14:21:29 2013 +0100

testcase for 62344016de056965a58ea2016d912a68eac0d6b0

Change-Id: I5d7544f38c5d48826cad18a655ffd3b621eb0ca2

diff --git a/sw/qa/extras/odfimport/data/fdo55814.odt 
b/sw/qa/extras/odfimport/data/fdo55814.odt
new file mode 100644
index 000..890fa4b
Binary files /dev/null and b/sw/qa/extras/odfimport/data/fdo55814.odt differ
diff --git a/sw/qa/extras/odfimport/odfimport.cxx 
b/sw/qa/extras/odfimport/odfimport.cxx
index 3bef663..d9b37d2 100644
--- a/sw/qa/extras/odfimport/odfimport.cxx
+++ b/sw/qa/extras/odfimport/odfimport.cxx
@@ -45,6 +45,7 @@ public:
 void testFdo61952();
 void testFdo60842();
 void testFdo56272();
+void testFdo55814();
 
 CPPUNIT_TEST_SUITE(Test);
 #if !defined(MACOSX) && !defined(WNT)
@@ -67,6 +68,7 @@ void Test::run()
 {"hello.odt", &Test::testFdo61952},
 {"fdo60842.odt", &Test::testFdo60842},
 {"fdo56272.odt", &Test::testFdo56272},
+{"fdo55814.odt", &Test::testFdo55814},
 };
 header();
 for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i)
@@ -325,6 +327,20 @@ void Test::testFdo56272()
 CPPUNIT_ASSERT_EQUAL(sal_Int32(422), xShape->getPosition().Y); // Was -2371
 }
 
+void Test::testFdo55814()
+{
+uno::Reference xTextFieldsSupplier(mxComponent, 
uno::UNO_QUERY);
+uno::Reference 
xFieldsAccess(xTextFieldsSupplier->getTextFields());
+uno::Reference 
xFields(xFieldsAccess->createEnumeration());
+uno::Reference xField(xFields->nextElement(), 
uno::UNO_QUERY);
+xField->setPropertyValue("Content", uno::makeAny(OUString("Yes")));
+uno::Reference(xTextFieldsSupplier->getTextFields(), 
uno::UNO_QUERY)->refresh();
+uno::Reference 
xTextSectionsSupplier(mxComponent, uno::UNO_QUERY);
+uno::Reference 
xSections(xTextSectionsSupplier->getTextSections(), uno::UNO_QUERY);
+// This was "0".
+CPPUNIT_ASSERT_EQUAL(OUString("Hide==\"Yes\""), 
getProperty(xSections->getByIndex(0), "Condition"));
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(Test);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-03-22 Thread Stephan Bergmann
 sfx2/source/control/thumbnailview.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 68579e6054c660de345a5c95f54fee60b3498f4a
Author: Stephan Bergmann 
Date:   Fri Mar 22 14:35:50 2013 +0100

-Werror,-Wparentheses-equality

Change-Id: I69fd94447718e23ed88af28fed7ba2957559dc5b

diff --git a/sfx2/source/control/thumbnailview.cxx 
b/sfx2/source/control/thumbnailview.cxx
index b73b908..cc05d70 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -777,7 +777,7 @@ void ThumbnailView::RemoveItem( sal_uInt16 nItemId )
 }
 
 // reset variables
-if ( (mnHighItemId == nItemId) )
+if ( mnHighItemId == nItemId )
 {
 mnHighItemId= 0;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 3 commits - sd/CppunitTest_sd_uimpress.mk sd/Library_sdfilt.mk sd/Library_sdui.mk sd/source

2013-03-22 Thread Stephan Bergmann
 sd/CppunitTest_sd_uimpress.mk |4 
 sd/Library_sdfilt.mk  |4 
 sd/Library_sdui.mk|4 
 sd/source/filter/html/htmlattr.cxx|5 -
 sd/source/filter/html/pubdlg.cxx  |4 
 sd/source/ui/dlg/PhotoAlbumDialog.cxx |4 
 sd/source/ui/dlg/brkdlg.cxx   |5 -
 sd/source/ui/dlg/copydlg.cxx  |5 -
 sd/source/ui/dlg/custsdlg.cxx |5 -
 sd/source/ui/dlg/dlgass.cxx   |4 
 sd/source/ui/dlg/dlgassim.cxx |4 
 sd/source/ui/dlg/dlgchar.cxx  |6 --
 sd/source/ui/dlg/dlgfield.cxx |7 ---
 sd/source/ui/dlg/dlgolbul.cxx |5 -
 sd/source/ui/dlg/dlgpage.cxx  |5 -
 sd/source/ui/dlg/dlgsnap.cxx  |6 --
 sd/source/ui/dlg/headerfooterdlg.cxx  |5 -
 sd/source/ui/dlg/inspagob.cxx |6 --
 sd/source/ui/dlg/masterlayoutdlg.cxx  |5 -
 sd/source/ui/dlg/morphdlg.cxx |5 -
 sd/source/ui/dlg/paragr.cxx   |5 -
 sd/source/ui/dlg/present.cxx  |4 
 sd/source/ui/dlg/prltempl.cxx |6 --
 sd/source/ui/dlg/prntopts.cxx |6 --
 sd/source/ui/dlg/sddlgfact.cxx|5 -
 sd/source/ui/dlg/sdpreslt.cxx |6 --
 sd/source/ui/dlg/sduiexp.cxx  |5 -
 sd/source/ui/dlg/tabtempl.cxx |5 -
 sd/source/ui/dlg/tpaction.cxx |5 -
 sd/source/ui/dlg/tpoption.cxx |5 -
 sd/source/ui/dlg/vectdlg.cxx  |4 
 31 files changed, 154 deletions(-)

New commits:
commit b1b4695b71368b970ca6fb60b2ae697b1bddd2ac
Author: Stephan Bergmann 
Date:   Thu Mar 21 18:39:38 2013 +0100

No (more?) reason for SD_DLLIMPLEMENTATION in CppunitTest_sd_uimpress

IIRC, this was a quirk with the old build system, dutifully carried across.

Change-Id: Ia66fe04666472a37bdb5f044aa7db09bb337e5eb

diff --git a/sd/CppunitTest_sd_uimpress.mk b/sd/CppunitTest_sd_uimpress.mk
index 094ee32..61af411 100644
--- a/sd/CppunitTest_sd_uimpress.mk
+++ b/sd/CppunitTest_sd_uimpress.mk
@@ -32,10 +32,6 @@ $(eval $(call gb_CppunitTest_set_include,sd_uimpress,\
 -I$(SRCDIR)/sd/inc \
 ))
 
-$(eval $(call gb_CppunitTest_add_defs,sd_uimpress,\
--DSD_DLLIMPLEMENTATION \
-))
-
 $(eval $(call gb_CppunitTest_use_api,sd_uimpress,\
 offapi \
 udkapi \
commit e1c53130a77beec74aefc4cf336229ce76f0870d
Author: Stephan Bergmann 
Date:   Thu Mar 21 18:38:12 2013 +0100

No (more?) reason for SD_DLLIMPLEMENTATION in Library_sdfilt

IIRC, this was a quirk with the old build system, dutifully carried across.

Change-Id: Id2bc5efb645abd3f3074a9e363d643f88d107d1b

diff --git a/sd/Library_sdfilt.mk b/sd/Library_sdfilt.mk
index 5a3..f667dd2 100644
--- a/sd/Library_sdfilt.mk
+++ b/sd/Library_sdfilt.mk
@@ -32,10 +32,6 @@ $(eval $(call gb_Library_set_include,sdfilt,\
 -I$(SRCDIR)/sd/inc \
 ))
 
-$(eval $(call gb_Library_add_defs,sdfilt,\
--DSD_DLLIMPLEMENTATION \
-))
-
 ifneq ($(strip $(dbg_anim_log)$(DBG_ANIM_LOG)),)
 $(eval $(call gb_Library_add_defs,sdfilt,\
 -DDBG_ANIM_LOG \
commit 8da8952561c677dfc3a60f61e93ad880f37714be
Author: Stephan Bergmann 
Date:   Thu Mar 21 18:17:07 2013 +0100

No (more?) reason for SD_DLLIMPLEMENTATION in Library_sdui

In practice, all of the .cxx of that library (except for a handful of newly
introduced ones that had failed to follow the cargo cult) undefined it first
thing before including anything else, anyway.  IIRC, this was a quirk with 
the
old build system, that had dutifully been carried across.

Change-Id: I7642c21af48e15b14f245bbbf3d38fdd365c3c89

diff --git a/sd/Library_sdui.mk b/sd/Library_sdui.mk
index 0501234..a94b757 100644
--- a/sd/Library_sdui.mk
+++ b/sd/Library_sdui.mk
@@ -33,10 +33,6 @@ $(eval $(call gb_Library_set_include,sdui,\
 -I$(SRCDIR)/sd/source/ui/inc \
 ))
 
-$(eval $(call gb_Library_add_defs,sdui,\
--DSD_DLLIMPLEMENTATION \
-))
-
 ifeq ($(ENABLE_SDREMOTE),YES)
 $(eval $(call gb_Library_add_defs,sdui,\
 -DENABLE_SDREMOTE \
diff --git a/sd/source/filter/html/htmlattr.cxx 
b/sd/source/filter/html/htmlattr.cxx
index 1d29675..21ca43a 100644
--- a/sd/source/filter/html/htmlattr.cxx
+++ b/sd/source/filter/html/htmlattr.cxx
@@ -17,11 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-
-#ifdef SD_DLLIMPLEMENTATION
-#undef SD_DLLIMPLEMENTATION
-#endif
-
 #include "htmlattr.hxx"
 #include "htmlex.hxx"
 #include 
diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx
index 0d42988..092cd99 100644
--- a/sd/source/filter/html/pubdlg.cxx
+++ b/sd/source/filter/html/pubdlg.cxx
@@ -17,10 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-
-#ifdef SD_DLLIMPLEMENTATION
-#undef SD_DLLIMPLEMENTATION
-#endif
 #include 
 #include 
 #include 
diff --git a/sd/source

Re: Minutes of ESC call

2013-03-22 Thread Rob Snelders

Op 21-03-13 17:28, Jan Holesovsky schreef:


+ BSA has now French version
+ such bugs go to the French ML first, they'll translate them to
  English & file


Well.. not completely. The mail still doesn't arrive at the fr-qa-list. 
I don't know why and will try next week to solve it.


--
Greetings,
Rob Snelders
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


  1   2   >