[Libreoffice-commits] .: set_soenv.in

2011-12-07 Thread Tor Lillqvist
 set_soenv.in |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 79b00c41863bcb0d0cc1781d18e97d5871667fb0
Author: Tor Lillqvist 
Date:   Mon Dec 5 12:31:09 2011 +0200

Avoid pointless warning for Android

diff --git a/set_soenv.in b/set_soenv.in
index b3ae895..8248af8 100755
--- a/set_soenv.in
+++ b/set_soenv.in
@@ -1352,6 +1352,9 @@ elsif ($platform =~ m/darwin/ && $platform !~ m/^arm/)
 elsif ($platform =~ m/^arm-apple/)
 {
 }
+elsif ($platform =~ m/linux-androideabi$/)
+{
+}
 else
 {  AddWarning( "set_soenv", "$platform not configured for system dependant 
include dir" );
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: basic/inc basic/Package_inc.mk

2011-12-07 Thread August Sodora
 basic/Package_inc.mk|1 
 basic/inc/basic/mybasic.hxx |  104 
 2 files changed, 105 deletions(-)

New commits:
commit 003dbb74921f09c29528357340ac8f26f1de2513
Author: August Sodora 
Date:   Thu Dec 8 01:29:19 2011 -0500

Remove basic/mybasic.hxx

diff --git a/basic/Package_inc.mk b/basic/Package_inc.mk
index 28817fb..0f6b253 100644
--- a/basic/Package_inc.mk
+++ b/basic/Package_inc.mk
@@ -34,7 +34,6 @@ $(eval $(call 
gb_Package_add_file,basic_inc,inc/basic/basmgr.hxx,basic/basmgr.hx
 $(eval $(call 
gb_Package_add_file,basic_inc,inc/basic/basrdll.hxx,basic/basrdll.hxx))
 $(eval $(call 
gb_Package_add_file,basic_inc,inc/basic/dispdefs.hxx,basic/dispdefs.hxx))
 $(eval $(call 
gb_Package_add_file,basic_inc,inc/basic/modsizeexceeded.hxx,basic/modsizeexceeded.hxx))
-$(eval $(call 
gb_Package_add_file,basic_inc,inc/basic/mybasic.hxx,basic/mybasic.hxx))
 $(eval $(call 
gb_Package_add_file,basic_inc,inc/basic/process.hxx,basic/process.hxx))
 $(eval $(call 
gb_Package_add_file,basic_inc,inc/basic/sbdef.hxx,basic/sbdef.hxx))
 $(eval $(call 
gb_Package_add_file,basic_inc,inc/basic/sberrors.hxx,basic/sberrors.hxx))
diff --git a/basic/inc/basic/mybasic.hxx b/basic/inc/basic/mybasic.hxx
deleted file mode 100644
index aae5fd7..000
--- a/basic/inc/basic/mybasic.hxx
+++ /dev/null
@@ -1,104 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * 
- * for a copy of the LGPLv3 License.
- *
- /
-
-#ifndef _MYBASIC_HXX
-#define _MYBASIC_HXX
-
-#include 
-#include 
-#include "basicdllapi.h"
-
-class BasicApp;
-class AppBasEd;
-class ErrorEntry;
-
-#define SBXID_MYBASIC   0x594D  // MyBasic: MY
-#define SBXCR_TEST  0x54534554  // TEST
-
-//-
-class BasicError {
-AppBasEd* pWin;
-sal_uInt16  nLine, nCol1, nCol2;
-String aText;
-public:
-BasicError( AppBasEd*, sal_uInt16, const String&, sal_uInt16, sal_uInt16, 
sal_uInt16 );
-void Show();
-};
-
-//-
-class MyBasic : public StarBASIC
-{
-SbError nError;
-virtual sal_Bool ErrorHdl();
-virtual sal_uInt16 BreakHdl();
-
-protected:
-::std::vector< BasicError* > aErrors;
-size_t CurrentError;
-Link GenLogHdl();
-Link GenWinInfoHdl();
-Link GenModuleWinExistsHdl();
-Link GenWriteStringHdl();
-
-virtual void StartListeningTT( SfxBroadcaster &rBroadcaster );
-
-String GenRealString( const String &aResString );
-
-public:
-SBX_DECL_PERSIST_NODATA(SBXCR_TEST,SBXID_MYBASIC,1);
-TYPEINFO();
-MyBasic();
-virtual ~MyBasic();
-virtual sal_Bool Compile( SbModule* );
-void Reset();
-SbError GetErrors() { return nError; }
-size_t GetCurrentError() { return CurrentError; }
-BasicError* FirstError();
-BasicError* NextError();
-BasicError* PrevError();
-
-// Do not use #ifdefs here because this header file is both used for 
testtool and basic
-SbxObject *pTestObject; // for Testool; otherwise NULL
-
-virtual void LoadIniFile();
-
-// Determines the extended symbol type for syntax highlighting
-virtual SbTextType GetSymbolType( const String &Symbol, sal_Bool 
bWasTTControl );
-virtual const String GetSpecialErrorText();
-virtual void ReportRuntimeError( AppBasEd *pEditWin );
-virtual void DebugFindNoErrors( sal_Bool bDebugFindNoErrors );
-
-static void SetCompileModule( SbModule *pMod );
-static SbModule *GetCompileModule();
-};
-
-SV_DECL_IMPL_REF(MyBasic)
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] .: basic/inc basic/Package_inc.mk

2011-12-07 Thread August Sodora
 basic/Package_inc.mk|1 
 basic/inc/basic/basicrt.hxx |   82 
 2 files changed, 83 deletions(-)

New commits:
commit f5ba057f24c322d32614b1f040cd9c8255c92255
Author: August Sodora 
Date:   Thu Dec 8 01:26:09 2011 -0500

Remove basic/basicrt.hxx

diff --git a/basic/Package_inc.mk b/basic/Package_inc.mk
index 26fb8df..28817fb 100644
--- a/basic/Package_inc.mk
+++ b/basic/Package_inc.mk
@@ -30,7 +30,6 @@ $(eval $(call 
gb_Package_Package,basic_inc,$(SRCDIR)/basic/inc))
 
 $(eval $(call 
gb_Package_add_file,basic_inc,inc/basic/basicdllapi.h,basic/basicdllapi.h))
 $(eval $(call 
gb_Package_add_file,basic_inc,inc/basic/basicmanagerrepository.hxx,basic/basicmanagerrepository.hxx))
-$(eval $(call 
gb_Package_add_file,basic_inc,inc/basic/basicrt.hxx,basic/basicrt.hxx))
 $(eval $(call 
gb_Package_add_file,basic_inc,inc/basic/basmgr.hxx,basic/basmgr.hxx))
 $(eval $(call 
gb_Package_add_file,basic_inc,inc/basic/basrdll.hxx,basic/basrdll.hxx))
 $(eval $(call 
gb_Package_add_file,basic_inc,inc/basic/dispdefs.hxx,basic/dispdefs.hxx))
diff --git a/basic/inc/basic/basicrt.hxx b/basic/inc/basic/basicrt.hxx
deleted file mode 100644
index 4e6b4de..000
--- a/basic/inc/basic/basicrt.hxx
+++ /dev/null
@@ -1,82 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * 
- * for a copy of the LGPLv3 License.
- *
- /
-#ifndef _BASICRT_HXX
-#define _BASICRT_HXX
-
-#include 
-#include 
-#include "basicdllapi.h"
-
-class SbiRuntime;
-class SbErrorStackEntry;
-
-class BasicRuntime
-{
-SbiRuntime* pRun;
-public:
-BasicRuntime( SbiRuntime* p ) : pRun ( p ){;}
-const String GetSourceRevision();
-const String GetModuleName( SbxNameType nType );
-const String GetMethodName( SbxNameType nType );
-xub_StrLen GetLine();
-xub_StrLen GetCol1();
-xub_StrLen GetCol2();
-sal_Bool IsRun();
-sal_Bool IsValid() { return pRun != NULL; }
-BasicRuntime GetNextRuntime();
-};
-
-class BasicErrorStackEntry
-{
-SbErrorStackEntry *pEntry;
-public:
-BasicErrorStackEntry( SbErrorStackEntry *p ) : pEntry ( p ){;}
-const String GetSourceRevision();
-const String GetModuleName( SbxNameType nType );
-const String GetMethodName( SbxNameType nType );
-xub_StrLen GetLine();
-xub_StrLen GetCol1();
-xub_StrLen GetCol2();
-};
-
-class BasicRuntimeAccess
-{
-public:
-static BasicRuntime GetRuntime();
-static bool HasRuntime();
-static sal_uInt16 GetStackEntryCount();
-static BasicErrorStackEntry GetStackEntry( sal_uInt16 nIndex );
-static sal_Bool HasStack();
-static void DeleteStack();
-
-static sal_Bool IsRunInit();
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: desktop/source

2011-12-07 Thread August Sodora
 desktop/source/app/app.cxx |   56 -
 1 file changed, 56 deletions(-)

New commits:
commit d697ecf6a0a69ffa929de38f2ef7e779a2d7360e
Author: August Sodora 
Date:   Thu Dec 8 00:59:57 2011 -0500

Remove unnecessary includes

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 49a060e..381508c 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -26,22 +26,12 @@
  *
  /
 
-
-#include 
-#include 
-
-#include 
-#include 
 #include "app.hxx"
 #include "desktop.hrc"
-#include "appinit.hxx"
-#include "officeipcthread.hxx"
 #include "cmdlineargs.hxx"
-#include "desktopresid.hxx"
 #include "dispatchwatcher.hxx"
 #include "configinit.hxx"
 #include "lockfile.hxx"
-#include "cmdlinehelp.hxx"
 #include "userinstall.hxx"
 #include "desktopcontext.hxx"
 #include "exithelper.hxx"
@@ -53,101 +43,55 @@
 #include 
 #include 
 #include 
-#include 
-#include 
 #include 
-#include 
 #include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
 #include 
 #include 
 #include 
-#include 
-#include 
 #include 
 #include 
-#include 
 #include 
-#include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
 #include 
 #include 
-#include 
-#include 
-#include 
 #include 
 #include 
-#include 
-#include 
-#include 
-#include 
 #include 
 #include 
 #include 
 
-#include 
-#include 
 #include 
-#include 
-#include 
 #include 
 #include 
 #include 
 #include 
-#include 
 #include 
-#include 
-#include 
-#include 
 #include 
-#include 
 #include 
 #include 
-#include 
-#include 
-#include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
-#include 
-#include 
 #include 
-#include 
 #include 
-#include 
-#include 
 #include 
-#include 
 #include 
 #include 
-#include 
-#include 
-#include 
 #include 
 #include 
 #include 
 #include 
 #include 
-#include 
-#include 
 
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include "langselect.hxx"
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sc/source

2011-12-07 Thread Tor Lillqvist
 sc/source/ui/src/namedefdlg.src |2 +-
 sc/source/ui/src/namedlg.src|2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit ff60c8c01c4a2e4447a310dcc7f0a68206eb157f
Author: Olivier Hallot 
Date:   Wed Dec 7 15:56:17 2011 -0200

Fix for bug fdo43586, need more room for localized string

This patch fixzex bug fdo43586, more room needed for localized strings in 
named range dialog.

diff --git a/sc/source/ui/src/namedefdlg.src b/sc/source/ui/src/namedefdlg.src
index 1a19f0b..42538dd 100644
--- a/sc/source/ui/src/namedefdlg.src
+++ b/sc/source/ui/src/namedefdlg.src
@@ -55,7 +55,7 @@ ModelessDialog RID_SCDLG_NAMES_DEFINE
 CheckBox BTN_MORE
 {
 Pos = MAP_APPFONT( 5, 82 );
-Size = MAP_APPFONT( 60, 15 );
+Size = MAP_APPFONT( 80, 15 );
 Text [en-US] = "Range Options";
 };
 FixedText FT_INFO
diff --git a/sc/source/ui/src/namedlg.src b/sc/source/ui/src/namedlg.src
index 3e2eb42..6c1c46a 100644
--- a/sc/source/ui/src/namedlg.src
+++ b/sc/source/ui/src/namedlg.src
@@ -128,7 +128,7 @@ ModelessDialog RID_SCDLG_NAMES
 {
 HelpID = "sc:MoreButton:RID_SCDLG_NAMES:BTN_MORE";
 Pos = MAP_APPFONT ( 5 , 185 ) ;
-Size = MAP_APPFONT ( 50 , 15 ) ;
+Size = MAP_APPFONT ( 80 , 15 ) ;
 Text [en-US] = "Range Options";
 };
 FixedLine FL_DIV
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2011-12-07 Thread Kohei Yoshida
 sc/source/filter/xml/xmlsubti.cxx |   72 +++---
 1 file changed, 44 insertions(+), 28 deletions(-)

New commits:
commit 821c45defbb86f7dcb981eeb375beb2b7affe601
Author: Kohei Yoshida 
Date:   Wed Dec 7 23:53:56 2011 -0500

We need to set the current cell range object regardless of style name.

Otherwise we would fail to import the cell contents of those documents
that don't include table styles at all.  Some hand-crafted ods documents
don't provide table styles, which 3.4 imported just fine.

diff --git a/sc/source/filter/xml/xmlsubti.cxx 
b/sc/source/filter/xml/xmlsubti.cxx
index 004fadb..32684b7 100644
--- a/sc/source/filter/xml/xmlsubti.cxx
+++ b/sc/source/filter/xml/xmlsubti.cxx
@@ -170,6 +170,29 @@ ScMyTables::~ScMyTables()
 {
 }
 
+namespace {
+
+uno::Reference getCurrentSheet(const 
uno::Reference& xModel, SCTAB nSheet)
+{
+uno::Reference xSheet;
+uno::Reference xSpreadDoc(xModel, 
uno::UNO_QUERY);
+if (!xSpreadDoc.is())
+return xSheet;
+
+uno::Reference  xSheets(xSpreadDoc->getSheets());
+if (!xSheets.is())
+return xSheet;
+
+uno::Reference  xIndex(xSheets, uno::UNO_QUERY);
+if (!xIndex.is())
+return xSheet;
+
+xSheet.set(xIndex->getByIndex(nSheet), uno::UNO_QUERY);
+return xSheet;
+}
+
+}
+
 void ScMyTables::NewSheet(const rtl::OUString& sTableName, const 
rtl::OUString& sStyleName,
   const ScXMLTabProtectionData& rProtectData)
 {
@@ -192,7 +215,14 @@ void ScMyTables::NewSheet(const rtl::OUString& sTableName, 
const rtl::OUString&
 pDoc->SetTabNameOnLoad(nCurrentSheet, sTableName);
 
 rImport.SetTableStyle(sStyleName);
-SetTableStyle(sStyleName);
+xCurrentSheet = getCurrentSheet(rImport.GetModel(), nCurrentSheet);
+if (xCurrentSheet.is())
+{
+// We need to set the current cell range here regardless of
+// presence of style name.
+xCurrentCellRange.set(xCurrentSheet, uno::UNO_QUERY);
+SetTableStyle(sStyleName);
+}
 }
 
 NewTable(1);
@@ -212,37 +242,23 @@ void ScMyTables::SetTableStyle(const rtl::OUString& 
sStyleName)
 // RTL layout is only remembered, not actually applied, so the shapes 
can
 // be loaded before mirroring.
 
-uno::Reference  xSpreadDoc( 
rImport.GetModel(), uno::UNO_QUERY );
-
-if ( xSpreadDoc.is() )
+if ( xCurrentSheet.is() )
 {
-uno::Reference  
xSheets(xSpreadDoc->getSheets());
-if ( xSheets.is() )
+xCurrentCellRange.set(xCurrentSheet, uno::UNO_QUERY);
+uno::Reference  xProperties(xCurrentSheet, 
uno::UNO_QUERY);
+if ( xProperties.is() )
 {
-uno::Reference  xIndex( xSheets, 
uno::UNO_QUERY );
-if ( xIndex.is() )
+XMLTableStylesContext *pStyles = (XMLTableStylesContext 
*)rImport.GetAutoStyles();
+if ( pStyles )
 {
-xCurrentSheet.set(xIndex->getByIndex(nCurrentSheet), 
uno::UNO_QUERY);
-if ( xCurrentSheet.is() )
+XMLTableStyleContext* pStyle = (XMLTableStyleContext 
*)pStyles->FindStyleChildContext(
+XML_STYLE_FAMILY_TABLE_TABLE, sStyleName, true);
+if ( pStyle )
 {
-xCurrentCellRange.set(xCurrentSheet, uno::UNO_QUERY);
-uno::Reference  
xProperties(xCurrentSheet, uno::UNO_QUERY);
-if ( xProperties.is() )
-{
-XMLTableStylesContext *pStyles = 
(XMLTableStylesContext *)rImport.GetAutoStyles();
-if ( pStyles )
-{
-XMLTableStyleContext* pStyle = 
(XMLTableStyleContext *)pStyles->FindStyleChildContext(
-XML_STYLE_FAMILY_TABLE_TABLE, 
sStyleName, true);
-if ( pStyle )
-{
-pStyle->FillPropertySet(xProperties);
-
-ScSheetSaveData* pSheetData = 
ScModelObj::getImplementation(rImport.GetModel())->GetSheetSaveData();
-pSheetData->AddTableStyle( sStyleName, 
ScAddress( 0, 0, nCurrentSheet ) );
-}
-}
-}
+pStyle->FillPropertySet(xProperties);
+
+ScSheetSaveData* pSheetData = 
ScModelObj::getImplementation(rImport.GetModel())->GetSheetSaveData();
+pSheetData->AddTableStyle( sStyleName, ScAddress( 0, 
0, nCurrentSheet ) );
 }
 }
 }
___
Libreoffice-commits mailing l

[Libreoffice-commits] .: sc/source

2011-12-07 Thread Kohei Yoshida
 sc/source/filter/xml/xmlsubti.cxx |   72 +++---
 1 file changed, 44 insertions(+), 28 deletions(-)

New commits:
commit 8d86abbc361ea3745cbe33b8bd1651c849eb58e6
Author: Kohei Yoshida 
Date:   Wed Dec 7 23:53:56 2011 -0500

We need to set the current cell range object regardless of style name.

Otherwise we would fail to import the cell contents of those documents
that don't include table styles at all.  Some hand-crafted ods documents
don't provide table styles, which 3.4 imported just fine.

diff --git a/sc/source/filter/xml/xmlsubti.cxx 
b/sc/source/filter/xml/xmlsubti.cxx
index 004fadb..32684b7 100644
--- a/sc/source/filter/xml/xmlsubti.cxx
+++ b/sc/source/filter/xml/xmlsubti.cxx
@@ -170,6 +170,29 @@ ScMyTables::~ScMyTables()
 {
 }
 
+namespace {
+
+uno::Reference getCurrentSheet(const 
uno::Reference& xModel, SCTAB nSheet)
+{
+uno::Reference xSheet;
+uno::Reference xSpreadDoc(xModel, 
uno::UNO_QUERY);
+if (!xSpreadDoc.is())
+return xSheet;
+
+uno::Reference  xSheets(xSpreadDoc->getSheets());
+if (!xSheets.is())
+return xSheet;
+
+uno::Reference  xIndex(xSheets, uno::UNO_QUERY);
+if (!xIndex.is())
+return xSheet;
+
+xSheet.set(xIndex->getByIndex(nSheet), uno::UNO_QUERY);
+return xSheet;
+}
+
+}
+
 void ScMyTables::NewSheet(const rtl::OUString& sTableName, const 
rtl::OUString& sStyleName,
   const ScXMLTabProtectionData& rProtectData)
 {
@@ -192,7 +215,14 @@ void ScMyTables::NewSheet(const rtl::OUString& sTableName, 
const rtl::OUString&
 pDoc->SetTabNameOnLoad(nCurrentSheet, sTableName);
 
 rImport.SetTableStyle(sStyleName);
-SetTableStyle(sStyleName);
+xCurrentSheet = getCurrentSheet(rImport.GetModel(), nCurrentSheet);
+if (xCurrentSheet.is())
+{
+// We need to set the current cell range here regardless of
+// presence of style name.
+xCurrentCellRange.set(xCurrentSheet, uno::UNO_QUERY);
+SetTableStyle(sStyleName);
+}
 }
 
 NewTable(1);
@@ -212,37 +242,23 @@ void ScMyTables::SetTableStyle(const rtl::OUString& 
sStyleName)
 // RTL layout is only remembered, not actually applied, so the shapes 
can
 // be loaded before mirroring.
 
-uno::Reference  xSpreadDoc( 
rImport.GetModel(), uno::UNO_QUERY );
-
-if ( xSpreadDoc.is() )
+if ( xCurrentSheet.is() )
 {
-uno::Reference  
xSheets(xSpreadDoc->getSheets());
-if ( xSheets.is() )
+xCurrentCellRange.set(xCurrentSheet, uno::UNO_QUERY);
+uno::Reference  xProperties(xCurrentSheet, 
uno::UNO_QUERY);
+if ( xProperties.is() )
 {
-uno::Reference  xIndex( xSheets, 
uno::UNO_QUERY );
-if ( xIndex.is() )
+XMLTableStylesContext *pStyles = (XMLTableStylesContext 
*)rImport.GetAutoStyles();
+if ( pStyles )
 {
-xCurrentSheet.set(xIndex->getByIndex(nCurrentSheet), 
uno::UNO_QUERY);
-if ( xCurrentSheet.is() )
+XMLTableStyleContext* pStyle = (XMLTableStyleContext 
*)pStyles->FindStyleChildContext(
+XML_STYLE_FAMILY_TABLE_TABLE, sStyleName, true);
+if ( pStyle )
 {
-xCurrentCellRange.set(xCurrentSheet, uno::UNO_QUERY);
-uno::Reference  
xProperties(xCurrentSheet, uno::UNO_QUERY);
-if ( xProperties.is() )
-{
-XMLTableStylesContext *pStyles = 
(XMLTableStylesContext *)rImport.GetAutoStyles();
-if ( pStyles )
-{
-XMLTableStyleContext* pStyle = 
(XMLTableStyleContext *)pStyles->FindStyleChildContext(
-XML_STYLE_FAMILY_TABLE_TABLE, 
sStyleName, true);
-if ( pStyle )
-{
-pStyle->FillPropertySet(xProperties);
-
-ScSheetSaveData* pSheetData = 
ScModelObj::getImplementation(rImport.GetModel())->GetSheetSaveData();
-pSheetData->AddTableStyle( sStyleName, 
ScAddress( 0, 0, nCurrentSheet ) );
-}
-}
-}
+pStyle->FillPropertySet(xProperties);
+
+ScSheetSaveData* pSheetData = 
ScModelObj::getImplementation(rImport.GetModel())->GetSheetSaveData();
+pSheetData->AddTableStyle( sStyleName, ScAddress( 0, 
0, nCurrentSheet ) );
 }
 }
 }
___
Libreoffice-commits mailing l

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

2011-12-07 Thread Kohei Yoshida
 sc/inc/externalrefmgr.hxx|   16 +-
 sc/source/core/tool/interpr1.cxx |  204 ---
 sc/source/ui/docshell/externalrefmgr.cxx |8 -
 3 files changed, 170 insertions(+), 58 deletions(-)

New commits:
commit c3f5bfb3c6ad03c3582c404c16c1707cddd8a7a7
Author: Kohei Yoshida 
Date:   Wed Dec 7 22:33:44 2011 -0500

fdo#43534: Fully support external references in CELL function.

Some parameters don't work with external references, however, such
as PROTECT, PREFIX and WIDTH.

diff --git a/sc/inc/externalrefmgr.hxx b/sc/inc/externalrefmgr.hxx
index e0f3158..e39ac2e 100644
--- a/sc/inc/externalrefmgr.hxx
+++ b/sc/inc/externalrefmgr.hxx
@@ -107,9 +107,9 @@ public:
 
 struct CellFormat
 {
-boolmbIsSet;
-short   mnType;
-sal_uInt32  mnIndex;
+bool  mbIsSet;
+short mnType;
+sal_uLong mnIndex;
 
 explicit CellFormat();
 };
@@ -118,8 +118,8 @@ private:
 /** individual cell within cached external ref table. */
 struct Cell
 {
-TokenRefmxToken;
-sal_uInt32  mnFmtIndex;
+TokenRef   mxToken;
+sal_uLong  mnFmtIndex;
 };
 typedef ::boost::unordered_mapRowDataType;
 typedef ::boost::unordered_map RowsDataType;
@@ -160,7 +160,7 @@ public:
  *   false _only when_ adding a range of cell
  *   values, for performance reasons.
  */
-SC_DLLPUBLIC void setCell(SCCOL nCol, SCROW nRow, TokenRef pToken, 
sal_uInt32 nFmtIndex = 0, bool bSetCacheRange = true);
+SC_DLLPUBLIC void setCell(SCCOL nCol, SCROW nRow, TokenRef pToken, 
sal_uLong nFmtIndex = 0, bool bSetCacheRange = true);
 SC_DLLPUBLIC TokenRef getCell(SCCOL nCol, SCROW nRow, sal_uInt32* 
pnFmtIndex = NULL) const;
 bool hasRow( SCROW nRow ) const;
 /** Set/clear referenced status flag only if current status is not
@@ -242,7 +242,7 @@ public:
 void setRangeNameTokens(sal_uInt16 nFileId, const ::rtl::OUString& rName, 
TokenArrayRef pArray);
 
 void setCellData(sal_uInt16 nFileId, const ::rtl::OUString& rTabName,
- SCCOL nCol, SCROW nRow, TokenRef pToken, sal_uInt32 
nFmtIndex);
+ SCCOL nCol, SCROW nRow, TokenRef pToken, sal_uLong 
nFmtIndex);
 
 struct SingleRangeData
 {
@@ -681,7 +681,7 @@ private:
 
 void insertRefCell(sal_uInt16 nFileId, const ScAddress& rCell);
 
-void fillCellFormat(sal_uInt32 nFmtIndex, ScExternalRefCache::CellFormat* 
pFmt) const;
+void fillCellFormat(sal_uLong nFmtIndex, ScExternalRefCache::CellFormat* 
pFmt) const;
 
 ScExternalRefCache::TokenRef getSingleRefTokenFromSrcDoc(
 sal_uInt16 nFileId, const ScDocument* pSrcDoc, const ScAddress& rCell,
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 6f552b7..862e92b 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -2055,6 +2055,58 @@ inline bool lcl_FormatHasOpenPar( const SvNumberformat* 
pFormat )
 return pFormat && (pFormat->GetFormatstring().Search( '(' ) != 
STRING_NOTFOUND);
 }
 
+namespace {
+
+void getFormatString(SvNumberFormatter* pFormatter, sal_uLong nFormat, String& 
rFmtStr)
+{
+boolbAppendPrec = true;
+sal_uInt16  nPrec, nLeading;
+boolbThousand, bIsRed;
+pFormatter->GetFormatSpecialInfo( nFormat, bThousand, bIsRed, nPrec, 
nLeading );
+
+switch( pFormatter->GetType( nFormat ) )
+{
+case NUMBERFORMAT_NUMBER:   rFmtStr = (bThousand ? ',' : 'F');  
break;
+case NUMBERFORMAT_CURRENCY: rFmtStr = 'C';  
break;
+case NUMBERFORMAT_SCIENTIFIC:   rFmtStr = 'S';  
break;
+case NUMBERFORMAT_PERCENT:  rFmtStr = 'P';  
break;
+default:
+{
+bAppendPrec = false;
+switch( pFormatter->GetIndexTableOffset( nFormat ) )
+{
+case NF_DATE_SYSTEM_SHORT:
+case NF_DATE_SYS_DMMMYY:
+case NF_DATE_SYS_DDMMYY:
+case NF_DATE_SYS_DDMM:
+case NF_DATE_SYS_DMMM:
+case NF_DATE_DIN_DMMM:
+case NF_DATE_SYS_D:
+case NF_DATE_DIN_D: rFmtStr.AssignAscii( 
RTL_CONSTASCII_STRINGPARAM( "D1" ) );  break;
+case NF_DATE_SYS_DDMMM: rFmtStr.AssignAscii( 
RTL_CONSTASCII_STRINGPARAM( "D2" ) );  break;
+case NF_DATE_SYS_MMYY:  rFmtStr.AssignAscii( 
RTL_CONSTASCII_STRINGPARAM( "D3" ) );  break;
+case NF_DATETIME_SYSTEM_SHORT_HHMM:
+case NF_DATETIME_SYS_DDMM_HHMMSS:
+rFmtStr.AssignAscii( 
RTL_CONSTASCII_STRINGPARAM( "D4" ) );  break;
+case NF_DATE_DIN_MMDD:  rFmtStr.AssignAscii( 
RTL_

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

2011-12-07 Thread Kohei Yoshida
 sc/inc/externalrefmgr.hxx|   16 +-
 sc/source/core/tool/interpr1.cxx |  204 ---
 sc/source/ui/docshell/externalrefmgr.cxx |8 -
 3 files changed, 170 insertions(+), 58 deletions(-)

New commits:
commit 2419d3c2de9ddcf1c9884d4216775ce70f652f5a
Author: Kohei Yoshida 
Date:   Wed Dec 7 22:33:44 2011 -0500

fdo#43534: Fully support external references in CELL function.

Some parameters don't work with external references, however, such
as PROTECT, PREFIX and WIDTH.

diff --git a/sc/inc/externalrefmgr.hxx b/sc/inc/externalrefmgr.hxx
index e0f3158..e39ac2e 100644
--- a/sc/inc/externalrefmgr.hxx
+++ b/sc/inc/externalrefmgr.hxx
@@ -107,9 +107,9 @@ public:
 
 struct CellFormat
 {
-boolmbIsSet;
-short   mnType;
-sal_uInt32  mnIndex;
+bool  mbIsSet;
+short mnType;
+sal_uLong mnIndex;
 
 explicit CellFormat();
 };
@@ -118,8 +118,8 @@ private:
 /** individual cell within cached external ref table. */
 struct Cell
 {
-TokenRefmxToken;
-sal_uInt32  mnFmtIndex;
+TokenRef   mxToken;
+sal_uLong  mnFmtIndex;
 };
 typedef ::boost::unordered_mapRowDataType;
 typedef ::boost::unordered_map RowsDataType;
@@ -160,7 +160,7 @@ public:
  *   false _only when_ adding a range of cell
  *   values, for performance reasons.
  */
-SC_DLLPUBLIC void setCell(SCCOL nCol, SCROW nRow, TokenRef pToken, 
sal_uInt32 nFmtIndex = 0, bool bSetCacheRange = true);
+SC_DLLPUBLIC void setCell(SCCOL nCol, SCROW nRow, TokenRef pToken, 
sal_uLong nFmtIndex = 0, bool bSetCacheRange = true);
 SC_DLLPUBLIC TokenRef getCell(SCCOL nCol, SCROW nRow, sal_uInt32* 
pnFmtIndex = NULL) const;
 bool hasRow( SCROW nRow ) const;
 /** Set/clear referenced status flag only if current status is not
@@ -242,7 +242,7 @@ public:
 void setRangeNameTokens(sal_uInt16 nFileId, const ::rtl::OUString& rName, 
TokenArrayRef pArray);
 
 void setCellData(sal_uInt16 nFileId, const ::rtl::OUString& rTabName,
- SCCOL nCol, SCROW nRow, TokenRef pToken, sal_uInt32 
nFmtIndex);
+ SCCOL nCol, SCROW nRow, TokenRef pToken, sal_uLong 
nFmtIndex);
 
 struct SingleRangeData
 {
@@ -681,7 +681,7 @@ private:
 
 void insertRefCell(sal_uInt16 nFileId, const ScAddress& rCell);
 
-void fillCellFormat(sal_uInt32 nFmtIndex, ScExternalRefCache::CellFormat* 
pFmt) const;
+void fillCellFormat(sal_uLong nFmtIndex, ScExternalRefCache::CellFormat* 
pFmt) const;
 
 ScExternalRefCache::TokenRef getSingleRefTokenFromSrcDoc(
 sal_uInt16 nFileId, const ScDocument* pSrcDoc, const ScAddress& rCell,
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 6f552b7..862e92b 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -2055,6 +2055,58 @@ inline bool lcl_FormatHasOpenPar( const SvNumberformat* 
pFormat )
 return pFormat && (pFormat->GetFormatstring().Search( '(' ) != 
STRING_NOTFOUND);
 }
 
+namespace {
+
+void getFormatString(SvNumberFormatter* pFormatter, sal_uLong nFormat, String& 
rFmtStr)
+{
+boolbAppendPrec = true;
+sal_uInt16  nPrec, nLeading;
+boolbThousand, bIsRed;
+pFormatter->GetFormatSpecialInfo( nFormat, bThousand, bIsRed, nPrec, 
nLeading );
+
+switch( pFormatter->GetType( nFormat ) )
+{
+case NUMBERFORMAT_NUMBER:   rFmtStr = (bThousand ? ',' : 'F');  
break;
+case NUMBERFORMAT_CURRENCY: rFmtStr = 'C';  
break;
+case NUMBERFORMAT_SCIENTIFIC:   rFmtStr = 'S';  
break;
+case NUMBERFORMAT_PERCENT:  rFmtStr = 'P';  
break;
+default:
+{
+bAppendPrec = false;
+switch( pFormatter->GetIndexTableOffset( nFormat ) )
+{
+case NF_DATE_SYSTEM_SHORT:
+case NF_DATE_SYS_DMMMYY:
+case NF_DATE_SYS_DDMMYY:
+case NF_DATE_SYS_DDMM:
+case NF_DATE_SYS_DMMM:
+case NF_DATE_DIN_DMMM:
+case NF_DATE_SYS_D:
+case NF_DATE_DIN_D: rFmtStr.AssignAscii( 
RTL_CONSTASCII_STRINGPARAM( "D1" ) );  break;
+case NF_DATE_SYS_DDMMM: rFmtStr.AssignAscii( 
RTL_CONSTASCII_STRINGPARAM( "D2" ) );  break;
+case NF_DATE_SYS_MMYY:  rFmtStr.AssignAscii( 
RTL_CONSTASCII_STRINGPARAM( "D3" ) );  break;
+case NF_DATETIME_SYSTEM_SHORT_HHMM:
+case NF_DATETIME_SYS_DDMM_HHMMSS:
+rFmtStr.AssignAscii( 
RTL_CONSTASCII_STRINGPARAM( "D4" ) );  break;
+case NF_DATE_DIN_MMDD:  rFmtStr.AssignAscii( 
RTL_

[Libreoffice-commits] .: sc/CppunitTest_sc_datapilotfieldobj.mk sc/qa

2011-12-07 Thread Markus Mohrhard
 sc/CppunitTest_sc_datapilotfieldobj.mk   |3 
 sc/qa/extras/xdatapilotfieldgrouping.cxx |  113 +++
 2 files changed, 115 insertions(+), 1 deletion(-)

New commits:
commit ec3aa099c4c5698ed3c67f60805cf71013655b36
Author: Markus Mohrhard 
Date:   Thu Dec 8 02:12:09 2011 +0100

add test for ScDataPilotFieldObj::XDataPilotFieldGrouping

test XDataPilotFieldGrouping::createDateGrouping is broken

diff --git a/sc/CppunitTest_sc_datapilotfieldobj.mk 
b/sc/CppunitTest_sc_datapilotfieldobj.mk
index 51500f8..05eb85e 100644
--- a/sc/CppunitTest_sc_datapilotfieldobj.mk
+++ b/sc/CppunitTest_sc_datapilotfieldobj.mk
@@ -32,6 +32,7 @@ $(eval $(call 
gb_CppunitTest_CppunitTest,sc_datapilotfieldobj))
 
 $(eval $(call gb_CppunitTest_add_exception_objects,sc_datapilotfieldobj, \
 sc/qa/extras/datapilotfieldobj \
+sc/qa/extras/xdatapilotfieldgrouping \
 ))
 
 $(eval $(call gb_CppunitTest_add_linked_libs,sc_datapilotfieldobj, \
@@ -128,7 +129,7 @@ $(eval $(call 
gb_CppunitTest_add_old_components,sc_datapilotfieldobj,\
 $(eval $(call gb_CppunitTest_set_args,sc_datapilotfieldobj,\
 --headless \
 --protector unoexceptionprotector$(gb_Library_DLLEXT) 
unoexceptionprotector \
-"-env:CONFIGURATION_LAYERS=xcsxcu:$(call 
gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry) module:$(call 
gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry/spool) xcsxcu:$(call 
gb_CppunitTarget__make_url,$(SRCDIR)/sc/qa/unit/data/registry)" \
+"-env:CONFIGURATION_LAYERS=xcsxcu:$(call 
gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry) module:$(call 
gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry/spool) xcsxcu:$(call 
gb_CppunitTarget__make_url,$(OUTDIR)/unittest/registry)" \
 ))
 # .../spool is required for the (somewhat strange) filter configuration
 
diff --git a/sc/qa/extras/xdatapilotfieldgrouping.cxx 
b/sc/qa/extras/xdatapilotfieldgrouping.cxx
new file mode 100644
index 000..938f7f2
--- /dev/null
+++ b/sc/qa/extras/xdatapilotfieldgrouping.cxx
@@ -0,0 +1,113 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License or as specified alternatively below. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * Major Contributor(s):
+ * Copyright (C) 2011 Markus Mohrhard  
(initial developer)
+ *
+ * All Rights Reserved.
+ *
+ * For minor contributions see the git repository.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+namespace ScDataPilotFieldObj {
+
+class ScXDataPilotFieldGrouping : public UnoApiTest
+{
+void testCreateNameGroup();
+void testCreateDateGroup();
+
+CPPUNIT_TEST_SUITE(ScXDataPilotFieldGrouping);
+CPPUNIT_TEST(testCreateNameGroup);
+//broken: fdo#43609
+//CPPUNIT_TEST(testCreateDateGroup);
+CPPUNIT_TEST_SUITE_END();
+
+uno::Reference< sheet::XDataPilotFieldGrouping > init();
+};
+
+void ScXDataPilotFieldGrouping::testCreateNameGroup()
+{
+uno::Reference< sheet::XDataPilotFieldGrouping > xDataPilotFieldGrouping = 
init();
+uno::Reference< sheet::XDataPilotField > xDataPilotField( 
xDataPilotFieldGrouping, UNO_QUERY_THROW );
+uno::Reference< container::XNameAccess > xNameAccess( 
xDataPilotField->getItems(), UNO_QUERY_THROW );
+CPPUNIT_ASSERT(xNameAccess->hasElements());
+
+uno::Sequence< rtl::OUString > aElements = xNameAccess->getElementNames();
+xDataPilotFieldGrouping->createNameGroup( aElements );
+}
+
+void ScXDataPilotFieldGrouping::testCreateDateGroup()
+{
+uno::Reference< sheet::XDataPilotFieldGrouping > xDataPilotFieldGrouping = 
init();
+sheet::DataPilotFieldGroupInfo aGroupInfo;
+aGroupInfo.GroupBy = sheet::DataPilotFieldGroupBy::MONTHS;
+aGroupInfo.HasDateValues = true;
+xDataPilotFieldGrouping->createDateGroup(aGroupInfo);
+}
+
+uno::Reference< sheet::XDataPilotFieldGrouping> 
ScXDataPilotFieldGrouping::init()
+{
+rtl::OUString aFileURL;
+const rtl::OUString 
aFileBase(RTL_CONSTASCII_USTRINGPARAM("scdatapilotfieldobj.ods"));
+createFileURL(aFileBase, aFileURL);
+std::cout << rtl::OUStringToOString(aFileURL, 
RTL_TEXTENCODING_UTF8).getStr() << std::endl;

[Libreoffice-commits] .: solenv/gbuild

2011-12-07 Thread Bjoern Michaelsen
 solenv/gbuild/extensions/post_AuxTargets.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 855115d2f5845502e8619b35666512023584e012
Author: Bjoern Michaelsen 
Date:   Thu Dec 8 00:18:46 2011 +0100

fix typo

diff --git a/solenv/gbuild/extensions/post_AuxTargets.mk 
b/solenv/gbuild/extensions/post_AuxTargets.mk
index f4c653f..5e11850 100644
--- a/solenv/gbuild/extensions/post_AuxTargets.mk
+++ b/solenv/gbuild/extensions/post_AuxTargets.mk
@@ -67,7 +67,7 @@ clean-host:
 clean-build:
if [ -f $(SRCDIR)/dmake/Makefile ] ; then $(GNUMAKE) -C $(SRCDIR)/dmake 
clean; fi
rm -f solenv/*/bin/dmake*
-   $(if $(filter-out $(INPATH),$(INPATH_FOR_BUILD),)rm -rf 
$(SRCDIR)/*/$(INPATH_FOR_BUILD))
+   $(if $(filter-out $(INPATH),$(INPATH_FOR_BUILD)),rm -rf 
$(SRCDIR)/*/$(INPATH_FOR_BUILD))
 
 distclean: clean
if [ -f $(SRCDIR)/dmake/Makefile ] ; then $(GNUMAKE) -C $(SRCDIR)/dmake 
clean; fi
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2011-12-07 Thread Kohei Yoshida
 sc/source/core/tool/interpr1.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 885b66496c5fdf09aa2402c9e2ec18d46933e5b9
Author: Kohei Yoshida 
Date:   Wed Dec 7 17:56:33 2011 -0500

fdo#43534: Reset tab index for SingleRefToVars() call.

Otherwise that method will set #REF! to the cell when it sees the tab
index being -1.  We don't use that index in that code, so it's safe to
do this.

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 2dd5d7a..6f552b7 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -2306,7 +2306,13 @@ void ScInterpreter::ScCellExternal()
 SCCOL nCol;
 SCROW nRow;
 SCTAB nTab;
+aRef.nTab = 0; // -1 for external ref. Plus we don't use this.
 SingleRefToVars(aRef, nCol, nRow, nTab);
+if (nGlobalError)
+{
+PushIllegalParameter();
+return;
+}
 
 ScCellKeywordTranslator::transKeyword(aInfoType, ScGlobal::GetLocale(), 
ocCell);
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sc/source

2011-12-07 Thread Kohei Yoshida
 sc/source/core/tool/interpr1.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit fde3c8527214c4166f94e7b20f5a2823fe894c89
Author: Kohei Yoshida 
Date:   Wed Dec 7 17:56:33 2011 -0500

fdo#43534: Reset tab index for SingleRefToVars() call.

Otherwise that method will set #REF! to the cell when it sees the tab
index being -1.  We don't use that index in that code, so it's safe to
do this.

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 2dd5d7a..6f552b7 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -2306,7 +2306,13 @@ void ScInterpreter::ScCellExternal()
 SCCOL nCol;
 SCROW nRow;
 SCTAB nTab;
+aRef.nTab = 0; // -1 for external ref. Plus we don't use this.
 SingleRefToVars(aRef, nCol, nRow, nTab);
+if (nGlobalError)
+{
+PushIllegalParameter();
+return;
+}
 
 ScCellKeywordTranslator::transKeyword(aInfoType, ScGlobal::GetLocale(), 
ocCell);
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: solenv/gbuild

2011-12-07 Thread Bjoern Michaelsen
 solenv/gbuild/extensions/post_AuxTargets.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4d247bd3c0b3a2d7460dedfb7050260eff2c0999
Author: Bjoern Michaelsen 
Date:   Wed Dec 7 23:50:07 2011 +0100

do not clean INPATH_FOR_BUILD on noncrosscompiles

diff --git a/solenv/gbuild/extensions/post_AuxTargets.mk 
b/solenv/gbuild/extensions/post_AuxTargets.mk
index ce4a5cb..f4c653f 100644
--- a/solenv/gbuild/extensions/post_AuxTargets.mk
+++ b/solenv/gbuild/extensions/post_AuxTargets.mk
@@ -67,7 +67,7 @@ clean-host:
 clean-build:
if [ -f $(SRCDIR)/dmake/Makefile ] ; then $(GNUMAKE) -C $(SRCDIR)/dmake 
clean; fi
rm -f solenv/*/bin/dmake*
-   rm -rf $(SRCDIR)/*/$(INPATH_FOR_BUILD)
+   $(if $(filter-out $(INPATH),$(INPATH_FOR_BUILD),)rm -rf 
$(SRCDIR)/*/$(INPATH_FOR_BUILD))
 
 distclean: clean
if [ -f $(SRCDIR)/dmake/Makefile ] ; then $(GNUMAKE) -C $(SRCDIR)/dmake 
clean; fi
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2011-12-07 Thread Eike Rathke
 formula/source/core/resource/core_resource.src |6 +++---
 sc/source/core/tool/compiler.cxx   |9 +
 2 files changed, 8 insertions(+), 7 deletions(-)

New commits:
commit 3deb83d7a74a0fe026791e7a336ac6ffad9c0026
Author: Eike Rathke 
Date:   Wed Dec 7 23:35:57 2011 +0100

i#106210 store proper ODFF names, accept aliases

Older releases stored a few function names not defined by ODFF, namely
EASTERSUNDAY instead of ORG.OPENOFFICE.EASTERSUNDAY, TDIST instead of
LEGACY.TDIST and B instead of BINOM.DIST.RANGE.

Since OOo/LibO 3.3 the proper function names can be read, additionally to 
the
"wrong" names. Now it's time to write the proper names and still accept the
incorrect ones.

Test cases are attached to AOOo issues:
ORG.OPENOFFICE.EASTERSUNDAY
https://issues.apache.org/ooo/show_bug.cgi?id=112882
LEGACY.TDIST and BINOM.DIST.RANGE
https://issues.apache.org/ooo/show_bug.cgi?id=110229
Note that the FALSE in A2 and A3 is a result of the string comparison of the
actual formula, that differs in separators (, vs ;) only.
(cherry picked from commit a9b03bd19945a90040fd4346599e281a7813efc2)

diff --git a/formula/source/core/resource/core_resource.src 
b/formula/source/core/resource/core_resource.src
index aab02c6..12cb57d 100644
--- a/formula/source/core/resource/core_resource.src
+++ b/formula/source/core/resource/core_resource.src
@@ -192,7 +192,7 @@ Resource RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF
 String SC_OPCODE_ST_DEV_A { Text = "STDEVA" ; };
 String SC_OPCODE_ST_DEV_P { Text = "STDEVP" ; };
 String SC_OPCODE_ST_DEV_P_A { Text = "STDEVPA" ; };
-String SC_OPCODE_B { Text = "B" ; };
+String SC_OPCODE_B { Text = "BINOM.DIST.RANGE" ; };
 String SC_OPCODE_NORM_DIST { Text = "NORMDIST" ; };
 String SC_OPCODE_EXP_DIST { Text = "EXPONDIST" ; };
 String SC_OPCODE_BINOM_DIST { Text = "BINOMDIST" ; };
@@ -273,7 +273,7 @@ Resource RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF
 String SC_OPCODE_BACK_SOLVER { Text = "GOALSEEK" ; };
 String SC_OPCODE_HYP_GEOM_DIST { Text = "HYPGEOMDIST" ; };
 String SC_OPCODE_LOG_NORM_DIST { Text = "LOGNORMDIST" ; };
-String SC_OPCODE_T_DIST { Text = "TDIST" ; };
+String SC_OPCODE_T_DIST { Text = "LEGACY.TDIST" ; };
 String SC_OPCODE_F_DIST { Text = "LEGACY.FDIST" ; };
 String SC_OPCODE_CHI_DIST { Text = "LEGACY.CHIDIST" ; };
 String SC_OPCODE_WEIBULL { Text = "WEIBULL" ; };
@@ -325,7 +325,7 @@ Resource RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF
 String SC_OPCODE_BETA_DIST { Text = "BETADIST" ; };
 String SC_OPCODE_BETA_INV { Text = "BETAINV" ; };
 String SC_OPCODE_WEEK { Text = "ISOWEEKNUM" ; };
-String SC_OPCODE_EASTERSUNDAY { Text = "EASTERSUNDAY" ; };
+String SC_OPCODE_EASTERSUNDAY { Text = "ORG.OPENOFFICE.EASTERSUNDAY" ; };
 String SC_OPCODE_GET_DAY_OF_WEEK { Text = "WEEKDAY" ; };
 String SC_OPCODE_NO_NAME { Text = "#NAME!" ; };
 String SC_OPCODE_STYLE { Text = "ORG.OPENOFFICE.STYLE" ; };
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 3ca041a..66d807f 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -2478,11 +2478,12 @@ bool ScCompiler::IsOpCode( const String& rName, bool 
bInArray )
 };
 static const FunctionName aOdffAliases[] = {
 // Renamed old names:
-// XXX none yet.
+{ "B",  ocB },  // B -> BINOM.DIST.RANGE
+{ "TDIST",  ocTDist },  // TDIST -> LEGACY.TDIST
+{ "EASTERSUNDAY",   ocEasterSunday }// EASTERSUNDAY -> 
ORG.OPENOFFICE.EASTERSUNDAY
 // Renamed new names:
-{ "BINOM.DIST.RANGE",   ocB },  // B -> 
BINOM.DIST.RANGE
-{ "LEGACY.TDIST",   ocTDist },  // TDIST 
-> LEGACY.TDIST
-{ "ORG.OPENOFFICE.EASTERSUNDAY",ocEasterSunday }// 
EASTERSUNDAY -> ORG.OPENOFFICE.EASTERSUNDAY
+// XXX none currently. Example:
+//{ "ORG.OPENOFFICE.EASTERSUNDAY", ocEasterSunday }
 };
 static const size_t nOdffAliases = SAL_N_ELEMENTS(aOdffAliases);
 for (size_t i=0; ihttp://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2011-12-07 Thread Eike Rathke
 formula/source/core/resource/core_resource.src |6 +++---
 sc/source/core/tool/compiler.cxx   |9 +
 2 files changed, 8 insertions(+), 7 deletions(-)

New commits:
commit a9b03bd19945a90040fd4346599e281a7813efc2
Author: Eike Rathke 
Date:   Wed Dec 7 23:35:57 2011 +0100

i#106210 store proper ODFF names, accept aliases

Older releases stored a few function names not defined by ODFF, namely
EASTERSUNDAY instead of ORG.OPENOFFICE.EASTERSUNDAY, TDIST instead of
LEGACY.TDIST and B instead of BINOM.DIST.RANGE.

Since OOo/LibO 3.3 the proper function names can be read, additionally to 
the
"wrong" names. Now it's time to write the proper names and still accept the
incorrect ones.

Test cases are attached to AOOo issues:
ORG.OPENOFFICE.EASTERSUNDAY
https://issues.apache.org/ooo/show_bug.cgi?id=112882
LEGACY.TDIST and BINOM.DIST.RANGE
https://issues.apache.org/ooo/show_bug.cgi?id=110229
Note that the FALSE in A2 and A3 is a result of the string comparison of the
actual formula, that differs in separators (, vs ;) only.

diff --git a/formula/source/core/resource/core_resource.src 
b/formula/source/core/resource/core_resource.src
index aab02c6..12cb57d 100644
--- a/formula/source/core/resource/core_resource.src
+++ b/formula/source/core/resource/core_resource.src
@@ -192,7 +192,7 @@ Resource RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF
 String SC_OPCODE_ST_DEV_A { Text = "STDEVA" ; };
 String SC_OPCODE_ST_DEV_P { Text = "STDEVP" ; };
 String SC_OPCODE_ST_DEV_P_A { Text = "STDEVPA" ; };
-String SC_OPCODE_B { Text = "B" ; };
+String SC_OPCODE_B { Text = "BINOM.DIST.RANGE" ; };
 String SC_OPCODE_NORM_DIST { Text = "NORMDIST" ; };
 String SC_OPCODE_EXP_DIST { Text = "EXPONDIST" ; };
 String SC_OPCODE_BINOM_DIST { Text = "BINOMDIST" ; };
@@ -273,7 +273,7 @@ Resource RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF
 String SC_OPCODE_BACK_SOLVER { Text = "GOALSEEK" ; };
 String SC_OPCODE_HYP_GEOM_DIST { Text = "HYPGEOMDIST" ; };
 String SC_OPCODE_LOG_NORM_DIST { Text = "LOGNORMDIST" ; };
-String SC_OPCODE_T_DIST { Text = "TDIST" ; };
+String SC_OPCODE_T_DIST { Text = "LEGACY.TDIST" ; };
 String SC_OPCODE_F_DIST { Text = "LEGACY.FDIST" ; };
 String SC_OPCODE_CHI_DIST { Text = "LEGACY.CHIDIST" ; };
 String SC_OPCODE_WEIBULL { Text = "WEIBULL" ; };
@@ -325,7 +325,7 @@ Resource RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF
 String SC_OPCODE_BETA_DIST { Text = "BETADIST" ; };
 String SC_OPCODE_BETA_INV { Text = "BETAINV" ; };
 String SC_OPCODE_WEEK { Text = "ISOWEEKNUM" ; };
-String SC_OPCODE_EASTERSUNDAY { Text = "EASTERSUNDAY" ; };
+String SC_OPCODE_EASTERSUNDAY { Text = "ORG.OPENOFFICE.EASTERSUNDAY" ; };
 String SC_OPCODE_GET_DAY_OF_WEEK { Text = "WEEKDAY" ; };
 String SC_OPCODE_NO_NAME { Text = "#NAME!" ; };
 String SC_OPCODE_STYLE { Text = "ORG.OPENOFFICE.STYLE" ; };
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 3ca041a..66d807f 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -2478,11 +2478,12 @@ bool ScCompiler::IsOpCode( const String& rName, bool 
bInArray )
 };
 static const FunctionName aOdffAliases[] = {
 // Renamed old names:
-// XXX none yet.
+{ "B",  ocB },  // B -> BINOM.DIST.RANGE
+{ "TDIST",  ocTDist },  // TDIST -> LEGACY.TDIST
+{ "EASTERSUNDAY",   ocEasterSunday }// EASTERSUNDAY -> 
ORG.OPENOFFICE.EASTERSUNDAY
 // Renamed new names:
-{ "BINOM.DIST.RANGE",   ocB },  // B -> 
BINOM.DIST.RANGE
-{ "LEGACY.TDIST",   ocTDist },  // TDIST 
-> LEGACY.TDIST
-{ "ORG.OPENOFFICE.EASTERSUNDAY",ocEasterSunday }// 
EASTERSUNDAY -> ORG.OPENOFFICE.EASTERSUNDAY
+// XXX none currently. Example:
+//{ "ORG.OPENOFFICE.EASTERSUNDAY", ocEasterSunday }
 };
 static const size_t nOdffAliases = SAL_N_ELEMENTS(aOdffAliases);
 for (size_t i=0; ihttp://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2011-12-07 Thread Kohei Yoshida
 sc/source/filter/inc/rtfparse.hxx |7 +++-
 sc/source/filter/rtf/rtfparse.cxx |   56 +++---
 2 files changed, 34 insertions(+), 29 deletions(-)

New commits:
commit 847c5f9b0281eac52047886e9b3bf40c73e567c2
Author: Kohei Yoshida 
Date:   Wed Dec 7 16:59:10 2011 -0500

fdo#42259: Fixed RTF import crash etc.

This is also another unfortunate bug due to the logic change caused
by the DECLARE_LIST removal.  There was one crasher due to out-of-bound
array access, plus one incorrect behavior concerning cell content
placement.  Both are now fixed.

diff --git a/sc/source/filter/inc/rtfparse.hxx 
b/sc/source/filter/inc/rtfparse.hxx
index 021a0b5..77c82bb 100644
--- a/sc/source/filter/inc/rtfparse.hxx
+++ b/sc/source/filter/inc/rtfparse.hxx
@@ -44,7 +44,6 @@ struct ScRTFCellDefault
 ScRTFCellDefault( SfxItemPool* pPool ) :
 aItemSet( *pPool ), nColOverlap(1) {}
 };
-typedef boost::ptr_vector< ScRTFCellDefault > ScRTFDefaultList;
 
 // deswegen ULONG, typedef bringt's auch nicht :-(
 SV_DECL_VARARR_SORT( ScRTFColTwips, sal_uLong, 16, 4)
@@ -63,7 +62,11 @@ class EditEngine;
 class ScRTFParser : public ScEEParser
 {
 private:
-ScRTFDefaultList*   pDefaultList;
+typedef boost::ptr_vector DefaultList;
+
+DefaultList maDefaultList;
+size_t mnCurPos;
+
 ScRTFColTwips*  pColTwips;
 ScRTFCellDefault*   pInsDefault;
 ScRTFCellDefault*   pActDefault;
diff --git a/sc/source/filter/rtf/rtfparse.cxx 
b/sc/source/filter/rtf/rtfparse.cxx
index e2dc861..4a483c4 100644
--- a/sc/source/filter/rtf/rtfparse.cxx
+++ b/sc/source/filter/rtf/rtfparse.cxx
@@ -57,7 +57,7 @@ SV_IMPL_VARARR_SORT( ScRTFColTwips, sal_uLong );
 
 ScRTFParser::ScRTFParser( EditEngine* pEditP ) :
 ScEEParser( pEditP ),
-pDefaultList( new ScRTFDefaultList ),
+mnCurPos(0),
 pColTwips( new ScRTFColTwips ),
 pActDefault( NULL ),
 pDefMerge( NULL ),
@@ -77,8 +77,7 @@ ScRTFParser::~ScRTFParser()
 {
 delete pInsDefault;
 delete pColTwips;
-pDefaultList->clear();
-delete pDefaultList;
+maDefaultList.clear();
 }
 
 
@@ -234,17 +233,16 @@ void ScRTFParser::NewCellRow( ImportInfo* /*pInfo*/ )
 {
 if ( bNewDef )
 {
-ScRTFCellDefault* pD;
 bNewDef = false;
 // rechts nicht buendig? => neue Tabelle
-if ( nLastWidth && !pDefaultList->empty() )
+if ( nLastWidth && !maDefaultList.empty() )
 {
-pD = &(pDefaultList->back());
-if (pD->nTwips != nLastWidth )
+const ScRTFCellDefault& rD = maDefaultList.back();
+if (rD.nTwips != nLastWidth)
 {
 SCCOL n1, n2;
 if ( !(  SeekTwips( nLastWidth, &n1 )
-  && SeekTwips( pD->nTwips, &n2 )
+  && SeekTwips( rD.nTwips, &n2 )
   && n1 == n2
   )
 )
@@ -254,16 +252,17 @@ void ScRTFParser::NewCellRow( ImportInfo* /*pInfo*/ )
 }
 }
 // TwipCols aufbauen, erst nach nLastWidth Vergleich!
-for ( size_t i = 0, nListSize = pDefaultList->size(); i < nListSize; 
++i )
+for ( size_t i = 0, n = maDefaultList.size(); i < n; ++i )
 {
-pD = &( pDefaultList->at( i ) );
-SCCOL n;
-if ( !SeekTwips( pD->nTwips, &n ) )
-pColTwips->Insert( pD->nTwips );
+const ScRTFCellDefault& rD = maDefaultList[i];
+SCCOL nCol;
+if ( !SeekTwips(rD.nTwips, &nCol) )
+pColTwips->Insert( rD.nTwips );
 }
 }
 pDefMerge = NULL;
-pActDefault = &(pDefaultList->front());
+pActDefault = maDefaultList.empty() ? NULL : &maDefaultList[0];
+mnCurPos = 0;
 OSL_ENSURE( pActDefault, "NewCellRow: pActDefault==0" );
 }
 
@@ -297,18 +296,19 @@ void ScRTFParser::NewCellRow( ImportInfo* /*pInfo*/ )
 
 void ScRTFParser::ProcToken( ImportInfo* pInfo )
 {
-ScRTFCellDefault* pD;
 ScEEParseEntry* pE;
 switch ( pInfo->nToken )
 {
 case RTF_TROWD: // denotes table row defauls, before RTF_CELLX
 {
-if ( !pDefaultList->empty() && (pD = &(pDefaultList->back())) != 0 
)
-nLastWidth = pD->nTwips;
+if (!maDefaultList.empty())
+nLastWidth = maDefaultList.back().nTwips;
+
 nColCnt = 0;
-pDefaultList->clear();
+maDefaultList.clear();
 pDefMerge = NULL;
 nLastToken = pInfo->nToken;
+mnCurPos = 0;
 }
 break;
 case RTF_CLMGF: // The first cell of cells to be merged
@@ -319,10 +319,11 @@ void ScRTFParser::ProcToken( ImportInfo* pInfo )
 break;
 case RTF_CLMRG: // A cell to be merged with the preceding cell
 {
-if ( !pDefMerge
-   && !(pDefaultLi

[Libreoffice-commits] .: sc/source

2011-12-07 Thread Kohei Yoshida
 sc/source/filter/inc/rtfparse.hxx |7 +++-
 sc/source/filter/rtf/rtfparse.cxx |   56 +++---
 2 files changed, 34 insertions(+), 29 deletions(-)

New commits:
commit 4d6b88417fe01a8e4039d495071cd817b4efcc3a
Author: Kohei Yoshida 
Date:   Wed Dec 7 16:59:10 2011 -0500

fdo#42259: Fixed RTF import crash etc.

This is also another unfortunate bug due to the logic change caused
by the DECLARE_LIST removal.  There was one crasher due to out-of-bound
array access, plus one incorrect behavior concerning cell content
placement.  Both are now fixed.

diff --git a/sc/source/filter/inc/rtfparse.hxx 
b/sc/source/filter/inc/rtfparse.hxx
index 021a0b5..77c82bb 100644
--- a/sc/source/filter/inc/rtfparse.hxx
+++ b/sc/source/filter/inc/rtfparse.hxx
@@ -44,7 +44,6 @@ struct ScRTFCellDefault
 ScRTFCellDefault( SfxItemPool* pPool ) :
 aItemSet( *pPool ), nColOverlap(1) {}
 };
-typedef boost::ptr_vector< ScRTFCellDefault > ScRTFDefaultList;
 
 // deswegen ULONG, typedef bringt's auch nicht :-(
 SV_DECL_VARARR_SORT( ScRTFColTwips, sal_uLong, 16, 4)
@@ -63,7 +62,11 @@ class EditEngine;
 class ScRTFParser : public ScEEParser
 {
 private:
-ScRTFDefaultList*   pDefaultList;
+typedef boost::ptr_vector DefaultList;
+
+DefaultList maDefaultList;
+size_t mnCurPos;
+
 ScRTFColTwips*  pColTwips;
 ScRTFCellDefault*   pInsDefault;
 ScRTFCellDefault*   pActDefault;
diff --git a/sc/source/filter/rtf/rtfparse.cxx 
b/sc/source/filter/rtf/rtfparse.cxx
index e2dc861..4a483c4 100644
--- a/sc/source/filter/rtf/rtfparse.cxx
+++ b/sc/source/filter/rtf/rtfparse.cxx
@@ -57,7 +57,7 @@ SV_IMPL_VARARR_SORT( ScRTFColTwips, sal_uLong );
 
 ScRTFParser::ScRTFParser( EditEngine* pEditP ) :
 ScEEParser( pEditP ),
-pDefaultList( new ScRTFDefaultList ),
+mnCurPos(0),
 pColTwips( new ScRTFColTwips ),
 pActDefault( NULL ),
 pDefMerge( NULL ),
@@ -77,8 +77,7 @@ ScRTFParser::~ScRTFParser()
 {
 delete pInsDefault;
 delete pColTwips;
-pDefaultList->clear();
-delete pDefaultList;
+maDefaultList.clear();
 }
 
 
@@ -234,17 +233,16 @@ void ScRTFParser::NewCellRow( ImportInfo* /*pInfo*/ )
 {
 if ( bNewDef )
 {
-ScRTFCellDefault* pD;
 bNewDef = false;
 // rechts nicht buendig? => neue Tabelle
-if ( nLastWidth && !pDefaultList->empty() )
+if ( nLastWidth && !maDefaultList.empty() )
 {
-pD = &(pDefaultList->back());
-if (pD->nTwips != nLastWidth )
+const ScRTFCellDefault& rD = maDefaultList.back();
+if (rD.nTwips != nLastWidth)
 {
 SCCOL n1, n2;
 if ( !(  SeekTwips( nLastWidth, &n1 )
-  && SeekTwips( pD->nTwips, &n2 )
+  && SeekTwips( rD.nTwips, &n2 )
   && n1 == n2
   )
 )
@@ -254,16 +252,17 @@ void ScRTFParser::NewCellRow( ImportInfo* /*pInfo*/ )
 }
 }
 // TwipCols aufbauen, erst nach nLastWidth Vergleich!
-for ( size_t i = 0, nListSize = pDefaultList->size(); i < nListSize; 
++i )
+for ( size_t i = 0, n = maDefaultList.size(); i < n; ++i )
 {
-pD = &( pDefaultList->at( i ) );
-SCCOL n;
-if ( !SeekTwips( pD->nTwips, &n ) )
-pColTwips->Insert( pD->nTwips );
+const ScRTFCellDefault& rD = maDefaultList[i];
+SCCOL nCol;
+if ( !SeekTwips(rD.nTwips, &nCol) )
+pColTwips->Insert( rD.nTwips );
 }
 }
 pDefMerge = NULL;
-pActDefault = &(pDefaultList->front());
+pActDefault = maDefaultList.empty() ? NULL : &maDefaultList[0];
+mnCurPos = 0;
 OSL_ENSURE( pActDefault, "NewCellRow: pActDefault==0" );
 }
 
@@ -297,18 +296,19 @@ void ScRTFParser::NewCellRow( ImportInfo* /*pInfo*/ )
 
 void ScRTFParser::ProcToken( ImportInfo* pInfo )
 {
-ScRTFCellDefault* pD;
 ScEEParseEntry* pE;
 switch ( pInfo->nToken )
 {
 case RTF_TROWD: // denotes table row defauls, before RTF_CELLX
 {
-if ( !pDefaultList->empty() && (pD = &(pDefaultList->back())) != 0 
)
-nLastWidth = pD->nTwips;
+if (!maDefaultList.empty())
+nLastWidth = maDefaultList.back().nTwips;
+
 nColCnt = 0;
-pDefaultList->clear();
+maDefaultList.clear();
 pDefMerge = NULL;
 nLastToken = pInfo->nToken;
+mnCurPos = 0;
 }
 break;
 case RTF_CLMGF: // The first cell of cells to be merged
@@ -319,10 +319,11 @@ void ScRTFParser::ProcToken( ImportInfo* pInfo )
 break;
 case RTF_CLMRG: // A cell to be merged with the preceding cell
 {
-if ( !pDefMerge
-   && !(pDefaultLi

[Libreoffice-commits] .: Branch 'libreoffice-3-5' - instsetoo_native/util

2011-12-07 Thread Petr Mladek
 instsetoo_native/util/openoffice.lst |   36 +--
 1 file changed, 18 insertions(+), 18 deletions(-)

New commits:
commit 9b5e6c1b2f7742f34f26881a104b07d092541142
Author: Petr Mladek 
Date:   Wed Dec 7 22:35:55 2011 +0100

Revert "mention version suffix, e.g. "beta1" in about dialog"

broke build on MAC; need better solution after beta1 tag

This reverts commit fec8058db415db791c51d4a81435cf1f93b304e7.

diff --git a/instsetoo_native/util/openoffice.lst 
b/instsetoo_native/util/openoffice.lst
index d505a06..0cfafc5 100644
--- a/instsetoo_native/util/openoffice.lst
+++ b/instsetoo_native/util/openoffice.lst
@@ -51,9 +51,9 @@ LibreOffice
{
PRODUCTNAME LibreOffice
PRODUCTVERSION 3.5
-   PRODUCTEXTENSION beta1-test 
+   PRODUCTEXTENSION 
LONG_PRODUCTEXTENSION 
-   SHORT_PRODUCTEXTENSION beta1-test
+   SHORT_PRODUCTEXTENSION beta0
 POSTVERSIONEXTENSION
 POSTVERSIONEXTENSIONUNIX
BRANDPACKAGEVERSION 3.5
@@ -109,9 +109,9 @@ LibreOffice_wJRE
{
PRODUCTNAME LibreOffice
PRODUCTVERSION 3.5
-   PRODUCTEXTENSION beta1-test 
+   PRODUCTEXTENSION 
LONG_PRODUCTEXTENSION 
-   SHORT_PRODUCTEXTENSION beta1-test
+   SHORT_PRODUCTEXTENSION beta0
 POSTVERSIONEXTENSION
 POSTVERSIONEXTENSIONUNIX
BRANDPACKAGEVERSION 3.5
@@ -166,9 +166,9 @@ LibreOffice_Dev
{
PRODUCTNAME LOdev
PRODUCTVERSION 3.5
-   PRODUCTEXTENSION beta1-test 
+   PRODUCTEXTENSION 
LONG_PRODUCTEXTENSION 
-   SHORT_PRODUCTEXTENSION beta1-test
+   SHORT_PRODUCTEXTENSION beta0
UNIXBASISROOTNAME lodev3.5
 POSTVERSIONEXTENSION
 POSTVERSIONEXTENSIONUNIX
@@ -234,10 +234,10 @@ URE
 PRODUCTVERSION 3.5
 PACKAGEVERSION 3.5
 PACKAGEREVISION 1
-PRODUCTEXTENSION beta1-test
+PRODUCTEXTENSION
 BRANDPACKAGEVERSION 3.5
 LONG_PRODUCTEXTENSION
-SHORT_PRODUCTEXTENSION beta1-test
+SHORT_PRODUCTEXTENSION beta0
 LICENSENAME LGPL
 SETSTATICPATH 1
 NOVERSIONINDIRNAME 1
@@ -270,9 +270,9 @@ LibreOffice_SDK
 {
 PRODUCTNAME LibreOffice
 PRODUCTVERSION 3.5
-PRODUCTEXTENSION beta1-test
+PRODUCTEXTENSION
 LONG_PRODUCTEXTENSION
-SHORT_PRODUCTEXTENSION beta1-test
+SHORT_PRODUCTEXTENSION beta0
 POSTVERSIONEXTENSION SDK
 POSTVERSIONEXTENSIONUNIX sdk
 BRANDPACKAGEVERSION 3.5
@@ -313,9 +313,9 @@ LibreOffice_Dev_SDK
 {
 PRODUCTNAME LOdev
 PRODUCTVERSION 3.5
-PRODUCTEXTENSION beta1-test
+PRODUCTEXTENSION
 LONG_PRODUCTEXTENSION
-SHORT_PRODUCTEXTENSION beta1-test
+SHORT_PRODUCTEXTENSION beta0
 UNIXBASISROOTNAME lodev3.5
 POSTVERSIONEXTENSION SDK
 POSTVERSIONEXTENSIONUNIX sdk
@@ -362,7 +362,7 @@ LibreOffice_Test
 {
 PRODUCTNAME LibreOffice
 PRODUCTVERSION 3.5
-PRODUCTEXTENSION beta1-test
+PRODUCTEXTENSION
 LONG_PRODUCTEXTENSION
 SHORT_PRODUCTEXTENSION alpha0
 POSTVERSIONEXTENSION TEST
@@ -405,7 +405,7 @@ LibreOffice_Dev_Test
 {
 PRODUCTNAME LOdev
 PRODUCTVERSION 3.5
-PRODUCTEXTENSION beta1-test
+PRODUCTEXTENSION
 LONG_PRODUCTEXTENSION
 SHORT_PRODUCTEXTENSION alpha0
 UNIXBASISROOTNAME lodev3.5
@@ -453,9 +453,9 @@ OxygenOffice
{
PRODUCTNAME OxygenOffice
PRODUCTVERSION 3.5
-   PRODUCTEXTENSION beta1-test
+   PRODUCTEXTENSION
LONG_PRODUCTEXTENSION
-   SHORT_PRODUCTEXTENSION  beta1-test
+   SHORT_PRODUCTEXTENSION  beta0
 POSTVERSIONEXTENSION
 POSTVERSIONEXTENSIONUNIX
BRANDPACKAGEVERSION 3.5
@@ -516,9 +516,9 @@ OxygenOffice_wJRE
{
PRODUCTNAME OxygenOffice
PRODUCTVERSION 3.5
-   PRODUCTEXTENSION beta1-test
+   PRODUCTEXTENSION
LONG_PRODUCTEXTENSION
-   SHORT_PRODUCTEXTENSION beta1-test
+

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

2011-12-07 Thread Fridrich Strba
 connectivity/source/drivers/postgresql/pq_connection.hxx|2 +-
 connectivity/source/drivers/postgresql/pq_databasemetadata.cxx  |2 +-
 connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx |8 
 3 files changed, 2 insertions(+), 10 deletions(-)

New commits:
commit fbe8b005983937e35dafb47a5a146cfbf31132cb
Author: Fridrich Å trba 
Date:   Wed Dec 7 22:21:18 2011 +0100

Fix build of pgsql connector (std::hash -> boost::hash)

Signed-off-by: Fridrich Å trba 

diff --git a/connectivity/source/drivers/postgresql/pq_connection.hxx 
b/connectivity/source/drivers/postgresql/pq_connection.hxx
index 2a34025..1ff8a1a 100644
--- a/connectivity/source/drivers/postgresql/pq_connection.hxx
+++ b/connectivity/source/drivers/postgresql/pq_connection.hxx
@@ -183,7 +183,7 @@ typedef ::boost::unordered_map
 <
 const sal_Int32,
 rtl::OUString,
-::std::hash< sal_Int32 >,
+::boost::hash< sal_Int32 >,
 ::std::equal_to< sal_Int32 >,
 Allocator< ::std::pair< sal_Int32, ::rtl::OUString > >
 > Int2StringMap;
diff --git a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx 
b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
index 28aad9c..d26b150 100644
--- a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
+++ b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
@@ -1455,7 +1455,7 @@ typedef ::boost::unordered_map
 <
 sal_Int32,
 DatabaseTypeDescription,
-::std::hash< sal_Int32 >,
+::boost::hash< sal_Int32 >,
 ::std::equal_to< sal_Int32 >,
 Allocator< ::std::pair< sal_Int32, DatabaseTypeDescription > >
 > Oid2DatabaseTypeDescriptionMap;
diff --git a/connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx 
b/connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx
index 82ee02c..a67ca43 100644
--- a/connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx
+++ b/connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx
@@ -181,14 +181,6 @@ ResultSetMetaData::ResultSetMetaData(
 }
 }
 
-// typedef std::hash_map<
-// Oid,
-// rtl::OUString,
-// std::hash< Oid >,
-// std::equal_to< Oid >,
-// Allocator < std::pair< Oid, rtl::OUString > > >  PqTypeMap;
-
-
 void ResultSetMetaData::checkForTypes()
 {
 if( ! m_checkedForTypes )
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: connectivity/source

2011-12-07 Thread Fridrich Strba
 connectivity/source/drivers/postgresql/pq_connection.hxx|2 +-
 connectivity/source/drivers/postgresql/pq_databasemetadata.cxx  |2 +-
 connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx |8 
 3 files changed, 2 insertions(+), 10 deletions(-)

New commits:
commit e05856c798c227ca2e38d33d5e30aad2f711b8bb
Author: Fridrich Å trba 
Date:   Wed Dec 7 22:21:18 2011 +0100

Fix build of pgsql connector (std::hash -> boost::hash)

diff --git a/connectivity/source/drivers/postgresql/pq_connection.hxx 
b/connectivity/source/drivers/postgresql/pq_connection.hxx
index 2a34025..1ff8a1a 100644
--- a/connectivity/source/drivers/postgresql/pq_connection.hxx
+++ b/connectivity/source/drivers/postgresql/pq_connection.hxx
@@ -183,7 +183,7 @@ typedef ::boost::unordered_map
 <
 const sal_Int32,
 rtl::OUString,
-::std::hash< sal_Int32 >,
+::boost::hash< sal_Int32 >,
 ::std::equal_to< sal_Int32 >,
 Allocator< ::std::pair< sal_Int32, ::rtl::OUString > >
 > Int2StringMap;
diff --git a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx 
b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
index 28aad9c..d26b150 100644
--- a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
+++ b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
@@ -1455,7 +1455,7 @@ typedef ::boost::unordered_map
 <
 sal_Int32,
 DatabaseTypeDescription,
-::std::hash< sal_Int32 >,
+::boost::hash< sal_Int32 >,
 ::std::equal_to< sal_Int32 >,
 Allocator< ::std::pair< sal_Int32, DatabaseTypeDescription > >
 > Oid2DatabaseTypeDescriptionMap;
diff --git a/connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx 
b/connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx
index 82ee02c..a67ca43 100644
--- a/connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx
+++ b/connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx
@@ -181,14 +181,6 @@ ResultSetMetaData::ResultSetMetaData(
 }
 }
 
-// typedef std::hash_map<
-// Oid,
-// rtl::OUString,
-// std::hash< Oid >,
-// std::equal_to< Oid >,
-// Allocator < std::pair< Oid, rtl::OUString > > >  PqTypeMap;
-
-
 void ResultSetMetaData::checkForTypes()
 {
 if( ! m_checkedForTypes )
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - desktop/Executable_soffice.bin.mk

2011-12-07 Thread Andras Timar
 desktop/Executable_soffice.bin.mk |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 01d59b7a07e88b136f306e335a497b3d8354201b
Author: Andras Timar 
Date:   Wed Dec 7 20:36:21 2011 +0100

link icons to soffice.bin fdo#42979

diff --git a/desktop/Executable_soffice.bin.mk 
b/desktop/Executable_soffice.bin.mk
index e4665e8..a4aa573 100644
--- a/desktop/Executable_soffice.bin.mk
+++ b/desktop/Executable_soffice.bin.mk
@@ -102,4 +102,6 @@ $(eval $(call gb_Executable_set_ldflags,\
 
 endif
 
+$(eval $(call gb_Executable_add_nativeres,$(sofficebin),soffice/src)) 
+
 # vim: set ts=4 sw=4 et:
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - RepositoryModule_ooo.mk

2011-12-07 Thread Eike Rathke
 RepositoryModule_ooo.mk |1 -
 1 file changed, 1 deletion(-)

New commits:
commit a3e2fbcb8e9de9724babd1b5776483d7a4166329
Author: Bjoern Michaelsen 
Date:   Wed Dec 7 17:07:18 2011 +0100

fix rebase mismatch: automation is gone
(cherry picked from commit d432b00bfa05b1bd1413fb0b9afac19de5c1f60b)

diff --git a/RepositoryModule_ooo.mk b/RepositoryModule_ooo.mk
index 3297d95..f59b2e0 100644
--- a/RepositoryModule_ooo.mk
+++ b/RepositoryModule_ooo.mk
@@ -30,7 +30,6 @@ $(eval $(call gb_Module_Module,ooo))
 
 $(eval $(call gb_Module_add_moduledirs,ooo,\
 animations \
-automation \
 basctl \
 basebmp \
 basegfx \
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: bin/distro-install-file-lists cui/source desktop/source padmin/source tools/inc tools/Library_tl.mk tools/Package_inc.mk tools/source

2011-12-07 Thread August Sodora
 bin/distro-install-file-lists  |4 
 cui/source/options/optimprove.cxx  |2 
 cui/source/options/optimprove2.cxx |4 
 desktop/source/app/app.cxx |7 
 padmin/source/pamain.cxx   |9 -
 tools/Library_tl.mk|3 
 tools/Package_inc.mk   |1 
 tools/inc/tools/testtoolloader.hxx |   42 -
 tools/source/testtoolloader/testtoolloader.cxx |  183 -
 9 files changed, 1 insertion(+), 254 deletions(-)

New commits:
commit 2ef7f7efbffe036864ad0c73c974a16a0b4401ff
Author: August Sodora 
Date:   Wed Dec 7 14:54:40 2011 -0500

Remove testtoolloader

diff --git a/bin/distro-install-file-lists b/bin/distro-install-file-lists
index d00d9ea..7282a67 100755
--- a/bin/distro-install-file-lists
+++ b/bin/distro-install-file-lists
@@ -123,7 +123,6 @@ if test "z$OOO_VENDOR" != "zDebian" ; then
 merge_flists gid_Module_Optional_Javafilter
$FILELISTSDIR/common_list.txt
 merge_flists gid_Module_Optional_Pymailmerge   
$FILELISTSDIR/pyuno_list.txt
 merge_flists gid_Module_Optional_Pyuno 
$FILELISTSDIR/pyuno_list.txt
-merge_flists gid_Module_Optional_Testtool  
$FILELISTSDIR/testtool_list.txt
 merge_flists gid_Module_Optional_Xsltfiltersamples 
$FILELISTSDIR/common_list.txt
 else
 merge_flists gid_Module_Optional_Binfilter 
$FILELISTSDIR/filters_list.txt
@@ -132,7 +131,6 @@ if test "z$OOO_VENDOR" != "zDebian" ; then
 merge_flists gid_Module_Optional_Javafilter
$FILELISTSDIR/filters_list.txt
 merge_flists gid_Module_Optional_Pymailmerge   
$FILELISTSDIR/mailmerge_list.txt
 merge_flists gid_Module_Optional_Pyuno 
$FILELISTSDIR/pyuno_list.txt
-merge_flists gid_Module_Optional_Testtool  
$FILELISTSDIR/testtool_list.txt
 merge_flists gid_Module_Optional_Xsltfiltersamples 
$FILELISTSDIR/filters_list.txt
 fi
 else
@@ -143,7 +141,6 @@ if test "z$OOO_VENDOR" != "zDebian" ; then
 merge_flists gid_Module_Optional_Javafilter
$FILELISTSDIR/common_list.txt
 merge_flists gid_Module_Optional_Pymailmerge   
$FILELISTSDIR/common_list.txt
 merge_flists gid_Module_Optional_Pyuno 
$FILELISTSDIR/common_list.txt
-merge_flists gid_Module_Optional_Testtool  
$FILELISTSDIR/common_list.txt
 merge_flists gid_Module_Optional_Xsltfiltersamples 
$FILELISTSDIR/common_list.txt
 fi
 
@@ -420,7 +417,6 @@ else
 create_package_directory gid_Module_Root_Files_5
pkg/libreoffice-common
 create_package_directory gid_Module_Root_Files_6
pkg/libreoffice-common
 create_package_directory gid_Module_Root_Files_7
pkg/libreoffice-common
-create_package_directory gid_Module_Optional_Testtool   
pkg/libreoffice-qa-tools
 if [ -e gid_Module_Optional_Pymailmerge ]; then
 create_package_directory gid_Module_Optional_Pymailmerge
pkg/libreoffice-emailmerge
 else # post m26
diff --git a/cui/source/options/optimprove.cxx 
b/cui/source/options/optimprove.cxx
index 0937e59..27d5e9f 100644
--- a/cui/source/options/optimprove.cxx
+++ b/cui/source/options/optimprove.cxx
@@ -46,7 +46,6 @@
 #include 
 #include 
 #include 
-#include 
 
 namespace lang  = ::com::sun::star::lang;
 namespace uno   = ::com::sun::star::uno;
@@ -190,7 +189,6 @@ IMPL_LINK( SvxImprovementDialog, HandleOK, OKButton*, 
EMPTYARG )
 ::comphelper::ConfigurationHelper::E_STANDARD );
 // TODO: refactor
 ::comphelper::UiEventsLogger::reinit();
-::tools::InitTestToolLib();
 }
 EndDialog( RET_OK );
 return 0;
diff --git a/cui/source/options/optimprove2.cxx 
b/cui/source/options/optimprove2.cxx
index 132247d..4d6f238 100644
--- a/cui/source/options/optimprove2.cxx
+++ b/cui/source/options/optimprove2.cxx
@@ -26,8 +26,6 @@
  *
  /
 
-// include ---
-
 #define _SVX_OPTIMPROVE_CXX
 
 #include 
@@ -49,7 +47,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #define C2S(s)  ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(s))
@@ -185,7 +182,6 @@ sal_Bool SvxImprovementOptionsPage::FillItemSet( 
SfxItemSet& /*rSet*/ )
 ::comphelper::ConfigurationHelper::flush( xConfig );
 // TODO: refactor
 ::comphelper::UiEventsLogger::reinit();
-::tools::InitTestToolLib();
 }
 catch( uno::Exception& )
 {
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 9e9f656..49a060e 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -96,7 +96,6 @@
 #include 
 
 #include 
-#include 
 #include 
 #include 
 #include 

[Libreoffice-commits] .: desktop/Executable_soffice.bin.mk

2011-12-07 Thread Andras Timar
 desktop/Executable_soffice.bin.mk |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit f19e6305cd921a2c03179e1ddec42339422586d6
Author: Andras Timar 
Date:   Wed Dec 7 20:36:21 2011 +0100

link icons to soffice.bin fdo#42979

diff --git a/desktop/Executable_soffice.bin.mk 
b/desktop/Executable_soffice.bin.mk
index e4665e8..a4aa573 100644
--- a/desktop/Executable_soffice.bin.mk
+++ b/desktop/Executable_soffice.bin.mk
@@ -102,4 +102,6 @@ $(eval $(call gb_Executable_set_ldflags,\
 
 endif
 
+$(eval $(call gb_Executable_add_nativeres,$(sofficebin),soffice/src)) 
+
 # vim: set ts=4 sw=4 et:
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 3 commits - sc/CppunitTest_sc_datapilotfieldobj.mk sc/Module_sc.mk sc/qa

2011-12-07 Thread Markus Mohrhard
 sc/CppunitTest_sc_datapilotfieldobj.mk|  141 +
 sc/Module_sc.mk   |1 
 sc/qa/extras/datapilotfieldobj.cxx|  264 ++
 sc/qa/extras/testdocuments/scdatapilotfieldobj.ods|binary
 sc/qa/unit/data/contentCSV/mathematical-functions.csv |5 
 sc/qa/unit/data/ods/functions.ods |binary
 6 files changed, 411 insertions(+)

New commits:
commit 502b5179164136bf9cd7ca6abe22a7764eee46f4
Author: Markus Mohrhard 
Date:   Wed Dec 7 19:41:13 2011 +0100

extend DataPilotField tests to the whole property set

still missing are all properties that are tested automatically by the
PropertyTester

diff --git a/sc/qa/extras/datapilotfieldobj.cxx 
b/sc/qa/extras/datapilotfieldobj.cxx
index fcdc597..8ebc424 100644
--- a/sc/qa/extras/datapilotfieldobj.cxx
+++ b/sc/qa/extras/datapilotfieldobj.cxx
@@ -35,6 +35,11 @@
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
+#include 
+#include 
 
 #include 
 
@@ -46,9 +51,17 @@ class ScDataPilotField : public UnoApiTest
 uno::Reference< beans::XPropertySet > init();
 
 void testSortInfo();
+void testLayoutInfo();
+void testAutoShowInfo();
+void testReference();
+void testIsGroupField();
 
 CPPUNIT_TEST_SUITE(ScDataPilotField);
 CPPUNIT_TEST(testSortInfo);
+CPPUNIT_TEST(testLayoutInfo);
+CPPUNIT_TEST(testAutoShowInfo);
+CPPUNIT_TEST(testReference);
+CPPUNIT_TEST(testIsGroupField);
 CPPUNIT_TEST_SUITE_END();
 };
 
@@ -86,6 +99,129 @@ void ScDataPilotField::testSortInfo()
 CPPUNIT_ASSERT_MESSAGE("should have no sort info", !bHasSortInfo);
 }
 
+void ScDataPilotField::testLayoutInfo()
+{
+uno::Reference< beans::XPropertySet > xPropSet = init();
+sheet::DataPilotFieldLayoutInfo aLayoutInfoValue;
+rtl::OUString aLayoutInfo(RTL_CONSTASCII_USTRINGPARAM("LayoutInfo"));
+aLayoutInfoValue.AddEmptyLines = false;
+aLayoutInfoValue.LayoutMode = 
sheet::DataPilotFieldLayoutMode::OUTLINE_SUBTOTALS_BOTTOM;
+uno::Any xValue;
+xValue <<= aLayoutInfoValue;
+xPropSet->setPropertyValue(aLayoutInfo, xValue);
+
+sheet::DataPilotFieldLayoutInfo aNewLayoutInfoValue;
+xValue = xPropSet->getPropertyValue(aLayoutInfo);
+CPPUNIT_ASSERT( xValue >>= aNewLayoutInfoValue );
+CPPUNIT_ASSERT_MESSAGE("set value should be the same as the got value", 
aNewLayoutInfoValue.LayoutMode == aLayoutInfoValue.LayoutMode &&
+aNewLayoutInfoValue.AddEmptyLines == 
aLayoutInfoValue.AddEmptyLines);
+
+//setting HasLayoutInfo only makes sense for false, tor true the uno 
implementation does nothing
+sal_Bool bHasLayoutInfo;
+rtl::OUString aHasLayoutInfo(RTL_CONSTASCII_USTRINGPARAM("HasLayoutInfo"));
+xValue = xPropSet->getPropertyValue(aHasLayoutInfo);
+CPPUNIT_ASSERT( xValue >>= bHasLayoutInfo );
+CPPUNIT_ASSERT_MESSAGE("should have layout information", bHasLayoutInfo);
+
+bHasLayoutInfo = false;
+xValue <<= bHasLayoutInfo;
+xPropSet->setPropertyValue(aHasLayoutInfo, xValue);
+
+xValue = xPropSet->getPropertyValue(aHasLayoutInfo);
+CPPUNIT_ASSERT( xValue >>= bHasLayoutInfo );
+CPPUNIT_ASSERT_MESSAGE("should have no longer sort information", 
!bHasLayoutInfo);
+}
+
+void ScDataPilotField::testAutoShowInfo()
+{
+uno::Reference< beans::XPropertySet > xPropSet = init();
+sheet::DataPilotFieldAutoShowInfo aAutoShowInfoValue;
+aAutoShowInfoValue.DataField = 
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Col1"));
+aAutoShowInfoValue.IsEnabled = true;
+rtl::OUString aAutoShowInfo(RTL_CONSTASCII_USTRINGPARAM("AutoShowInfo"));
+uno::Any xValue;
+xValue <<= aAutoShowInfoValue;
+xPropSet->setPropertyValue(aAutoShowInfo, xValue);
+
+sheet::DataPilotFieldAutoShowInfo aNewAutoShowInfoValue;
+xValue = xPropSet->getPropertyValue(aAutoShowInfo);
+CPPUNIT_ASSERT( xValue >>= aNewAutoShowInfoValue );
+CPPUNIT_ASSERT_MESSAGE("set value should be the same as the got value", 
aNewAutoShowInfoValue.DataField == aAutoShowInfoValue.DataField &&
+aNewAutoShowInfoValue.IsEnabled == aAutoShowInfoValue.IsEnabled);
+
+//setting HasLayoutInfo only makes sense for false, tor true the uno 
implementation does nothing
+sal_Bool bHasAutoShowInfo;
+rtl::OUString 
aHasAutoShowInfo(RTL_CONSTASCII_USTRINGPARAM("HasAutoShowInfo"));
+xValue = xPropSet->getPropertyValue(aHasAutoShowInfo);
+CPPUNIT_ASSERT( xValue >>= bHasAutoShowInfo );
+CPPUNIT_ASSERT_MESSAGE("should have AutoShow information", 
bHasAutoShowInfo);
+
+bHasAutoShowInfo = false;
+xValue <<= bHasAutoShowInfo;
+xPropSet->setPropertyValue(aHasAutoShowInfo, xValue);
+
+xValue = xPropSet->getPropertyValue(aHasAutoShowInfo);
+CPPUNIT_ASSERT( xValue >>= bHasAutoShowInfo );
+CPPUNIT_ASSERT_MESSAGE("should have no longer AutoShow information", 
!bHasAutoShowInfo);
+}
+
+void ScDataPilotField::testReference()
+{
+

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

2011-12-07 Thread Kohei Yoshida
 sc/qa/unit/ucalc.cxx  |   38 +++
 sc/source/core/inc/cellkeytranslator.hxx  |1 
 sc/source/core/inc/interpre.hxx   |3 +
 sc/source/core/tool/cellkeytranslator.cxx |7 
 sc/source/core/tool/interpr1.cxx  |   49 ++
 sc/source/core/tool/interpr4.cxx  |   20 +++-
 6 files changed, 111 insertions(+), 7 deletions(-)

New commits:
commit aa6b91df8728057d94527ecb0c65f727847834d6
Author: Kohei Yoshida 
Date:   Wed Dec 7 13:33:06 2011 -0500

fdo#43534: Partially support external refs in CELL function.

For now, only COL and ROW are supported.  More on the way.  Note that
we can't support all the information types that we do for internal
references.

diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index d6d9484..a4158c3 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -672,6 +672,43 @@ void testFuncMATCH(ScDocument* pDoc)
 }
 }
 
+void testFuncCELL(ScDocument* pDoc)
+{
+clearRange(pDoc, ScRange(0, 0, 0, 2, 20, 0)); // Clear A1:C21.
+
+{
+const char* pContent = "Some random text";
+pDoc->SetString(2, 9, 0, rtl::OUString::createFromAscii(pContent)); // 
Set this value to C10.
+double val = 1.2;
+pDoc->SetValue(2, 0, 0, val); // Set numeric value to C1;
+
+// We don't test: FILENAME, FORMAT, WIDTH, PROTECT, PREFIX
+StrStrCheck aChecks[] = {
+{ "=CELL(\"COL\";C10)",   "3" },
+{ "=CELL(\"ROW\";C10)",  "10" },
+{ "=CELL(\"SHEET\";C10)", "1" },
+{ "=CELL(\"ADDRESS\";C10)",   "$C$10" },
+{ "=CELL(\"CONTENTS\";C10)", pContent },
+{ "=CELL(\"COLOR\";C10)", "0" },
+{ "=CELL(\"TYPE\";C9)",   "b" },
+{ "=CELL(\"TYPE\";C10)",  "l" },
+{ "=CELL(\"TYPE\";C1)",   "v" },
+{ "=CELL(\"PARENTHESES\";C10)",   "0" }
+};
+
+for (size_t i = 0; i < SAL_N_ELEMENTS(aChecks); ++i)
+pDoc->SetString(0, i, 0, 
rtl::OUString::createFromAscii(aChecks[i].pVal));
+pDoc->CalcAll();
+
+for (size_t i = 0; i < SAL_N_ELEMENTS(aChecks); ++i)
+{
+rtl::OUString aVal = pDoc->GetString(0, i, 0);
+cout << "CELL: " << aVal << endl;
+CPPUNIT_ASSERT_MESSAGE("Unexpected result for CELL", 
aVal.equalsAscii(aChecks[i].pRes));
+}
+}
+}
+
 void Test::testCellFunctions()
 {
 rtl::OUString aTabName(RTL_CONSTASCII_USTRINGPARAM("foo"));
@@ -684,6 +721,7 @@ void Test::testCellFunctions()
 testFuncCOUNTIF(m_pDoc);
 testFuncVLOOKUP(m_pDoc);
 testFuncMATCH(m_pDoc);
+testFuncCELL(m_pDoc);
 
 m_pDoc->DeleteTab(0);
 }
diff --git a/sc/source/core/inc/cellkeytranslator.hxx 
b/sc/source/core/inc/cellkeytranslator.hxx
index 0ec2c36..5a1b877 100644
--- a/sc/source/core/inc/cellkeytranslator.hxx
+++ b/sc/source/core/inc/cellkeytranslator.hxx
@@ -73,6 +73,7 @@ class ScCellKeywordTranslator
 {
 public:
 static void transKeyword(String& rName, const 
::com::sun::star::lang::Locale* pLocale = NULL, OpCode eOpCode = ocNone);
+static void transKeyword(rtl::OUString& rName, const 
::com::sun::star::lang::Locale* pLocale = NULL, OpCode eOpCode = ocNone);
 ~ScCellKeywordTranslator();
 
 private:
diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx
index 586a4dd..192c2e0 100644
--- a/sc/source/core/inc/interpre.hxx
+++ b/sc/source/core/inc/interpre.hxx
@@ -287,6 +287,8 @@ void PopDoubleRef(SCCOL& rCol1, SCROW &rRow1, SCTAB& rTab1,
   bool bDontCheckForTableOp = false );
 void PopExternalSingleRef(sal_uInt16& rFileId, String& rTabName, 
ScSingleRefData& rRef);
 void PopExternalSingleRef(ScExternalRefCache::TokenRef& rToken, 
ScExternalRefCache::CellFormat* pFmt = NULL);
+void PopExternalSingleRef(sal_uInt16& rFileId, String& rTabName, 
ScSingleRefData& rRef,
+  ScExternalRefCache::TokenRef& rToken, 
ScExternalRefCache::CellFormat* pFmt = NULL);
 void PopExternalDoubleRef(sal_uInt16& rFileId, String& rTabName, 
ScComplexRefData& rRef);
 void PopExternalDoubleRef(ScExternalRefCache::TokenArrayRef& rArray);
 void PopExternalDoubleRef(ScMatrixRef& rMat);
@@ -427,6 +429,7 @@ void ScIsNonString();
 void ScIsLogical();
 void ScType();
 void ScCell();
+void ScCellExternal();
 void ScIsRef();
 void ScIsValue();
 void ScIsFormula();
diff --git a/sc/source/core/tool/cellkeytranslator.cxx 
b/sc/source/core/tool/cellkeytranslator.cxx
index 9acd35c..41fbe77 100644
--- a/sc/source/core/tool/cellkeytranslator.cxx
+++ b/sc/source/core/tool/cellkeytranslator.cxx
@@ -171,6 +171,13 @@ void ScCellKeywordTranslator::transKeyword(String& rName, 
const Locale* pLocale,
 lclMatchKeyword(rName, spInstance->maStringNameMap, eOpCode, pLocale);
 }
 
+void ScCellKeywordTranslator::transKeyword(rtl::OUString& rName, const Locale* 

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

2011-12-07 Thread Kohei Yoshida
 sc/qa/unit/ucalc.cxx  |   38 +++
 sc/source/core/inc/cellkeytranslator.hxx  |1 
 sc/source/core/inc/interpre.hxx   |3 +
 sc/source/core/tool/cellkeytranslator.cxx |7 
 sc/source/core/tool/interpr1.cxx  |   49 ++
 sc/source/core/tool/interpr4.cxx  |   20 +++-
 6 files changed, 111 insertions(+), 7 deletions(-)

New commits:
commit c8552bc97b9f860494bc45091936010d98fff1cb
Author: Kohei Yoshida 
Date:   Wed Dec 7 13:33:06 2011 -0500

fdo#43534: Partially support external refs in CELL function.

For now, only COL and ROW are supported.  More on the way.  Note that
we can't support all the information types that we do for internal
references.

diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index d6d9484..a4158c3 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -672,6 +672,43 @@ void testFuncMATCH(ScDocument* pDoc)
 }
 }
 
+void testFuncCELL(ScDocument* pDoc)
+{
+clearRange(pDoc, ScRange(0, 0, 0, 2, 20, 0)); // Clear A1:C21.
+
+{
+const char* pContent = "Some random text";
+pDoc->SetString(2, 9, 0, rtl::OUString::createFromAscii(pContent)); // 
Set this value to C10.
+double val = 1.2;
+pDoc->SetValue(2, 0, 0, val); // Set numeric value to C1;
+
+// We don't test: FILENAME, FORMAT, WIDTH, PROTECT, PREFIX
+StrStrCheck aChecks[] = {
+{ "=CELL(\"COL\";C10)",   "3" },
+{ "=CELL(\"ROW\";C10)",  "10" },
+{ "=CELL(\"SHEET\";C10)", "1" },
+{ "=CELL(\"ADDRESS\";C10)",   "$C$10" },
+{ "=CELL(\"CONTENTS\";C10)", pContent },
+{ "=CELL(\"COLOR\";C10)", "0" },
+{ "=CELL(\"TYPE\";C9)",   "b" },
+{ "=CELL(\"TYPE\";C10)",  "l" },
+{ "=CELL(\"TYPE\";C1)",   "v" },
+{ "=CELL(\"PARENTHESES\";C10)",   "0" }
+};
+
+for (size_t i = 0; i < SAL_N_ELEMENTS(aChecks); ++i)
+pDoc->SetString(0, i, 0, 
rtl::OUString::createFromAscii(aChecks[i].pVal));
+pDoc->CalcAll();
+
+for (size_t i = 0; i < SAL_N_ELEMENTS(aChecks); ++i)
+{
+rtl::OUString aVal = pDoc->GetString(0, i, 0);
+cout << "CELL: " << aVal << endl;
+CPPUNIT_ASSERT_MESSAGE("Unexpected result for CELL", 
aVal.equalsAscii(aChecks[i].pRes));
+}
+}
+}
+
 void Test::testCellFunctions()
 {
 rtl::OUString aTabName(RTL_CONSTASCII_USTRINGPARAM("foo"));
@@ -684,6 +721,7 @@ void Test::testCellFunctions()
 testFuncCOUNTIF(m_pDoc);
 testFuncVLOOKUP(m_pDoc);
 testFuncMATCH(m_pDoc);
+testFuncCELL(m_pDoc);
 
 m_pDoc->DeleteTab(0);
 }
diff --git a/sc/source/core/inc/cellkeytranslator.hxx 
b/sc/source/core/inc/cellkeytranslator.hxx
index 0ec2c36..5a1b877 100644
--- a/sc/source/core/inc/cellkeytranslator.hxx
+++ b/sc/source/core/inc/cellkeytranslator.hxx
@@ -73,6 +73,7 @@ class ScCellKeywordTranslator
 {
 public:
 static void transKeyword(String& rName, const 
::com::sun::star::lang::Locale* pLocale = NULL, OpCode eOpCode = ocNone);
+static void transKeyword(rtl::OUString& rName, const 
::com::sun::star::lang::Locale* pLocale = NULL, OpCode eOpCode = ocNone);
 ~ScCellKeywordTranslator();
 
 private:
diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx
index 586a4dd..192c2e0 100644
--- a/sc/source/core/inc/interpre.hxx
+++ b/sc/source/core/inc/interpre.hxx
@@ -287,6 +287,8 @@ void PopDoubleRef(SCCOL& rCol1, SCROW &rRow1, SCTAB& rTab1,
   bool bDontCheckForTableOp = false );
 void PopExternalSingleRef(sal_uInt16& rFileId, String& rTabName, 
ScSingleRefData& rRef);
 void PopExternalSingleRef(ScExternalRefCache::TokenRef& rToken, 
ScExternalRefCache::CellFormat* pFmt = NULL);
+void PopExternalSingleRef(sal_uInt16& rFileId, String& rTabName, 
ScSingleRefData& rRef,
+  ScExternalRefCache::TokenRef& rToken, 
ScExternalRefCache::CellFormat* pFmt = NULL);
 void PopExternalDoubleRef(sal_uInt16& rFileId, String& rTabName, 
ScComplexRefData& rRef);
 void PopExternalDoubleRef(ScExternalRefCache::TokenArrayRef& rArray);
 void PopExternalDoubleRef(ScMatrixRef& rMat);
@@ -427,6 +429,7 @@ void ScIsNonString();
 void ScIsLogical();
 void ScType();
 void ScCell();
+void ScCellExternal();
 void ScIsRef();
 void ScIsValue();
 void ScIsFormula();
diff --git a/sc/source/core/tool/cellkeytranslator.cxx 
b/sc/source/core/tool/cellkeytranslator.cxx
index 9acd35c..41fbe77 100644
--- a/sc/source/core/tool/cellkeytranslator.cxx
+++ b/sc/source/core/tool/cellkeytranslator.cxx
@@ -171,6 +171,13 @@ void ScCellKeywordTranslator::transKeyword(String& rName, 
const Locale* pLocale,
 lclMatchKeyword(rName, spInstance->maStringNameMap, eOpCode, pLocale);
 }
 
+void ScCellKeywordTranslator::transKeyword(rtl::OUString& rName, const Locale* 

[Libreoffice-commits] .: jvmfwk/plugins

2011-12-07 Thread Thorsten Behrens
 jvmfwk/plugins/sunmajor/pluginlib/otherjre.cxx |9 +++--
 1 file changed, 3 insertions(+), 6 deletions(-)

New commits:
commit 5683109a4928ba3e083abfbd73e794a6784eba21
Author: Thorsten Behrens 
Date:   Wed Dec 7 18:23:00 2011 +0100

Fix nasty ppc ld crash, correct default return param setting

 * on OSX 10.5 PPC, ld crashes with a bus error, presumably because
   of the empty ar[] string array.
 * the "size = 0" default case looks wrong, replaced by *size=0

diff --git a/jvmfwk/plugins/sunmajor/pluginlib/otherjre.cxx 
b/jvmfwk/plugins/sunmajor/pluginlib/otherjre.cxx
index 864dc2d..3de9019 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/otherjre.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/otherjre.cxx
@@ -87,11 +87,9 @@ char const* const* OtherInfo::getRuntimePaths(int * size)
 char const* const* OtherInfo::getLibraryPaths(int* size)
 {
 
-#ifdef UNX
+#if defined(UNX) && !defined(MACOSX)
+//mac version does not have a ld library path anymore
 static char const * ar[] = {
-#ifdef MACOSX
-//mac version does not have a ld library path anymore
-#else
 "/bin",
 "/jre/bin",
 "/bin/classic",
@@ -102,13 +100,12 @@ char const* const* OtherInfo::getLibraryPaths(int* size)
 "/lib/" JFW_PLUGIN_ARCH "/jrockit",
 "/lib/" JFW_PLUGIN_ARCH "/native_threads",
 "/lib/" JFW_PLUGIN_ARCH
-#endif
 };
 
 *size = sizeof(ar) / sizeof (char*);
 return ar;
 #else
-size = 0;
+*size = 0;
 return NULL;
 #endif
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2011-12-07 Thread Thorsten Behrens
 scp2/source/python/file_python.scp |7 ---
 scp2/source/python/module_python_mailmerge.scp |   10 ++
 2 files changed, 2 insertions(+), 15 deletions(-)

New commits:
commit 5aa51baf5260486c7830f3a8fb46700609ac62ad
Author: Thorsten Behrens 
Date:   Wed Dec 7 17:43:22 2011 +0100

Python mailmerge stuff is now inside mailmerge.zip

diff --git a/scp2/source/python/file_python.scp 
b/scp2/source/python/file_python.scp
index ba83a9c..cdcd744 100644
--- a/scp2/source/python/file_python.scp
+++ b/scp2/source/python/file_python.scp
@@ -58,13 +58,6 @@ File gid_File_Py_Unohelper
 Styles = (PACKED);
 End
 
-File gid_File_Py_Officehelper
-TXT_FILE_BODY;
-Dir = gid_Brand_Dir_Program;
-Name = "officehelper.py";
-Styles = (PACKED);
-End
-
 File gid_File_Py_Uno
 TXT_FILE_BODY;
 Dir = gid_Brand_Dir_Program;
diff --git a/scp2/source/python/module_python_mailmerge.scp 
b/scp2/source/python/module_python_mailmerge.scp
index 222e33f..d33f982 100644
--- a/scp2/source/python/module_python_mailmerge.scp
+++ b/scp2/source/python/module_python_mailmerge.scp
@@ -32,14 +32,8 @@
 File gid_File_Pymailmerge
 TXT_FILE_BODY;
 Dir = gid_Brand_Dir_Program;
-Name = "mailmerge.py";
-Styles = (PACKED);
-End
-File gid_File_Pymailmerge_msgbox
-TXT_FILE_BODY;
-Dir = gid_Brand_Dir_Program;
-Name = "msgbox.py";
-Styles = (PACKED);
+name = "mailmerge.zip";
+Styles = (ARCHIVE);
 End
 #endif
 #endif
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: scp2/source

2011-12-07 Thread Thorsten Behrens
 scp2/source/python/file_python.scp |7 ---
 scp2/source/python/module_python_mailmerge.scp |   10 ++
 2 files changed, 2 insertions(+), 15 deletions(-)

New commits:
commit 13087fc6a1b024ae6d98810e31441dc60ecd7208
Author: Thorsten Behrens 
Date:   Wed Dec 7 17:43:22 2011 +0100

Python mailmerge stuff is now inside mailmerge.zip

diff --git a/scp2/source/python/file_python.scp 
b/scp2/source/python/file_python.scp
index ba83a9c..cdcd744 100644
--- a/scp2/source/python/file_python.scp
+++ b/scp2/source/python/file_python.scp
@@ -58,13 +58,6 @@ File gid_File_Py_Unohelper
 Styles = (PACKED);
 End
 
-File gid_File_Py_Officehelper
-TXT_FILE_BODY;
-Dir = gid_Brand_Dir_Program;
-Name = "officehelper.py";
-Styles = (PACKED);
-End
-
 File gid_File_Py_Uno
 TXT_FILE_BODY;
 Dir = gid_Brand_Dir_Program;
diff --git a/scp2/source/python/module_python_mailmerge.scp 
b/scp2/source/python/module_python_mailmerge.scp
index 222e33f..3027e85 100644
--- a/scp2/source/python/module_python_mailmerge.scp
+++ b/scp2/source/python/module_python_mailmerge.scp
@@ -32,14 +32,8 @@
 File gid_File_Pymailmerge
 TXT_FILE_BODY;
 Dir = gid_Brand_Dir_Program;
-Name = "mailmerge.py";
-Styles = (PACKED);
-End
-File gid_File_Pymailmerge_msgbox
-TXT_FILE_BODY;
-Dir = gid_Brand_Dir_Program;
-Name = "msgbox.py";
-Styles = (PACKED);
+   name = "mailmerge.zip";
+Styles = (ARCHIVE);
 End
 #endif
 #endif
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2011-12-07 Thread Noel Power
 sc/source/ui/app/inputwin.cxx |   24 ++--
 sc/source/ui/inc/inputwin.hxx |2 +-
 2 files changed, 11 insertions(+), 15 deletions(-)

New commits:
commit 2e580e9b1b0d095cda7991614f58681c75336a83
Author: Noel Power 
Date:   Wed Dec 7 15:53:20 2011 +

remove unused variable

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index a04451f..a271487 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1157,7 +1157,6 @@ void ScMultiTextWnd::Resize()
 if(pEditView)
 {
 Size aOutputSize = GetOutputSizePixel();
-Size aLineSize = Size(0,aTextBoxSize.Height());
 Point aPos1(TEXT_STARTPOS,0);
 Point aPos2(aOutputSize.Width(),aOutputSize.Height());
 
commit d65ca4394166675335a8c3061c6c0f179271f65e
Author: Noel Power 
Date:   Wed Dec 7 15:40:28 2011 +

better sizing of inputbar ( removed weird calculations I didn't understand )

gsoc input bar now (should) snuggly wrap the text when collapsed, if 
multilines exist then scrolling with the keys should be clean and no spill from 
upper or lower lines visible. Removed some strange ( pseudo padding ) 
apparently for taking into account the window border and reorganized the resize 
logic so the padding is added ( and commented why ) in just one place.

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 8b32bc9..a04451f 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -864,7 +864,7 @@ ScInputBarGroup::ScInputBarGroup(Window* pParent)
   // too bad at the size from 'Settings' for me
   // set button width to scrollbar width then for the moment
   aButton.SetClickHdl  ( LINK( this, ScInputBarGroup, ClickHdl ) );
-  
aButton.SetSizePixel(Size(GetSettings().GetStyleSettings().GetScrollBarSize(), 
TBX_WINDOW_HEIGHT) );
+  
aButton.SetSizePixel(Size(GetSettings().GetStyleSettings().GetScrollBarSize(), 
aMultiTextWnd.GetPixelHeightForLines(1)) );
   aButton.Enable();
   aButton.SetSymbol( SYMBOL_SPIN_DOWN  );
   aButton.SetQuickHelpText( ScResId( SCSTR_QHELP_EXPAND_FORMULA ) );
@@ -1123,18 +1123,16 @@ void ScMultiTextWnd::Paint( const Rectangle& rRec )
 }
 }
 
-long ScMultiTextWnd::GetPixelTextHeight()
+
+long ScMultiTextWnd::GetPixelHeightForLines( long nLines )
 {
 long height = ( LogicToPixel(Size(0,GetTextHeight())).Height() );
 // need to figure out why GetTextHeight is not set up when I need it
 // some initialisation timing issue ?
-return Max ( long( 14 ), height );
-}
-
-
-long ScMultiTextWnd::GetPixelHeightForLines( long nLines )
-{
-return nLines *  GetPixelTextHeight();
+height = Max ( long( 14 ), height );
+// add padding ( for the borders of the window I guess ) otherwise we
+// chop slightly the top and bottom of whatever is in the inputbox
+return ( nLines *  height ) + 4;
 }
 
 void ScMultiTextWnd::SetNumLines( long nLines )
@@ -1153,14 +1151,14 @@ void ScMultiTextWnd::Resize()
 // parent/container window
 Size aTextBoxSize  = GetSizePixel();
 
-aTextBoxSize.Height()=( GetPixelHeightForLines( mnLines ) ) + 8;
+aTextBoxSize.Height()=( GetPixelHeightForLines( mnLines ) );
+SetSizePixel(aTextBoxSize);
 
 if(pEditView)
 {
 Size aOutputSize = GetOutputSizePixel();
-Size aLineSize = Size(0,GetPixelTextHeight());
-int nDiff = (aOutputSize.Height() - ( mnLines *aLineSize.Height()))/2;
-Point aPos1(TEXT_STARTPOS,nDiff);
+Size aLineSize = Size(0,aTextBoxSize.Height());
+Point aPos1(TEXT_STARTPOS,0);
 Point aPos2(aOutputSize.Width(),aOutputSize.Height());
 
 pEditView->SetOutputArea(
@@ -1170,7 +1168,6 @@ void ScMultiTextWnd::Resize()
 }
 
 SetScrollBarRange();
-SetSizePixel(aTextBoxSize);
 }
 
 IMPL_LINK(ScMultiTextWnd, ModifyHdl, EENotify*, pNotify)
diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx
index 76730b6..7a1da05 100644
--- a/sc/source/ui/inc/inputwin.hxx
+++ b/sc/source/ui/inc/inputwin.hxx
@@ -176,7 +176,6 @@ public:
 virtual void StopEditEngine( sal_Bool bAll );
 int GetLineCount();
 virtual void Resize();
-long GetPixelTextHeight();
 long GetPixelHeightForLines( long nLines );
 long GetEditEngTxtHeight();
 
@@ -193,6 +192,7 @@ protected:
 DECL_LINK( NotifyHdl, EENotify* );
 DECL_LINK( ModifyHdl, EENotify* );
 private:
+long GetPixelTextHeight();
 ScInputBarGroup& mrGroupBar;
 long mnLines;
 long mnLastExpandedLines;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - instsetoo_native/util

2011-12-07 Thread Petr Mladek
 instsetoo_native/util/openoffice.lst |   36 +--
 1 file changed, 18 insertions(+), 18 deletions(-)

New commits:
commit fec8058db415db791c51d4a81435cf1f93b304e7
Author: Petr Mladek 
Date:   Wed Dec 7 17:36:06 2011 +0100

mention version suffix, e.g. "beta1" in about dialog

diff --git a/instsetoo_native/util/openoffice.lst 
b/instsetoo_native/util/openoffice.lst
index 0cfafc5..d505a06 100644
--- a/instsetoo_native/util/openoffice.lst
+++ b/instsetoo_native/util/openoffice.lst
@@ -51,9 +51,9 @@ LibreOffice
{
PRODUCTNAME LibreOffice
PRODUCTVERSION 3.5
-   PRODUCTEXTENSION 
+   PRODUCTEXTENSION beta1-test 
LONG_PRODUCTEXTENSION 
-   SHORT_PRODUCTEXTENSION beta0
+   SHORT_PRODUCTEXTENSION beta1-test
 POSTVERSIONEXTENSION
 POSTVERSIONEXTENSIONUNIX
BRANDPACKAGEVERSION 3.5
@@ -109,9 +109,9 @@ LibreOffice_wJRE
{
PRODUCTNAME LibreOffice
PRODUCTVERSION 3.5
-   PRODUCTEXTENSION 
+   PRODUCTEXTENSION beta1-test 
LONG_PRODUCTEXTENSION 
-   SHORT_PRODUCTEXTENSION beta0
+   SHORT_PRODUCTEXTENSION beta1-test
 POSTVERSIONEXTENSION
 POSTVERSIONEXTENSIONUNIX
BRANDPACKAGEVERSION 3.5
@@ -166,9 +166,9 @@ LibreOffice_Dev
{
PRODUCTNAME LOdev
PRODUCTVERSION 3.5
-   PRODUCTEXTENSION 
+   PRODUCTEXTENSION beta1-test 
LONG_PRODUCTEXTENSION 
-   SHORT_PRODUCTEXTENSION beta0
+   SHORT_PRODUCTEXTENSION beta1-test
UNIXBASISROOTNAME lodev3.5
 POSTVERSIONEXTENSION
 POSTVERSIONEXTENSIONUNIX
@@ -234,10 +234,10 @@ URE
 PRODUCTVERSION 3.5
 PACKAGEVERSION 3.5
 PACKAGEREVISION 1
-PRODUCTEXTENSION
+PRODUCTEXTENSION beta1-test
 BRANDPACKAGEVERSION 3.5
 LONG_PRODUCTEXTENSION
-SHORT_PRODUCTEXTENSION beta0
+SHORT_PRODUCTEXTENSION beta1-test
 LICENSENAME LGPL
 SETSTATICPATH 1
 NOVERSIONINDIRNAME 1
@@ -270,9 +270,9 @@ LibreOffice_SDK
 {
 PRODUCTNAME LibreOffice
 PRODUCTVERSION 3.5
-PRODUCTEXTENSION
+PRODUCTEXTENSION beta1-test
 LONG_PRODUCTEXTENSION
-SHORT_PRODUCTEXTENSION beta0
+SHORT_PRODUCTEXTENSION beta1-test
 POSTVERSIONEXTENSION SDK
 POSTVERSIONEXTENSIONUNIX sdk
 BRANDPACKAGEVERSION 3.5
@@ -313,9 +313,9 @@ LibreOffice_Dev_SDK
 {
 PRODUCTNAME LOdev
 PRODUCTVERSION 3.5
-PRODUCTEXTENSION
+PRODUCTEXTENSION beta1-test
 LONG_PRODUCTEXTENSION
-SHORT_PRODUCTEXTENSION beta0
+SHORT_PRODUCTEXTENSION beta1-test
 UNIXBASISROOTNAME lodev3.5
 POSTVERSIONEXTENSION SDK
 POSTVERSIONEXTENSIONUNIX sdk
@@ -362,7 +362,7 @@ LibreOffice_Test
 {
 PRODUCTNAME LibreOffice
 PRODUCTVERSION 3.5
-PRODUCTEXTENSION
+PRODUCTEXTENSION beta1-test
 LONG_PRODUCTEXTENSION
 SHORT_PRODUCTEXTENSION alpha0
 POSTVERSIONEXTENSION TEST
@@ -405,7 +405,7 @@ LibreOffice_Dev_Test
 {
 PRODUCTNAME LOdev
 PRODUCTVERSION 3.5
-PRODUCTEXTENSION
+PRODUCTEXTENSION beta1-test
 LONG_PRODUCTEXTENSION
 SHORT_PRODUCTEXTENSION alpha0
 UNIXBASISROOTNAME lodev3.5
@@ -453,9 +453,9 @@ OxygenOffice
{
PRODUCTNAME OxygenOffice
PRODUCTVERSION 3.5
-   PRODUCTEXTENSION
+   PRODUCTEXTENSION beta1-test
LONG_PRODUCTEXTENSION
-   SHORT_PRODUCTEXTENSION  beta0
+   SHORT_PRODUCTEXTENSION  beta1-test
 POSTVERSIONEXTENSION
 POSTVERSIONEXTENSIONUNIX
BRANDPACKAGEVERSION 3.5
@@ -516,9 +516,9 @@ OxygenOffice_wJRE
{
PRODUCTNAME OxygenOffice
PRODUCTVERSION 3.5
-   PRODUCTEXTENSION
+   PRODUCTEXTENSION beta1-test
LONG_PRODUCTEXTENSION
-   SHORT_PRODUCTEXTENSION beta0
+   SHORT_PRODUCTEXTENSION beta1-test
 POSTVERSIONEXTENSION
 POSTVERSIONEXTENSIONUNIX
BRANDPACKAGEVE

[Libreoffice-commits] .: filter/source sc/source starmath/source vcl/source

2011-12-07 Thread Eike Rathke
 filter/source/svg/svgwriter.hxx |9 +-
 sc/source/core/tool/chgtrack.cxx|9 ++
 sc/source/filter/xcl97/xcl97esc.cxx |   14 +++-
 sc/source/filter/xml/xmlfilti.hxx   |   10 ++
 starmath/source/mathmlimport.cxx|   94 +++
 starmath/source/mathmlimport.hxx|2 
 starmath/source/parse.cxx   |  124 ++--
 vcl/source/gdi/cvtsvm.cxx   |   20 -
 8 files changed, 140 insertions(+), 142 deletions(-)

New commits:
commit cabf25372cf98869616c3d583eb99fa5f5eb3a8f
Author: Eike Rathke 
Date:   Wed Dec 7 16:11:57 2011 +0100

old class Stack pop'ed 0 from empty stack, which std::stack doesn't

Some places in the code assumed that if the stack is empty a null pointer is
returned by top() (or old Pop()), this doesn't work anymore with 
::std::stack
that instead has undefined behavior in that case, so check !stack.empty()
first before accessing top.
(cherry picked from commit ac40f7d6503533954127e818f2bf009200c1e3f2)

diff --git a/filter/source/svg/svgwriter.hxx b/filter/source/svg/svgwriter.hxx
index 0b6048e..b4fe4ae 100644
--- a/filter/source/svg/svgwriter.hxx
+++ b/filter/source/svg/svgwriter.hxx
@@ -186,9 +186,12 @@ private:
 }
 voidImplReleaseContext()
 {
-delete maContextStack.top();
-maContextStack.pop();
-mpContext = maContextStack.top();
+if (!maContextStack.empty())
+{
+delete maContextStack.top();
+maContextStack.pop();
+}
+mpContext = (maContextStack.empty() ? NULL : maContextStack.top());
 }
 
 longImplMap( sal_Int32 nVal ) const;
diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx
index a94b0d3..7a85014 100644
--- a/sc/source/core/tool/chgtrack.cxx
+++ b/sc/source/core/tool/chgtrack.cxx
@@ -2240,8 +2240,13 @@ void ScChangeTrack::EndBlockModify( sal_uLong nEndAction 
)
 }
 else
 delete pBlockModifyMsg;
-pBlockModifyMsg = aMsgStackTmp.top();   // evtl. Block im Block
-aMsgStackTmp.pop();
+if (aMsgStackTmp.empty())
+pBlockModifyMsg = NULL;
+else
+{
+pBlockModifyMsg = aMsgStackTmp.top();   // evtl. Block im Block
+aMsgStackTmp.pop();
+}
 }
 if ( !pBlockModifyMsg )
 {
diff --git a/sc/source/filter/xcl97/xcl97esc.cxx 
b/sc/source/filter/xcl97/xcl97esc.cxx
index 207a37d..50b53c2 100644
--- a/sc/source/filter/xcl97/xcl97esc.cxx
+++ b/sc/source/filter/xcl97/xcl97esc.cxx
@@ -346,9 +346,17 @@ void XclEscherEx::EndShape( sal_uInt16 nShapeType, 
sal_uInt32 nShapeID )
 
 // get next object from stack
 DeleteCurrAppData();
-pCurrXclObj = aStack.top().first;
-pCurrAppData = aStack.top().second;
-aStack.pop();
+if (aStack.empty())
+{
+pCurrXclObj = NULL;
+pCurrAppData = NULL;
+}
+else
+{
+pCurrXclObj = aStack.top().first;
+pCurrAppData = aStack.top().second;
+aStack.pop();
+}
 if( nAdditionalText == 3 )
 nAdditionalText = 0;
 }
diff --git a/sc/source/filter/xml/xmlfilti.hxx 
b/sc/source/filter/xml/xmlfilti.hxx
index bb30101..759f954 100644
--- a/sc/source/filter/xml/xmlfilti.hxx
+++ b/sc/source/filter/xml/xmlfilti.hxx
@@ -262,8 +262,14 @@ public:
 
 void CloseConnection()
 {
-bool bTemp = aConnectionOrStack.top();
-aConnectionOrStack.pop();
+bool bTemp;
+if (aConnectionOrStack.empty())
+bTemp = false;
+else
+{
+bTemp = aConnectionOrStack.top();
+aConnectionOrStack.pop();
+}
 bConnectionOr = bTemp;
 bNextConnectionOr = bTemp;
 }
diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx
index 0db8cc4..9290127 100644
--- a/starmath/source/mathmlimport.cxx
+++ b/starmath/source/mathmlimport.cxx
@@ -95,6 +95,18 @@ using ::rtl::OUStringBuffer;
 
 
 
+namespace {
+template < typename T >
+T* lcl_popOrZero( ::std::stack & rStack )
+{
+if (rStack.empty())
+return 0;
+T* pTmp = rStack.top();
+rStack.pop();
+return pTmp;
+}
+}
+
 sal_uLong SmXMLImportWrapper::Import(SfxMedium &rMedium)
 {
 sal_uLong nError = ERRCODE_SFX_DOLOADFAILED;
@@ -747,8 +759,7 @@ void SmXMLContext_Helper::ApplyAttrs()
 aToken.eType = TNBOLD;
 SmStructureNode *pFontNode = static_cast
 (new SmFontNode(aToken));
-pFontNode->SetSubNodes(0,rNodeStack.top());
-rNodeStack.pop();
+pFontNode->SetSubNodes(0,lcl_popOrZero(rNodeStack));
 rNodeStack.push(pFontNode);
 }
 if (nIsItalic != -1)
@@ -759,8 +770,7 @@ void SmXMLContext_Helper::ApplyAttrs()
 aToken.eType = T

[Libreoffice-commits] .: Branch 'libreoffice-3-4' - sw/source

2011-12-07 Thread Lubos Lunak
 sw/source/core/text/frmform.cxx |   11 ++-
 sw/source/core/text/inftxt.cxx  |3 ++-
 sw/source/core/text/txtfly.cxx  |6 --
 sw/source/core/text/txtfrm.cxx  |7 +--
 4 files changed, 17 insertions(+), 10 deletions(-)

New commits:
commit 4c7dc58e47796ff502bbdc5fb93c648c30fc4daf
Author: Luboš Luňák 
Date:   Wed Dec 7 17:23:47 2011 +0100

backport of 3524727db0f3cfecf3a47046795c527808c10c3e
commit 3524727db0f3cfecf3a47046795c527808c10c3e
Author: Caolán McNamara 
Date:   Thu Jun 23 15:14:00 2011 +0100

Related: #i58612# don't crash anyway

diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx
index 80c8c76..c383c7e 100644
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
@@ -1445,10 +1445,11 @@ void SwTxtFrm::_Format( SwTxtFormatter &rLine, 
SwTxtFormatInfo &rInf,
 
 if( IsFollow() && IsFieldFollow() && rLine.GetStart() == GetOfst() )
 {
-const SwLineLayout* pLine;
+SwTxtFrm *pMaster = FindMaster();
+OSL_ENSURE( pMaster, "SwTxtFrm::Format: homeless follow" );
+const SwLineLayout* pLine=NULL;
+if (pMaster)
 {
-SwTxtFrm *pMaster = FindMaster();
-OSL_ENSURE( pMaster, "SwTxtFrm::Format: homeless follow" );
 if( !pMaster->HasPara() )
 pMaster->GetFormatted();
 SwTxtSizeInfo aInf( pMaster );
@@ -1456,8 +1457,8 @@ void SwTxtFrm::_Format( SwTxtFormatter &rLine, 
SwTxtFormatInfo &rInf,
 aMasterLine.Bottom();
 pLine = aMasterLine.GetCurr();
 }
-SwLinePortion* pRest =
-rLine.MakeRestPortion( pLine, GetOfst() );
+SwLinePortion* pRest = pLine ?
+rLine.MakeRestPortion(pLine, GetOfst()) : NULL;
 if( pRest )
 rInf.SetRest( pRest );
 else
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index ee9f9b9..87a81cd 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -1469,7 +1469,8 @@ void SwTxtFormatInfo::Init()
 if ( GetTxtFrm()->IsFollow() )
 {
 const SwTxtFrm* pMaster = GetTxtFrm()->FindMaster();
-const SwLinePortion* pTmpPara = pMaster->GetPara();
+OSL_ENSURE(pMaster, "pTxtFrm without Master");
+const SwLinePortion* pTmpPara = pMaster ? pMaster->GetPara() : NULL;
 
 // there is a master for this follow and the master does not have
 // any contents (especially it does not have a number portion)
diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx
index 78f7021..e2d734d 100644
--- a/sw/source/core/text/txtfly.cxx
+++ b/sw/source/core/text/txtfly.cxx
@@ -895,7 +895,7 @@ sal_Bool SwTxtFly::IsAnyObj( const SwRect &rRect ) const
 const SwCntntFrm* SwTxtFly::_GetMaster()
 {
 pMaster = pCurrFrm;
-while( pMaster->IsFollow() )
+while( pMaster && pMaster->IsFollow() )
 pMaster = (SwCntntFrm*)pMaster->FindMaster();
 return pMaster;
 }
@@ -1614,7 +1614,9 @@ SwAnchoredObjList* SwTxtFly::InitAnchoredObjList()
 SwTwips SwTxtFly::CalcMinBottom() const
 {
 SwTwips nRet = 0;
-const SwSortedObjs *pDrawObj = GetMaster()->GetDrawObjs();
+const SwCntntFrm *pLclMaster = GetMaster();
+OSL_ENSURE(pLclMaster, "SwTxtFly without master");
+const SwSortedObjs *pDrawObj = pLclMaster ? pLclMaster->GetDrawObjs() : 
NULL;
 const sal_uInt32 nCount = pDrawObj ? pDrawObj->Count() : 0;
 if( nCount )
 {
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index d90794b..77343ab 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -650,9 +650,12 @@ void SwTxtFrm::HideAndShowObjects()
 }
 }
 
-if ( IsFollow() )
+if (IsFollow())
 {
-FindMaster()->HideAndShowObjects();
+SwTxtFrm *pMaster = FindMaster();
+OSL_ENSURE(pMaster, "SwTxtFrm without master");
+if (pMaster)
+pMaster->HideAndShowObjects();
 }
 }
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: RepositoryModule_ooo.mk

2011-12-07 Thread Bjoern Michaelsen
 RepositoryModule_ooo.mk |1 -
 1 file changed, 1 deletion(-)

New commits:
commit d432b00bfa05b1bd1413fb0b9afac19de5c1f60b
Author: Bjoern Michaelsen 
Date:   Wed Dec 7 17:07:18 2011 +0100

fix rebase mismatch: automation is gone

diff --git a/RepositoryModule_ooo.mk b/RepositoryModule_ooo.mk
index 3297d95..f59b2e0 100644
--- a/RepositoryModule_ooo.mk
+++ b/RepositoryModule_ooo.mk
@@ -30,7 +30,6 @@ $(eval $(call gb_Module_Module,ooo))
 
 $(eval $(call gb_Module_add_moduledirs,ooo,\
 animations \
-automation \
 basctl \
 basebmp \
 basegfx \
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sc/source

2011-12-07 Thread Noel Power
 sc/source/ui/app/inputwin.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit fe1e91678f68c4f06d6566ea8af918b984fde85b
Author: Noel Power 
Date:   Wed Dec 7 15:53:20 2011 +

remove unused variable

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index a04451f..a271487 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1157,7 +1157,6 @@ void ScMultiTextWnd::Resize()
 if(pEditView)
 {
 Size aOutputSize = GetOutputSizePixel();
-Size aLineSize = Size(0,aTextBoxSize.Height());
 Point aPos1(TEXT_STARTPOS,0);
 Point aPos2(aOutputSize.Width(),aOutputSize.Height());
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sc/source

2011-12-07 Thread Noel Power
 sc/source/ui/app/inputwin.cxx |   25 +++--
 sc/source/ui/inc/inputwin.hxx |2 +-
 2 files changed, 12 insertions(+), 15 deletions(-)

New commits:
commit fa83f16b4e3c42d102dd5b9edffe0732ea46b897
Author: Noel Power 
Date:   Wed Dec 7 15:40:28 2011 +

better sizing of inputbar ( removed weird calculations I didn't understand )

gsoc input bar now (should) snuggly wrap the text when collapsed, if 
multilines exist then scrolling with the keys should be clean and no spill from 
upper or lower lines visible. Removed some strange ( pseudo padding ) 
apparently for taking into account the window border and reorganized the resize 
logic so the padding is added ( and commented why ) in just one place.

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 8b32bc9..a04451f 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -864,7 +864,7 @@ ScInputBarGroup::ScInputBarGroup(Window* pParent)
   // too bad at the size from 'Settings' for me
   // set button width to scrollbar width then for the moment
   aButton.SetClickHdl  ( LINK( this, ScInputBarGroup, ClickHdl ) );
-  
aButton.SetSizePixel(Size(GetSettings().GetStyleSettings().GetScrollBarSize(), 
TBX_WINDOW_HEIGHT) );
+  
aButton.SetSizePixel(Size(GetSettings().GetStyleSettings().GetScrollBarSize(), 
aMultiTextWnd.GetPixelHeightForLines(1)) );
   aButton.Enable();
   aButton.SetSymbol( SYMBOL_SPIN_DOWN  );
   aButton.SetQuickHelpText( ScResId( SCSTR_QHELP_EXPAND_FORMULA ) );
@@ -1123,18 +1123,16 @@ void ScMultiTextWnd::Paint( const Rectangle& rRec )
 }
 }
 
-long ScMultiTextWnd::GetPixelTextHeight()
+
+long ScMultiTextWnd::GetPixelHeightForLines( long nLines )
 {
 long height = ( LogicToPixel(Size(0,GetTextHeight())).Height() );
 // need to figure out why GetTextHeight is not set up when I need it
 // some initialisation timing issue ?
-return Max ( long( 14 ), height );
-}
-
-
-long ScMultiTextWnd::GetPixelHeightForLines( long nLines )
-{
-return nLines *  GetPixelTextHeight();
+height = Max ( long( 14 ), height );
+// add padding ( for the borders of the window I guess ) otherwise we
+// chop slightly the top and bottom of whatever is in the inputbox
+return ( nLines *  height ) + 4;
 }
 
 void ScMultiTextWnd::SetNumLines( long nLines )
@@ -1153,14 +1151,14 @@ void ScMultiTextWnd::Resize()
 // parent/container window
 Size aTextBoxSize  = GetSizePixel();
 
-aTextBoxSize.Height()=( GetPixelHeightForLines( mnLines ) ) + 8;
+aTextBoxSize.Height()=( GetPixelHeightForLines( mnLines ) );
+SetSizePixel(aTextBoxSize);
 
 if(pEditView)
 {
 Size aOutputSize = GetOutputSizePixel();
-Size aLineSize = Size(0,GetPixelTextHeight());
-int nDiff = (aOutputSize.Height() - ( mnLines *aLineSize.Height()))/2;
-Point aPos1(TEXT_STARTPOS,nDiff);
+Size aLineSize = Size(0,aTextBoxSize.Height());
+Point aPos1(TEXT_STARTPOS,0);
 Point aPos2(aOutputSize.Width(),aOutputSize.Height());
 
 pEditView->SetOutputArea(
@@ -1170,7 +1168,6 @@ void ScMultiTextWnd::Resize()
 }
 
 SetScrollBarRange();
-SetSizePixel(aTextBoxSize);
 }
 
 IMPL_LINK(ScMultiTextWnd, ModifyHdl, EENotify*, pNotify)
diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx
index 76730b6..7a1da05 100644
--- a/sc/source/ui/inc/inputwin.hxx
+++ b/sc/source/ui/inc/inputwin.hxx
@@ -176,7 +176,6 @@ public:
 virtual void StopEditEngine( sal_Bool bAll );
 int GetLineCount();
 virtual void Resize();
-long GetPixelTextHeight();
 long GetPixelHeightForLines( long nLines );
 long GetEditEngTxtHeight();
 
@@ -193,6 +192,7 @@ protected:
 DECL_LINK( NotifyHdl, EENotify* );
 DECL_LINK( ModifyHdl, EENotify* );
 private:
+long GetPixelTextHeight();
 ScInputBarGroup& mrGroupBar;
 long mnLines;
 long mnLastExpandedLines;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - cui/source drawinglayer/Library_drawinglayer.mk drawinglayer/source editeng/source

2011-12-07 Thread Stephan Bergmann
 cui/source/options/optgdlg.cxx   |1 
 drawinglayer/Library_drawinglayer.mk |1 
 drawinglayer/source/processor2d/canvasprocessor.cxx  |   21 +---
 drawinglayer/source/processor2d/getdigitlanguage.cxx |   49 +++
 drawinglayer/source/processor2d/getdigitlanguage.hxx |   46 +
 drawinglayer/source/processor2d/vclprocessor2d.cxx   |   22 +---
 editeng/source/editeng/editeng.cxx   |1 
 7 files changed, 102 insertions(+), 39 deletions(-)

New commits:
commit 400b458911a777dfb0d504ba65ed9496c441e556
Author: Stephan Bergmann 
Date:   Wed Dec 7 16:40:49 2011 +0100

Unused includes.

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index dabc5a7..42a6c21 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -54,7 +54,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/editeng/source/editeng/editeng.cxx 
b/editeng/source/editeng/editeng.cxx
index 796578f..0c7a746 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -34,7 +34,6 @@
 
 #define USE_SVXFONT
 
-#include 
 #include 
 
 #include 
commit 8576bd17844d9c5843e84c330a7d2df79d79db7f
Author: Stephan Bergmann 
Date:   Wed Dec 7 16:34:32 2011 +0100

Factored out common getDigitLanguage.

diff --git a/drawinglayer/Library_drawinglayer.mk 
b/drawinglayer/Library_drawinglayer.mk
index 7b88414..d2934d7 100644
--- a/drawinglayer/Library_drawinglayer.mk
+++ b/drawinglayer/Library_drawinglayer.mk
@@ -153,6 +153,7 @@ $(eval $(call 
gb_Library_add_exception_objects,drawinglayer,\
 drawinglayer/source/processor2d/baseprocessor2d \
 drawinglayer/source/processor2d/canvasprocessor \
 drawinglayer/source/processor2d/contourextractor2d \
+drawinglayer/source/processor2d/getdigitlanguage \
 drawinglayer/source/processor2d/helperchartrenderer \
 drawinglayer/source/processor2d/helperwrongspellrenderer \
 drawinglayer/source/processor2d/hittestprocessor2d \
diff --git a/drawinglayer/source/processor2d/canvasprocessor.cxx 
b/drawinglayer/source/processor2d/canvasprocessor.cxx
index 1365c5d..e916b29 100644
--- a/drawinglayer/source/processor2d/canvasprocessor.cxx
+++ b/drawinglayer/source/processor2d/canvasprocessor.cxx
@@ -36,8 +36,6 @@
 #include 
 #include 
 #include 
-#include 
-#include 
 #include 
 #include 
 #include 
@@ -69,6 +67,8 @@
 #include 
 #include 
 
+#include "getdigitlanguage.hxx"
+
 //
 
 using namespace com::sun::star;
@@ -969,29 +969,14 @@ namespace drawinglayer
 maBColorModifierStack(),
 maDrawinglayerOpt(),
 maClipPolyPolygon(),
-meLang(LANGUAGE_SYSTEM)
+meLang(drawinglayer::detail::getDigitLanguage())
 {
-const SvtCTLOptions aSvtCTLOptions;
-
 canvas::tools::initViewState(maViewState);
 canvas::tools::initRenderState(maRenderState);
 canvas::tools::setViewStateTransform(maViewState, 
getViewInformation2D().getViewTransformation());
 
 // set digit language, derived from SvtCTLOptions to have the 
correct
 // number display for arabic/hindi numerals
-if(SvtCTLOptions::NUMERALS_HINDI == 
aSvtCTLOptions.GetCTLTextNumerals())
-{
-meLang = LANGUAGE_ARABIC_SAUDI_ARABIA;
-}
-else if(SvtCTLOptions::NUMERALS_ARABIC == 
aSvtCTLOptions.GetCTLTextNumerals())
-{
-meLang = LANGUAGE_ENGLISH;
-}
-else
-{
-meLang = 
(LanguageType)Application::GetSettings().GetLanguage();
-}
-
 rOutDev.SetDigitLanguage(meLang);
 
 // prepare output directly to pixels
diff --git a/drawinglayer/source/processor2d/getdigitlanguage.cxx 
b/drawinglayer/source/processor2d/getdigitlanguage.cxx
new file mode 100644
index 000..000588e
--- /dev/null
+++ b/drawinglayer/source/processor2d/getdigitlanguage.cxx
@@ -0,0 +1,49 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License or as specified alternatively below. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * Major Contributor(s):
+ * [ Copyright (C) 2011 Red Hat, Inc., Stephan Bergmann 
+ *   (initial developer) ]
+ *
+ * All Rights Reserved.
+ *
+ * For minor contributions

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

2011-12-07 Thread Kohei Yoshida
 sc/source/filter/excel/xistyle.cxx |   12 +++-
 1 file changed, 3 insertions(+), 9 deletions(-)

New commits:
commit 561f082041c5ede44d9443e534761a79953aedad
Author: Kohei Yoshida 
Date:   Wed Dec 7 10:38:25 2011 -0500

fdo#43308: Set the logic straight for "center across selection" setting.

Another unfortunate logic change introduced via DECLARE_LIST removal.
Reverting the logic to the original one.

diff --git a/sc/source/filter/excel/xistyle.cxx 
b/sc/source/filter/excel/xistyle.cxx
index d2d4467..2131095 100644
--- a/sc/source/filter/excel/xistyle.cxx
+++ b/sc/source/filter/excel/xistyle.cxx
@@ -1824,15 +1824,9 @@ void XclImpXFRangeBuffer::SetXF( const ScAddress& 
rScPos, sal_uInt16 nXFIndex, X
 if( pXF && ((pXF->GetHorAlign() == EXC_XF_HOR_CENTER_AS) || 
(pXF->GetHorAlign() == EXC_XF_HOR_FILL)) )
 {
 // expand last merged range if this attribute is set repeatedly
-if ( !maMergeList.empty() )
-{
-ScRange* pRange = maMergeList.back();
-if(  (pRange->aEnd.Row() == nScRow)
-  && (pRange->aEnd.Col() + 1 == nScCol)
-  && (eMode  == xlXFModeBlank)
-  )
-pRange->aEnd.IncCol();
-}
+ScRange* pRange = maMergeList.empty() ? NULL : maMergeList.back();
+if (pRange && (pRange->aEnd.Row() == nScRow) && 
(pRange->aEnd.Col() + 1 == nScCol) && (eMode == xlXFModeBlank))
+pRange->aEnd.IncCol();
 else if( eMode != xlXFModeBlank )   // do not merge empty cells
 SetMerge( nScCol, nScRow );
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sc/source

2011-12-07 Thread Kohei Yoshida
 sc/source/filter/excel/xistyle.cxx |   12 +++-
 1 file changed, 3 insertions(+), 9 deletions(-)

New commits:
commit 17c7711948f8157478dc3abe9c52b8078fd8b5a9
Author: Kohei Yoshida 
Date:   Wed Dec 7 10:38:25 2011 -0500

fdo#43308: Set the logic straight for "center across selection" setting.

Another unfortunate logic change introduced via DECLARE_LIST removal.
Reverting the logic to the original one.

diff --git a/sc/source/filter/excel/xistyle.cxx 
b/sc/source/filter/excel/xistyle.cxx
index d2d4467..2131095 100644
--- a/sc/source/filter/excel/xistyle.cxx
+++ b/sc/source/filter/excel/xistyle.cxx
@@ -1824,15 +1824,9 @@ void XclImpXFRangeBuffer::SetXF( const ScAddress& 
rScPos, sal_uInt16 nXFIndex, X
 if( pXF && ((pXF->GetHorAlign() == EXC_XF_HOR_CENTER_AS) || 
(pXF->GetHorAlign() == EXC_XF_HOR_FILL)) )
 {
 // expand last merged range if this attribute is set repeatedly
-if ( !maMergeList.empty() )
-{
-ScRange* pRange = maMergeList.back();
-if(  (pRange->aEnd.Row() == nScRow)
-  && (pRange->aEnd.Col() + 1 == nScCol)
-  && (eMode  == xlXFModeBlank)
-  )
-pRange->aEnd.IncCol();
-}
+ScRange* pRange = maMergeList.empty() ? NULL : maMergeList.back();
+if (pRange && (pRange->aEnd.Row() == nScRow) && 
(pRange->aEnd.Col() + 1 == nScCol) && (eMode == xlXFModeBlank))
+pRange->aEnd.IncCol();
 else if( eMode != xlXFModeBlank )   // do not merge empty cells
 SetMerge( nScCol, nScRow );
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2011-12-07 Thread Eike Rathke
 filter/source/svg/svgwriter.hxx |9 +-
 sc/source/core/tool/chgtrack.cxx|9 ++
 sc/source/filter/xcl97/xcl97esc.cxx |   14 +++-
 sc/source/filter/xml/xmlfilti.hxx   |   10 ++
 starmath/source/mathmlimport.cxx|   94 +++
 starmath/source/mathmlimport.hxx|2 
 starmath/source/parse.cxx   |  124 ++--
 vcl/source/gdi/cvtsvm.cxx   |   20 -
 8 files changed, 140 insertions(+), 142 deletions(-)

New commits:
commit ac40f7d6503533954127e818f2bf009200c1e3f2
Author: Eike Rathke 
Date:   Wed Dec 7 16:11:57 2011 +0100

old class Stack pop'ed 0 from empty stack, which std::stack doesn't

Some places in the code assumed that if the stack is empty a null pointer is
returned by top() (or old Pop()), this doesn't work anymore with 
::std::stack
that instead has undefined behavior in that case, so check !stack.empty()
first before accessing top.

diff --git a/filter/source/svg/svgwriter.hxx b/filter/source/svg/svgwriter.hxx
index 0b6048e..b4fe4ae 100644
--- a/filter/source/svg/svgwriter.hxx
+++ b/filter/source/svg/svgwriter.hxx
@@ -186,9 +186,12 @@ private:
 }
 voidImplReleaseContext()
 {
-delete maContextStack.top();
-maContextStack.pop();
-mpContext = maContextStack.top();
+if (!maContextStack.empty())
+{
+delete maContextStack.top();
+maContextStack.pop();
+}
+mpContext = (maContextStack.empty() ? NULL : maContextStack.top());
 }
 
 longImplMap( sal_Int32 nVal ) const;
diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx
index a94b0d3..7a85014 100644
--- a/sc/source/core/tool/chgtrack.cxx
+++ b/sc/source/core/tool/chgtrack.cxx
@@ -2240,8 +2240,13 @@ void ScChangeTrack::EndBlockModify( sal_uLong nEndAction 
)
 }
 else
 delete pBlockModifyMsg;
-pBlockModifyMsg = aMsgStackTmp.top();   // evtl. Block im Block
-aMsgStackTmp.pop();
+if (aMsgStackTmp.empty())
+pBlockModifyMsg = NULL;
+else
+{
+pBlockModifyMsg = aMsgStackTmp.top();   // evtl. Block im Block
+aMsgStackTmp.pop();
+}
 }
 if ( !pBlockModifyMsg )
 {
diff --git a/sc/source/filter/xcl97/xcl97esc.cxx 
b/sc/source/filter/xcl97/xcl97esc.cxx
index 207a37d..50b53c2 100644
--- a/sc/source/filter/xcl97/xcl97esc.cxx
+++ b/sc/source/filter/xcl97/xcl97esc.cxx
@@ -346,9 +346,17 @@ void XclEscherEx::EndShape( sal_uInt16 nShapeType, 
sal_uInt32 nShapeID )
 
 // get next object from stack
 DeleteCurrAppData();
-pCurrXclObj = aStack.top().first;
-pCurrAppData = aStack.top().second;
-aStack.pop();
+if (aStack.empty())
+{
+pCurrXclObj = NULL;
+pCurrAppData = NULL;
+}
+else
+{
+pCurrXclObj = aStack.top().first;
+pCurrAppData = aStack.top().second;
+aStack.pop();
+}
 if( nAdditionalText == 3 )
 nAdditionalText = 0;
 }
diff --git a/sc/source/filter/xml/xmlfilti.hxx 
b/sc/source/filter/xml/xmlfilti.hxx
index bb30101..759f954 100644
--- a/sc/source/filter/xml/xmlfilti.hxx
+++ b/sc/source/filter/xml/xmlfilti.hxx
@@ -262,8 +262,14 @@ public:
 
 void CloseConnection()
 {
-bool bTemp = aConnectionOrStack.top();
-aConnectionOrStack.pop();
+bool bTemp;
+if (aConnectionOrStack.empty())
+bTemp = false;
+else
+{
+bTemp = aConnectionOrStack.top();
+aConnectionOrStack.pop();
+}
 bConnectionOr = bTemp;
 bNextConnectionOr = bTemp;
 }
diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx
index 0db8cc4..9290127 100644
--- a/starmath/source/mathmlimport.cxx
+++ b/starmath/source/mathmlimport.cxx
@@ -95,6 +95,18 @@ using ::rtl::OUStringBuffer;
 
 
 
+namespace {
+template < typename T >
+T* lcl_popOrZero( ::std::stack & rStack )
+{
+if (rStack.empty())
+return 0;
+T* pTmp = rStack.top();
+rStack.pop();
+return pTmp;
+}
+}
+
 sal_uLong SmXMLImportWrapper::Import(SfxMedium &rMedium)
 {
 sal_uLong nError = ERRCODE_SFX_DOLOADFAILED;
@@ -747,8 +759,7 @@ void SmXMLContext_Helper::ApplyAttrs()
 aToken.eType = TNBOLD;
 SmStructureNode *pFontNode = static_cast
 (new SmFontNode(aToken));
-pFontNode->SetSubNodes(0,rNodeStack.top());
-rNodeStack.pop();
+pFontNode->SetSubNodes(0,lcl_popOrZero(rNodeStack));
 rNodeStack.push(pFontNode);
 }
 if (nIsItalic != -1)
@@ -759,8 +770,7 @@ void SmXMLContext_Helper::ApplyAttrs()
 aToken.eType = TNITALIC;
 SmStructureNode *pFontNode = static_cast
  

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

2011-12-07 Thread Cédric Bosdonnat
 sw/source/ui/docvw/HeaderFooterWin.cxx |   14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

New commits:
commit f378c85a705be23ddc7523c3122807393d27095a
Author: Cédric Bosdonnat 
Date:   Wed Dec 7 16:09:26 2011 +0100

Header/Footer: update the label as the page style may have changed

diff --git a/sw/source/ui/docvw/HeaderFooterWin.cxx 
b/sw/source/ui/docvw/HeaderFooterWin.cxx
index 076ce17..d8f6395 100644
--- a/sw/source/ui/docvw/HeaderFooterWin.cxx
+++ b/sw/source/ui/docvw/HeaderFooterWin.cxx
@@ -162,13 +162,6 @@ SwHeaderFooterWin::SwHeaderFooterWin( SwEditWin* pEditWin, 
const SwPageFrm* pPag
 // Use pixels for the rest of the drawing
 SetMapMode( MapMode ( MAP_PIXEL ) );
 
-// Compute the text to show
-m_sLabel = ResId::toString( SW_RES( STR_HEADER_TITLE ) );
-if ( !m_bIsHeader )
-m_sLabel = ResId::toString( SW_RES( STR_FOOTER_TITLE ) );
-sal_Int32 nPos = m_sLabel.lastIndexOf( rtl::OUString::createFromAscii( 
"%1" ) );
-m_sLabel = m_sLabel.replaceAt( nPos, 2, 
GetPageFrame()->GetPageDesc()->GetName() );
-
 // Create the line control
 basegfx::BColor aColor = 
SwViewOption::GetHeaderFooterMarkColor().getBColor();
 m_pLine = new SwDashedLine( GetEditWin(), aColor );
@@ -208,6 +201,13 @@ const SwPageFrm* SwHeaderFooterWin::GetPageFrame( )
 
 void SwHeaderFooterWin::SetOffset( Point aOffset, long nXLineStart, long 
nXLineEnd )
 {
+// Compute the text to show
+m_sLabel = ResId::toString( SW_RES( STR_HEADER_TITLE ) );
+if ( !m_bIsHeader )
+m_sLabel = ResId::toString( SW_RES( STR_FOOTER_TITLE ) );
+sal_Int32 nPos = m_sLabel.lastIndexOf( rtl::OUString::createFromAscii( 
"%1" ) );
+m_sLabel = m_sLabel.replaceAt( nPos, 2, 
GetPageFrame()->GetPageDesc()->GetName() );
+
 // Compute the text size and get the box position & size from it
 Rectangle aTextRect;
 GetTextBoundRect( aTextRect, String( m_sLabel ) );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - instsetoo_native/util

2011-12-07 Thread Thorsten Behrens
 instsetoo_native/util/makefile.mk |5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit e4c8b865d0e05f848bb4b8eac53c1b14466bb8f3
Author: Bjoern Michaelsen 
Date:   Wed Dec 7 15:46:42 2011 +0100

dont do fancy stuff with files that are in zips instsetoo_native for now

diff --git a/instsetoo_native/util/makefile.mk 
b/instsetoo_native/util/makefile.mk
index 39677d2..907b2e7 100644
--- a/instsetoo_native/util/makefile.mk
+++ b/instsetoo_native/util/makefile.mk
@@ -71,10 +71,7 @@ INSTALLDIR=$(OUT)
 LOCALPYFILES= \
 $(BIN)$/uno.py \
 $(BIN)$/unohelper.py \
-$(BIN)$/pythonloader.py \
-$(BIN)$/officehelper.py \
-$(BIN)$/mailmerge.py \
-$(BIN)$/msgbox.py
+$(BIN)$/pythonloader.py
 .ENDIF
 
 help_exist:=$(shell @find $(L10N_MODULE)/source/ -type d -name "helpcontent2" 
2>/dev/null | sed -e "s|/helpcontent2||" -e "s|^.*/||" ) en-US qtz
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2011-12-07 Thread Cédric Bosdonnat
 sw/source/ui/docvw/HeaderFooterWin.cxx |   14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

New commits:
commit a0afe6f397b508d2b649dab4bfdd05caecf4bd8a
Author: Cédric Bosdonnat 
Date:   Wed Dec 7 16:09:26 2011 +0100

Header/Footer: update the label as the page style may have changed

diff --git a/sw/source/ui/docvw/HeaderFooterWin.cxx 
b/sw/source/ui/docvw/HeaderFooterWin.cxx
index 076ce17..d8f6395 100644
--- a/sw/source/ui/docvw/HeaderFooterWin.cxx
+++ b/sw/source/ui/docvw/HeaderFooterWin.cxx
@@ -162,13 +162,6 @@ SwHeaderFooterWin::SwHeaderFooterWin( SwEditWin* pEditWin, 
const SwPageFrm* pPag
 // Use pixels for the rest of the drawing
 SetMapMode( MapMode ( MAP_PIXEL ) );
 
-// Compute the text to show
-m_sLabel = ResId::toString( SW_RES( STR_HEADER_TITLE ) );
-if ( !m_bIsHeader )
-m_sLabel = ResId::toString( SW_RES( STR_FOOTER_TITLE ) );
-sal_Int32 nPos = m_sLabel.lastIndexOf( rtl::OUString::createFromAscii( 
"%1" ) );
-m_sLabel = m_sLabel.replaceAt( nPos, 2, 
GetPageFrame()->GetPageDesc()->GetName() );
-
 // Create the line control
 basegfx::BColor aColor = 
SwViewOption::GetHeaderFooterMarkColor().getBColor();
 m_pLine = new SwDashedLine( GetEditWin(), aColor );
@@ -208,6 +201,13 @@ const SwPageFrm* SwHeaderFooterWin::GetPageFrame( )
 
 void SwHeaderFooterWin::SetOffset( Point aOffset, long nXLineStart, long 
nXLineEnd )
 {
+// Compute the text to show
+m_sLabel = ResId::toString( SW_RES( STR_HEADER_TITLE ) );
+if ( !m_bIsHeader )
+m_sLabel = ResId::toString( SW_RES( STR_FOOTER_TITLE ) );
+sal_Int32 nPos = m_sLabel.lastIndexOf( rtl::OUString::createFromAscii( 
"%1" ) );
+m_sLabel = m_sLabel.replaceAt( nPos, 2, 
GetPageFrame()->GetPageDesc()->GetName() );
+
 // Compute the text size and get the box position & size from it
 Rectangle aTextRect;
 GetTextBoundRect( aTextRect, String( m_sLabel ) );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2011-12-07 Thread Michael Meeks
 cppuhelper/source/bootstrap.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit 7713d3378d8aa7da1855adbeb885ac2c3b79a623
Author: Michael Meeks 
Date:   Wed Dec 7 14:38:16 2011 +

ignore backup files in services/ directory to avoid debugging grief

diff --git a/cppuhelper/source/bootstrap.cxx b/cppuhelper/source/bootstrap.cxx
index 8217ee7..399af07 100644
--- a/cppuhelper/source/bootstrap.cxx
+++ b/cppuhelper/source/bootstrap.cxx
@@ -289,6 +289,13 @@ Reference< registry::XSimpleRegistry > readRdbDirectory(
  url),
 css::uno::Reference< css::uno::XInterface >());
 }
+rtl::OUString aName = stat.getFileName();
+
+// Ignore backup files - to allow people to edit their
+// services/ without extremely confusing behaviour
+if (aName.toChar() == '.' || aName.endsWithAsciiL("~", 1))
+continue;
+
 if (stat.getFileType() != osl::FileStatus::Directory) { //TODO: 
symlinks
 last = readRdbFile(
 stat.getFileURL(), fatalErrors, last, simpleRegistryFactory,
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: cppuhelper/source

2011-12-07 Thread Michael Meeks
 cppuhelper/source/bootstrap.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit b8c7548527f5fc14fe8fcbe74a749c7e3c10d385
Author: Michael Meeks 
Date:   Wed Dec 7 14:38:16 2011 +

ignore backup files in services/ directory to avoid debugging grief

diff --git a/cppuhelper/source/bootstrap.cxx b/cppuhelper/source/bootstrap.cxx
index 8217ee7..399af07 100644
--- a/cppuhelper/source/bootstrap.cxx
+++ b/cppuhelper/source/bootstrap.cxx
@@ -289,6 +289,13 @@ Reference< registry::XSimpleRegistry > readRdbDirectory(
  url),
 css::uno::Reference< css::uno::XInterface >());
 }
+rtl::OUString aName = stat.getFileName();
+
+// Ignore backup files - to allow people to edit their
+// services/ without extremely confusing behaviour
+if (aName.toChar() == '.' || aName.endsWithAsciiL("~", 1))
+continue;
+
 if (stat.getFileType() != osl::FileStatus::Directory) { //TODO: 
symlinks
 last = readRdbFile(
 stat.getFileURL(), fatalErrors, last, simpleRegistryFactory,
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2011-12-07 Thread Miklos Vajna
 solenv/inc/langlist.mk |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 8d5bdf2913852f4c14d8e09cbeed05684a1ce4b7
Author: Miklos Vajna 
Date:   Tue Dec 6 20:06:33 2011 +0100

langlist.mk: remove bogus Turkmen language

This was added in cbf182a975dd170aa4997677ac3516ade4cb30a7, but
scp2/source/ooo/module_langpack.ulf was never updated accordingly, nor
there is such a language on Pootle.
(cherry picked from commit 0d5b38240caf03323d9a180811653eb38eaf7f48)

diff --git a/solenv/inc/langlist.mk b/solenv/inc/langlist.mk
index 8a79b15..f044711 100644
--- a/solenv/inc/langlist.mk
+++ b/solenv/inc/langlist.mk
@@ -121,7 +121,6 @@ ta \
 te \
 tg \
 th \
-tk \
 tn \
 tr \
 ts \
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - solenv/gbuild

2011-12-07 Thread Thorsten Behrens
 solenv/gbuild/Pyuno.mk   |   26 ++
 solenv/gbuild/TargetLocations.mk |5 +++--
 2 files changed, 9 insertions(+), 22 deletions(-)

New commits:
commit 15c60429f8055747665b527b1a704c9297ace79d
Author: Bjoern Michaelsen 
Date:   Wed Dec 7 14:48:48 2011 +0100

reuse Zip Target for PyUno

diff --git a/solenv/gbuild/Pyuno.mk b/solenv/gbuild/Pyuno.mk
index a18ef65..34b6caa 100644
--- a/solenv/gbuild/Pyuno.mk
+++ b/solenv/gbuild/Pyuno.mk
@@ -23,40 +23,26 @@
 # in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
 # instead of those above.
 
-gb_Pyuno_ZIPCOMMAND := zip $(if $(findstring s,$(MAKEFLAGS)),-q)
-gb_Pyuno__get_outdir_path = $(patsubst 
$(OUTDIR)/%,%,$(gb_Helper_OUTDIRLIBDIR))/pyuno/$(1)
-
 $(call gb_Pyuno_get_target,%) :
$(call gb_Output_announce,$*,$(true),PYU,3)
mkdir -p $(dir $@) && touch $@
 
-$(call gb_Pyuno_get_target_zip,%) : $(call gb_Package_get_target,%_pyuno)
-   $(call gb_Output_announce,$*,$(true),PZP,3)
-   cd $(gb_Helper_OUTDIRLIBDIR)/pyuno && \
-   $(gb_Pyuno_ZIPCOMMAND) -rX --filesync \
-   $(call gb_Pyuno_get_target_zip,$*) \
-   $(PYZFILES)
-
 .PHONY : $(call gb_Pyuno_get_clean_target,%)
 $(call gb_Pyuno_get_clean_target,%) :
$(call gb_Output_announce,$*,$(false),PYU,3)
-   rm -f $@ $(gb_Pyuno_get_target_zip,$*)
+   rm -f $(call gb_Pyuno_get_target,$*) $(call 
gb_Pyuno_get_outdir_target,$*)
 
 define gb_Pyuno_Pyuno
-$(call gb_Pyuno_get_target_zip,$(1)) : PYZFILES :=
-$(call gb_Package_Package,$(1)_pyuno,$(2))
+$(call gb_Zip_Zip,Pyuno/$(1),$(2))
 $$(eval $$(call gb_Module_register_target,$(call 
gb_Pyuno_get_target,$(1)),$(call gb_Pyuno_get_clean_target,$(1
-$(call gb_Pyuno_get_target,$(1)) : \
-   $(call gb_Package_get_target,$(1)_pyuno) \
-   $(call gb_Pyuno_get_target_zip,$(1))
-$(call gb_Pyuno_get_clean_target,$(1)) : \
-   $(call gb_Package_get_clean_target,$(1)_pyuno)
+$(call gb_Pyuno_get_target,$(1)) : $(call gb_Pyuno_get_outdir_target,$(1))
+$(call gb_Pyuno_get_outdir_target,$(1)) : $(call gb_Zip_get_target,Pyuno/$(1))
+$(call gb_Pyuno_get_clean_target,$(1)) : $(call 
gb_Zip_get_clean_target,Pyuno/$(1))
 
 endef
 
 define gb_Pyuno_add_file
-$(call gb_Pyuno_get_target_zip,$(1)) : PYZFILES += $(2)
-$(call gb_Package_add_file,$(1)_pyuno,$(call 
gb_Pyuno__get_outdir_path,$(2)),$(2))
+$(call gb_Zip_add_file,Pyuno/$(1),$(2))
 
 endef
 
diff --git a/solenv/gbuild/TargetLocations.mk b/solenv/gbuild/TargetLocations.mk
index d51b8ed..b7a4fde 100644
--- a/solenv/gbuild/TargetLocations.mk
+++ b/solenv/gbuild/TargetLocations.mk
@@ -103,8 +103,9 @@ gb_ObjCxxObject_get_target = $(WORKDIR)/ObjCxxObject/$(1).o
 gb_ObjCObject_get_target = $(WORKDIR)/ObjCObject/$(1).o
 gb_Package_get_preparation_target = $(WORKDIR)/Package/prepared/$(1)
 gb_Package_get_target = $(WORKDIR)/Package/$(1)
-gb_Pyuno_get_target = $(WORKDIR)/Pyuno/$(1)
-gb_Pyuno_get_target_zip = $(OUTDIR)/bin/$(1).zip
+gb_Pyuno_get_target = $(WORKDIR)/Pyuno/$(1).zip
+gb_Pyuno_get_outdir_target = $(OUTDIR)/bin/$(1).zip
+gb_PyunoFile_get_target = $(WORKDIR)/Pyuno/$(1)/contents/$(2)
 gb_RdbTarget_get_target = $(WORKDIR)/RdbTarget/$(1).rdb
 gb_ResTarget_get_imagelist_target = $(WORKDIR)/ResTarget/$(1).ilst
 gb_ResTarget_get_target = $(WORKDIR)/ResTarget/$(1).res
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 7 commits - oox/inc oox/source starmath/inc starmath/source writerfilter/source

2011-12-07 Thread Lubos Lunak
 oox/inc/oox/mathml/importutils.hxx|   62 +++---
 oox/source/mathml/importutils.cxx |   50 +++---
 starmath/inc/node.hxx |5 +
 starmath/source/mathtype.cxx  |   37 --
 starmath/source/node.cxx  |   33 +
 starmath/source/ooxmlexport.cxx   |   43 +---
 starmath/source/ooxmlimport.cxx   |   10 +-
 writerfilter/source/ooxml/OOXMLFastContextHandler.cxx |   62 ++
 writerfilter/source/ooxml/OOXMLFastContextHandler.hxx |   45 +++--
 9 files changed, 208 insertions(+), 139 deletions(-)

New commits:
commit c3601199f8c272228689703598d2033357eaa079
Author: Luboš Luňák 
Date:   Fri Dec 2 17:38:51 2011 +0100

make the linear xml processing API more generic

I'm pretty sure I'll love to use it in writerfilter instead of the normal
API whenever I get the chance.

diff --git a/oox/inc/oox/mathml/importutils.hxx 
b/oox/inc/oox/mathml/importutils.hxx
index 9f75930..6906851 100644
--- a/oox/inc/oox/mathml/importutils.hxx
+++ b/oox/inc/oox/mathml/importutils.hxx
@@ -41,15 +41,15 @@ namespace oox
 namespace formulaimport
 {
 
+// used to differentiate between tags that opening or closing
 const int TAG_OPENING = 1 << 29;
 const int TAG_CLOSING = 1 << 30;
 
-// used to differentiate between tags that open or close
-// TODO
-//inline int OPENING( int token ) { return TAG_OPENING | token; }
-//inline int CLOSING( int token ) { return TAG_CLOSING | token; }
-#define OPENING( token ) ( TAG_OPENING | token )
-#define CLOSING( token ) ( TAG_CLOSING | token )
+// you probably want to #define these to something shorter in the .cxx file,
+// but they must be done as macros, otherwise they wouldn't be usable for case 
values,
+// and macros cannot be namespaced
+#define XML_STREAM_OPENING( token ) ( TAG_OPENING | token )
+#define XML_STREAM_CLOSING( token ) ( TAG_CLOSING | token )
 
 /**
  Class for storing a stream of xml tokens.
@@ -59,7 +59,55 @@ const int TAG_CLOSING = 1 << 30;
  files, unlike the usual LO way of using callbacks, context handlers and 
similar needlesly
  complicated stuff (YMMV).
 
- @since 3.5.0
+ The advantages of this approach is easy to read and debug code (as it is just 
functions
+ reading tokens one by one and calling other functions, compared to having to 
use callbacks
+ and temporary storage). The disadvantage is that the XML structure needs to 
be handled
+ manually by the code.
+
+ Note that tag identifiers are simply int values and the API does not care 
besides matching
+ their values to XML stream contents and requiring that the values are not as 
high as TAG_OPENING.
+ Be prepared for the fact that some of the functions may throw exceptions if 
the input
+ stream does not match the required token (TBD).
+
+ The API tries to make the common idioms as simple as possible, see the 
following examples.
+
+ Parse text , where tagtwo is 
optional:
+ @code
+XmlStream::Tag tagoneTag = stream.ensureOpeningTag( tagone );
+if( attributeTag.hasAttribute( attr ))
+... = attributeTag.attribute( attr, defaultValueOfTheRightType );
+if( XmlStream::Tag tagtwoTag = stream.checkOpeningTag( tagtwo ))
+{
+... = tagtwoTag.text;
+stream.ensureClosingTag( tagtwo );
+}
+stream.ensureClosingTag( tagone );
+ @endcode
+
+ Parse an element that may contain several sub-elements of different types in 
random order:
+ @code
+stream.ensureOpeningTag( element );
+while( !stream.atEnd() && stream.currentToken() != CLOSING( element ))
+{
+switch( stream.currentToken())
+{
+case OPENING( subelement1 ):
+handleSubElement1();
+break;
+case OPENING( subelement2 ):
+... process subelement2;
+break;
+default:
+stream.handleUnexpectedTag();
+break;
+}
+stream.ensureClosingTag( element );
+ @endcode
+
+ If there may be just a one type of sub-element, handle it directly without 
the switch statement.
+ If there may not be a zero number of sub-elements, use a helper bool variable 
or use a do-while loop.
+
+ @since 3.5
 */
 class OOX_DLLPUBLIC XmlStream
 {
diff --git a/oox/source/mathml/importutils.cxx 
b/oox/source/mathml/importutils.cxx
index 61f04a9..2a7d19c 100644
--- a/oox/source/mathml/importutils.cxx
+++ b/oox/source/mathml/importutils.cxx
@@ -41,6 +41,8 @@
 #define STR( str ) OUString( RTL_CONSTASCII_USTRINGPARAM( str ))
 #define CSTR( str ) ( rtl::OUStringToOString( str, RTL_TEXTENCODING_UTF8 
).getStr())
 
+#define OPENING( token ) XML_STREAM_OPENING( token )
+#define CLOSING( token ) XML_STREAM_CLOSING( token )
 
 // HACK - TODO convert to the real debug stuff
 #undef SAL_LOG_LEVEL
diff --git a/starmath/source/ooxmlimport.cxx b/starmath/source/ooxmlimport.cxx
index c776163..73f0ea5 100644
--- a/starmath/source/ooxmlimport.cxx
+++ b/starmath/source/ooxmlimport.cxx
@

[Libreoffice-commits] .: solenv/gbuild

2011-12-07 Thread Bjoern Michaelsen
 solenv/gbuild/Pyuno.mk   |   26 ++
 solenv/gbuild/TargetLocations.mk |5 +++--
 2 files changed, 9 insertions(+), 22 deletions(-)

New commits:
commit ca23cdbf90b97f141fdcf4fbc237e8f945cdd1e6
Author: Bjoern Michaelsen 
Date:   Wed Dec 7 14:48:48 2011 +0100

reuse Zip Target for PyUno

diff --git a/solenv/gbuild/Pyuno.mk b/solenv/gbuild/Pyuno.mk
index 37512fb..9ad8b36 100644
--- a/solenv/gbuild/Pyuno.mk
+++ b/solenv/gbuild/Pyuno.mk
@@ -25,40 +25,26 @@
 # in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
 # instead of those above.
 
-gb_Pyuno_ZIPCOMMAND := zip $(if $(findstring s,$(MAKEFLAGS)),-q)
-gb_Pyuno__get_outdir_path = $(patsubst 
$(OUTDIR)/%,%,$(gb_Helper_OUTDIRLIBDIR))/pyuno/$(1)
-
 $(call gb_Pyuno_get_target,%) :
$(call gb_Output_announce,$*,$(true),PYU,3)
mkdir -p $(dir $@) && touch $@
 
-$(call gb_Pyuno_get_target_zip,%) : $(call gb_Package_get_target,%_pyuno)
-   $(call gb_Output_announce,$*,$(true),PZP,3)
-   cd $(gb_Helper_OUTDIRLIBDIR)/pyuno && \
-   $(gb_Pyuno_ZIPCOMMAND) -rX --filesync \
-   $(call gb_Pyuno_get_target_zip,$*) \
-   $(PYZFILES)
-
 .PHONY : $(call gb_Pyuno_get_clean_target,%)
 $(call gb_Pyuno_get_clean_target,%) :
$(call gb_Output_announce,$*,$(false),PYU,3)
-   rm -f $@ $(gb_Pyuno_get_target_zip,$*)
+   rm -f $(call gb_Pyuno_get_target,$*) $(call 
gb_Pyuno_get_outdir_target,$*)
 
 define gb_Pyuno_Pyuno
-$(call gb_Pyuno_get_target_zip,$(1)) : PYZFILES :=
-$(call gb_Package_Package,$(1)_pyuno,$(2))
+$(call gb_Zip_Zip,Pyuno/$(1),$(2))
 $$(eval $$(call gb_Module_register_target,$(call 
gb_Pyuno_get_target,$(1)),$(call gb_Pyuno_get_clean_target,$(1
-$(call gb_Pyuno_get_target,$(1)) : \
-   $(call gb_Package_get_target,$(1)_pyuno) \
-   $(call gb_Pyuno_get_target_zip,$(1))
-$(call gb_Pyuno_get_clean_target,$(1)) : \
-   $(call gb_Package_get_clean_target,$(1)_pyuno)
+$(call gb_Pyuno_get_target,$(1)) : $(call gb_Pyuno_get_outdir_target,$(1))
+$(call gb_Pyuno_get_outdir_target,$(1)) : $(call gb_Zip_get_target,Pyuno/$(1))
+$(call gb_Pyuno_get_clean_target,$(1)) : $(call 
gb_Zip_get_clean_target,Pyuno/$(1))
 
 endef
 
 define gb_Pyuno_add_file
-$(call gb_Pyuno_get_target_zip,$(1)) : PYZFILES += $(2)
-$(call gb_Package_add_file,$(1)_pyuno,$(call 
gb_Pyuno__get_outdir_path,$(2)),$(2))
+$(call gb_Zip_add_file,Pyuno/$(1),$(2))
 
 endef
 
diff --git a/solenv/gbuild/TargetLocations.mk b/solenv/gbuild/TargetLocations.mk
index d51b8ed..b7a4fde 100644
--- a/solenv/gbuild/TargetLocations.mk
+++ b/solenv/gbuild/TargetLocations.mk
@@ -103,8 +103,9 @@ gb_ObjCxxObject_get_target = $(WORKDIR)/ObjCxxObject/$(1).o
 gb_ObjCObject_get_target = $(WORKDIR)/ObjCObject/$(1).o
 gb_Package_get_preparation_target = $(WORKDIR)/Package/prepared/$(1)
 gb_Package_get_target = $(WORKDIR)/Package/$(1)
-gb_Pyuno_get_target = $(WORKDIR)/Pyuno/$(1)
-gb_Pyuno_get_target_zip = $(OUTDIR)/bin/$(1).zip
+gb_Pyuno_get_target = $(WORKDIR)/Pyuno/$(1).zip
+gb_Pyuno_get_outdir_target = $(OUTDIR)/bin/$(1).zip
+gb_PyunoFile_get_target = $(WORKDIR)/Pyuno/$(1)/contents/$(2)
 gb_RdbTarget_get_target = $(WORKDIR)/RdbTarget/$(1).rdb
 gb_ResTarget_get_imagelist_target = $(WORKDIR)/ResTarget/$(1).ilst
 gb_ResTarget_get_target = $(WORKDIR)/ResTarget/$(1).res
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: distro-configs/LibreOfficeLinux.conf

2011-12-07 Thread Fridrich Strba
 distro-configs/LibreOfficeLinux.conf |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 1924f9d049564400ea7411a5ed33e6633e05fa1a
Author: Fridrich Å trba 
Date:   Wed Dec 7 14:58:44 2011 +0100

Build pgsql connector for Linux release builds

diff --git a/distro-configs/LibreOfficeLinux.conf 
b/distro-configs/LibreOfficeLinux.conf
index cfe81ee..b2c6894 100644
--- a/distro-configs/LibreOfficeLinux.conf
+++ b/distro-configs/LibreOfficeLinux.conf
@@ -1,5 +1,6 @@
 --with-vendor=The Document Foundation
 --with-system-dicts
+--with-system-postgresql
 --without-unix-wrapper
 --without-system-zlib
 --without-system-stdlibs
@@ -35,6 +36,7 @@
 --enable-ext-scripting-beanshell
 --enable-ext-scripting-javascript
 --enable-ext-nlpsolver
+--enable-ext-postgresql-sdbc
 --enable-epm
 --enable-cairo
 --enable-binfilter
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - distro-configs/LibreOfficeLinux.conf

2011-12-07 Thread Fridrich Strba
 distro-configs/LibreOfficeLinux.conf |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 7b7181275b18b889b10a602924f4035e73ba3eeb
Author: Fridrich Å trba 
Date:   Wed Dec 7 14:58:44 2011 +0100

Build pgsql connector for Linux release builds

diff --git a/distro-configs/LibreOfficeLinux.conf 
b/distro-configs/LibreOfficeLinux.conf
index cfe81ee..b2c6894 100644
--- a/distro-configs/LibreOfficeLinux.conf
+++ b/distro-configs/LibreOfficeLinux.conf
@@ -1,5 +1,6 @@
 --with-vendor=The Document Foundation
 --with-system-dicts
+--with-system-postgresql
 --without-unix-wrapper
 --without-system-zlib
 --without-system-stdlibs
@@ -35,6 +36,7 @@
 --enable-ext-scripting-beanshell
 --enable-ext-scripting-javascript
 --enable-ext-nlpsolver
+--enable-ext-postgresql-sdbc
 --enable-epm
 --enable-cairo
 --enable-binfilter
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 7 commits - oox/inc oox/source starmath/inc starmath/source writerfilter/source

2011-12-07 Thread Lubos Lunak
 oox/inc/oox/mathml/importutils.hxx|   62 +++---
 oox/source/mathml/importutils.cxx |   50 +++---
 starmath/inc/node.hxx |5 +
 starmath/source/mathtype.cxx  |   37 --
 starmath/source/node.cxx  |   33 +
 starmath/source/ooxmlexport.cxx   |   43 +---
 starmath/source/ooxmlimport.cxx   |   10 +-
 writerfilter/source/ooxml/OOXMLFastContextHandler.cxx |   62 ++
 writerfilter/source/ooxml/OOXMLFastContextHandler.hxx |   45 +++--
 9 files changed, 208 insertions(+), 139 deletions(-)

New commits:
commit 7be8bac42aa578dc7f250a490634e13d1dac550b
Author: Luboš Luňák 
Date:   Fri Dec 2 17:38:51 2011 +0100

make the linear xml processing API more generic

I'm pretty sure I'll love to use it in writerfilter instead of the normal
API whenever I get the chance.

diff --git a/oox/inc/oox/mathml/importutils.hxx 
b/oox/inc/oox/mathml/importutils.hxx
index 9f75930..6906851 100644
--- a/oox/inc/oox/mathml/importutils.hxx
+++ b/oox/inc/oox/mathml/importutils.hxx
@@ -41,15 +41,15 @@ namespace oox
 namespace formulaimport
 {
 
+// used to differentiate between tags that opening or closing
 const int TAG_OPENING = 1 << 29;
 const int TAG_CLOSING = 1 << 30;
 
-// used to differentiate between tags that open or close
-// TODO
-//inline int OPENING( int token ) { return TAG_OPENING | token; }
-//inline int CLOSING( int token ) { return TAG_CLOSING | token; }
-#define OPENING( token ) ( TAG_OPENING | token )
-#define CLOSING( token ) ( TAG_CLOSING | token )
+// you probably want to #define these to something shorter in the .cxx file,
+// but they must be done as macros, otherwise they wouldn't be usable for case 
values,
+// and macros cannot be namespaced
+#define XML_STREAM_OPENING( token ) ( TAG_OPENING | token )
+#define XML_STREAM_CLOSING( token ) ( TAG_CLOSING | token )
 
 /**
  Class for storing a stream of xml tokens.
@@ -59,7 +59,55 @@ const int TAG_CLOSING = 1 << 30;
  files, unlike the usual LO way of using callbacks, context handlers and 
similar needlesly
  complicated stuff (YMMV).
 
- @since 3.5.0
+ The advantages of this approach is easy to read and debug code (as it is just 
functions
+ reading tokens one by one and calling other functions, compared to having to 
use callbacks
+ and temporary storage). The disadvantage is that the XML structure needs to 
be handled
+ manually by the code.
+
+ Note that tag identifiers are simply int values and the API does not care 
besides matching
+ their values to XML stream contents and requiring that the values are not as 
high as TAG_OPENING.
+ Be prepared for the fact that some of the functions may throw exceptions if 
the input
+ stream does not match the required token (TBD).
+
+ The API tries to make the common idioms as simple as possible, see the 
following examples.
+
+ Parse text , where tagtwo is 
optional:
+ @code
+XmlStream::Tag tagoneTag = stream.ensureOpeningTag( tagone );
+if( attributeTag.hasAttribute( attr ))
+... = attributeTag.attribute( attr, defaultValueOfTheRightType );
+if( XmlStream::Tag tagtwoTag = stream.checkOpeningTag( tagtwo ))
+{
+... = tagtwoTag.text;
+stream.ensureClosingTag( tagtwo );
+}
+stream.ensureClosingTag( tagone );
+ @endcode
+
+ Parse an element that may contain several sub-elements of different types in 
random order:
+ @code
+stream.ensureOpeningTag( element );
+while( !stream.atEnd() && stream.currentToken() != CLOSING( element ))
+{
+switch( stream.currentToken())
+{
+case OPENING( subelement1 ):
+handleSubElement1();
+break;
+case OPENING( subelement2 ):
+... process subelement2;
+break;
+default:
+stream.handleUnexpectedTag();
+break;
+}
+stream.ensureClosingTag( element );
+ @endcode
+
+ If there may be just a one type of sub-element, handle it directly without 
the switch statement.
+ If there may not be a zero number of sub-elements, use a helper bool variable 
or use a do-while loop.
+
+ @since 3.5
 */
 class OOX_DLLPUBLIC XmlStream
 {
diff --git a/oox/source/mathml/importutils.cxx 
b/oox/source/mathml/importutils.cxx
index 61f04a9..2a7d19c 100644
--- a/oox/source/mathml/importutils.cxx
+++ b/oox/source/mathml/importutils.cxx
@@ -41,6 +41,8 @@
 #define STR( str ) OUString( RTL_CONSTASCII_USTRINGPARAM( str ))
 #define CSTR( str ) ( rtl::OUStringToOString( str, RTL_TEXTENCODING_UTF8 
).getStr())
 
+#define OPENING( token ) XML_STREAM_OPENING( token )
+#define CLOSING( token ) XML_STREAM_CLOSING( token )
 
 // HACK - TODO convert to the real debug stuff
 #undef SAL_LOG_LEVEL
diff --git a/starmath/source/ooxmlimport.cxx b/starmath/source/ooxmlimport.cxx
index c776163..73f0ea5 100644
--- a/starmath/source/ooxmlimport.cxx
+++ b/starmath/source/ooxmlimport.cxx
@

[Libreoffice-commits] .: desktop/Executable_officeloader.mk desktop/Executable_soffice.bin.mk desktop/Library_sofficeapp.mk desktop/source

2011-12-07 Thread Andras Timar
 desktop/Executable_officeloader.mk   |4 
 desktop/Executable_soffice.bin.mk|1 -
 desktop/Library_sofficeapp.mk|1 -
 desktop/source/app/copyright_ascii_ooo.c |   12 
 4 files changed, 18 deletions(-)

New commits:
commit 76aad07712e639494c07e837f1419af444df28a5
Author: Andras Timar 
Date:   Wed Dec 7 14:44:50 2011 +0100

'copyright text to see as text in the soffice binary' deleted

diff --git a/desktop/Executable_officeloader.mk 
b/desktop/Executable_officeloader.mk
index d48518a..c05d4a4 100644
--- a/desktop/Executable_officeloader.mk
+++ b/desktop/Executable_officeloader.mk
@@ -44,8 +44,4 @@ $(eval $(call 
gb_Executable_add_noexception_objects,officeloader,\
 desktop/unx/source/officeloader/officeloader \
 ))
 
-$(eval $(call gb_Executable_add_cobjects,officeloader,\
-desktop/source/app/copyright_ascii_ooo \
-))
-
 # vim: set ts=4 sw=4 et:
diff --git a/desktop/Executable_soffice.bin.mk 
b/desktop/Executable_soffice.bin.mk
index e5d5e18..e4665e8 100644
--- a/desktop/Executable_soffice.bin.mk
+++ b/desktop/Executable_soffice.bin.mk
@@ -46,7 +46,6 @@ $(eval $(call gb_Executable_add_linked_libs,$(sofficebin),\
 ))
 
 $(eval $(call gb_Executable_add_cobjects,$(sofficebin),\
-desktop/source/app/copyright_ascii_ooo \
 desktop/source/app/main \
 ))
 
diff --git a/desktop/Library_sofficeapp.mk b/desktop/Library_sofficeapp.mk
index 3db7a47..a0f65b4 100644
--- a/desktop/Library_sofficeapp.mk
+++ b/desktop/Library_sofficeapp.mk
@@ -89,7 +89,6 @@ $(eval $(call gb_Library_add_exception_objects,sofficeapp,\
 ))
 
 $(eval $(call gb_Library_add_cobjects,sofficeapp,\
-desktop/source/app/copyright_ascii_ooo \
 desktop/source/app/main \
 ))
 
diff --git a/desktop/source/app/copyright_ascii_ooo.c 
b/desktop/source/app/copyright_ascii_ooo.c
deleted file mode 100644
index 3984a81..000
--- a/desktop/source/app/copyright_ascii_ooo.c
+++ /dev/null
@@ -1,12 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-
- /*
-  * copyright text to see as text in the soffice binary
-  *
-  */
-
-extern const char copyright_text_1[];
-
-const char copyright_text_1[] = "Copyright © 2000, 2010 Oracle and/or its 
affiliates, All rights reserved.";
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: solenv/gbuild

2011-12-07 Thread Lubos Lunak
 solenv/gbuild/platform/unxgcc.mk |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 4d204919623b98c5592a1d191bb854043523d170
Author: Luboš Luňák 
Date:   Wed Dec 7 14:28:15 2011 +0100

when stripping is disabled, strip nothing

diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index 28fd943..43d832a 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -150,8 +150,6 @@ endif
 ifneq ($(gb_SYMBOL),$(true))
 ifeq ($(gb_STRIP),$(true))
 gb_LinkTarget_LDFLAGS += -Wl,--strip-all
-else
-gb_LinkTarget_LDFLAGS += -Wl,--strip-debug
 endif
 endif
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2011-12-07 Thread Radek Doulík
 oox/source/drawingml/customshapeproperties.cxx |   77 ++---
 1 file changed, 68 insertions(+), 9 deletions(-)

New commits:
commit e9877935b0d09c7a8321632632c440496a957b0c
Author: Radek Doulik 
Date:   Wed Dec 7 13:37:12 2011 +0100

pptx: make sure we set right type for connector shapes

diff --git a/oox/source/drawingml/customshapeproperties.cxx 
b/oox/source/drawingml/customshapeproperties.cxx
index e0c1fd7..77eb296 100644
--- a/oox/source/drawingml/customshapeproperties.cxx
+++ b/oox/source/drawingml/customshapeproperties.cxx
@@ -167,8 +167,10 @@ void CustomShapeProperties::pushToPropSet( const 
::oox::core::FilterBase& /* rFi
 OSL_TRACE("connector shape: %s (%d)", USS(sConnectorShapeType), 
mnShapePresetType);
 //const uno::Reference < drawing::XShape > xShape( xPropSet, 
UNO_QUERY );
 Reference< drawing::XEnhancedCustomShapeDefaulter > xDefaulter( 
xShape, UNO_QUERY );
-if( xDefaulter.is() )
+if( xDefaulter.is() ) {
 xDefaulter->createCustomShapeDefaults( sConnectorShapeType );
+aPropertyMap[ PROP_Type ] <<= Any( sConnectorShapeType );
+}
 }
 else if (maPresetsMap.find(mnShapePresetType) != maPresetsMap.end())
 {
@@ -229,7 +231,10 @@ void CustomShapeProperties::pushToPropSet( const 
::oox::core::FilterBase& /* rFi
 }
 else if ( aGeoPropSeq[ i ].Name.equals( sType ) )
 {
-aGeoPropSeq[ i ].Value <<= CREATE_OUSTRING( 
"ooxml-CustomShape" );
+if ( sConnectorShapeType.getLength() > 0 )
+aGeoPropSeq[ i ].Value <<= sConnectorShapeType;
+else
+aGeoPropSeq[ i ].Value <<= CREATE_OUSTRING( 
"ooxml-CustomShape" );
 }
 }
 }
commit f0bf2a2ae95ddad3d08ddd1413ec56bf04224a94
Author: Radek Doulik 
Date:   Thu Dec 1 12:13:33 2011 +0100

do not use new presets for connector shapes

 - until we have better implementation

diff --git a/oox/source/drawingml/customshapeproperties.cxx 
b/oox/source/drawingml/customshapeproperties.cxx
index 322043d..e0c1fd7 100644
--- a/oox/source/drawingml/customshapeproperties.cxx
+++ b/oox/source/drawingml/customshapeproperties.cxx
@@ -97,6 +97,56 @@ sal_Int32 CustomShapeProperties::GetCustomShapeGuideValue( 
const std::vector< Cu
 
 CustomShapeProperties::PresetsMap CustomShapeProperties::maPresetsMap;
 
+static OUString GetConnectorShapeType( sal_Int32 nType )
+{
+OSL_TRACE("GetConnectorShapeType preset: %d %d", nType, 
XML_straightConnector1);
+
+OUString sType;
+switch( nType )
+{
+case XML_straightConnector1: {
+static const OUString sStraightConnector1 = CREATE_OUSTRING( 
"mso-spt32" );
+sType = sStraightConnector1;
+} break;
+case XML_bentConnector2: {
+static const OUString sBentConnector2 = CREATE_OUSTRING( 
"mso-spt33" );
+sType = sBentConnector2;
+} break;
+case XML_bentConnector3: {
+static const OUString sBentConnector3 = CREATE_OUSTRING( 
"mso-spt34" );
+sType = sBentConnector3;
+} break;
+case XML_bentConnector4: {
+static const OUString sBentConnector4 = CREATE_OUSTRING( 
"mso-spt35" );
+sType = sBentConnector4;
+} break;
+case XML_bentConnector5: {
+static const OUString sBentConnector5 = CREATE_OUSTRING( 
"mso-spt36" );
+sType = sBentConnector5;
+} break;
+case XML_curvedConnector2: {
+static const OUString sCurvedConnector2 = CREATE_OUSTRING( 
"mso-spt37" );
+sType = sCurvedConnector2;
+} break;
+case XML_curvedConnector3: {
+static const OUString sCurvedConnector3 = CREATE_OUSTRING( 
"mso-spt38" );
+sType = sCurvedConnector3;
+} break;
+case XML_curvedConnector4: {
+static const OUString sCurvedConnector4 = CREATE_OUSTRING( 
"mso-spt39" );
+sType = sCurvedConnector4;
+} break;
+case XML_curvedConnector5: {
+static const OUString sCurvedConnector5 = CREATE_OUSTRING( 
"mso-spt40" );
+sType = sCurvedConnector5;
+} break;
+default:
+break;
+}
+return sType;
+}
+
+
 void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* 
rFilterBase */,
 const Reference < XPropertySet >& xPropSet, const Reference < XShape > & 
xShape )
 {
@@ -110,7 +160,18 @@ void CustomShapeProperties::pushToPropSet( const 
::oox::core::FilterBase& /* rFi
 PropertyMap aPropertyMap;
 PropertySet aPropSet( xPropSet );
 
-if (maPresetsMap.find(mnShapePresetType) != maPresetsMap.end()) {
+OUString sConnectorShapeType = GetConnecto

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

2011-12-07 Thread David Tardon
 vcl/inc/vcl/pdfwriter.hxx|5 +
 vcl/source/gdi/pdfwriter.cxx |  159 +--
 2 files changed, 83 insertions(+), 81 deletions(-)

New commits:
commit d36f276728abffee1a9d53c87d56526e16a4968d
Author: David Tardon 
Date:   Wed Dec 7 13:42:15 2011 +0100

avoid casting from void*

diff --git a/vcl/inc/vcl/pdfwriter.hxx b/vcl/inc/vcl/pdfwriter.hxx
index 58dd7e1..816518b 100644
--- a/vcl/inc/vcl/pdfwriter.hxx
+++ b/vcl/inc/vcl/pdfwriter.hxx
@@ -42,6 +42,8 @@
 #include "com/sun/star/io/XOutputStream.hpp"
 #include "com/sun/star/beans/XMaterialHolder.hpp"
 
+#include 
+
 #include 
 #include 
 #include 
@@ -65,6 +67,7 @@ namespace vcl
 {
 
 class PDFExtOutDevData;
+class PDFWriterImpl;
 
 struct PDFNote
 {
@@ -81,7 +84,7 @@ class VCL_DLLPUBLIC PDFOutputStream
 
 class VCL_DLLPUBLIC PDFWriter
 {
-void* pImplementation;
+boost::scoped_ptr pImplementation;
 public:
 // extended line info
 enum CapType { capButt, capRound, capSquare };
diff --git a/vcl/source/gdi/pdfwriter.cxx b/vcl/source/gdi/pdfwriter.cxx
index 68d1218..41b8b95 100644
--- a/vcl/source/gdi/pdfwriter.cxx
+++ b/vcl/source/gdi/pdfwriter.cxx
@@ -45,37 +45,36 @@ PDFWriter::PDFWriter( const PDFWriter::PDFWriterContext& 
rContext, const com::su
 
 PDFWriter::~PDFWriter()
 {
-delete (PDFWriterImpl*)pImplementation;
 }
 
 OutputDevice* PDFWriter::GetReferenceDevice()
 {
-return ((PDFWriterImpl*)pImplementation)->getReferenceDevice();
+return pImplementation->getReferenceDevice();
 }
 
 sal_Int32 PDFWriter::NewPage( sal_Int32 nPageWidth, sal_Int32 nPageHeight, 
Orientation eOrientation )
 {
-return ((PDFWriterImpl*)pImplementation)->newPage( nPageWidth, 
nPageHeight, eOrientation );
+return pImplementation->newPage( nPageWidth, nPageHeight, eOrientation );
 }
 
 bool PDFWriter::Emit()
 {
-return ((PDFWriterImpl*)pImplementation)->emit();
+return pImplementation->emit();
 }
 
 void PDFWriter::SetDocumentLocale( const com::sun::star::lang::Locale& rLoc )
 {
-((PDFWriterImpl*)pImplementation)->setDocumentLocale( rLoc );
+pImplementation->setDocumentLocale( rLoc );
 }
 
 void PDFWriter::SetFont( const Font& rFont )
 {
-((PDFWriterImpl*)pImplementation)->setFont( rFont );
+pImplementation->setFont( rFont );
 }
 
 void PDFWriter::DrawText( const Point& rPos, const String& rText )
 {
-((PDFWriterImpl*)pImplementation)->drawText( rPos, rText );
+pImplementation->drawText( rPos, rText );
 }
 
 void PDFWriter::DrawTextLine(
@@ -86,7 +85,7 @@ void PDFWriter::DrawTextLine(
  FontUnderline eOverline,
  sal_Bool bUnderlineAbove )
 {
-((PDFWriterImpl*)pImplementation)->drawTextLine( rPos, nWidth, eStrikeout, 
eUnderline, eOverline, bUnderlineAbove );
+pImplementation->drawTextLine( rPos, nWidth, eStrikeout, eUnderline, 
eOverline, bUnderlineAbove );
 }
 
 void PDFWriter::DrawTextArray(
@@ -96,7 +95,7 @@ void PDFWriter::DrawTextArray(
   xub_StrLen nIndex,
   xub_StrLen nLen )
 {
-((PDFWriterImpl*)pImplementation)->drawTextArray( rStartPt, rStr, pDXAry, 
nIndex, nLen );
+pImplementation->drawTextArray( rStartPt, rStr, pDXAry, nIndex, nLen );
 }
 
 void PDFWriter::DrawStretchText(
@@ -106,7 +105,7 @@ void PDFWriter::DrawStretchText(
 xub_StrLen nIndex,
 xub_StrLen nLen )
 {
-((PDFWriterImpl*)pImplementation)->drawStretchText( rStartPt, nWidth, 
rStr, nIndex, nLen );
+pImplementation->drawStretchText( rStartPt, nWidth, rStr, nIndex, nLen );
 }
 
 void PDFWriter::DrawText(
@@ -114,335 +113,335 @@ void PDFWriter::DrawText(
  const XubString& rStr,
  sal_uInt16 nStyle )
 {
-((PDFWriterImpl*)pImplementation)->drawText( rRect, rStr, nStyle );
+pImplementation->drawText( rRect, rStr, nStyle );
 }
 
 void PDFWriter::DrawLine( const Point& rStart, const Point& rStop )
 {
-((PDFWriterImpl*)pImplementation)->drawLine( rStart, rStop );
+pImplementation->drawLine( rStart, rStop );
 }
 
 void PDFWriter::DrawLine( const Point& rStart, const Point& rStop, const 
LineInfo& rInfo )
 {
-((PDFWriterImpl*)pImplementation)->drawLine( rStart, rStop, rInfo );
+pImplementation->drawLine( rStart, rStop, rInfo );
 }
 
 void PDFWriter::DrawPolygon( const Polygon& rPoly )
 {
-((PDFWriterImpl*)pImplementation)->drawPolygon( rPoly );
+pImplementation->drawPolygon( rPoly );
 }
 
 void PDFWriter::DrawPolyLine( const Polygon& rPoly )
 {
-((PDFWriterImpl*)pImplementation)->drawPolyLine( rPoly );
+pImplementation->drawPolyLine( rPoly );
 }
 
 void PDFWriter::DrawRect( const Rectangle& rRect )
 {
-((PDFWriterImpl*)pImplementation)->drawRectangle( rRect );
+pImplementation->drawRectangle( rRect );
 }
 
 void PDFWriter::DrawRect( const Rectangle& rRect, sal_uLong nHorzRound, 
sal_uLong nVertRound )
 {
-((PDFW

[Libreoffice-commits] .: 4 commits - accessibility/inc accessibility/source l10ntools/inc l10ntools/source sal/osl unusedcode.easy

2011-12-07 Thread Caolán McNamara
 accessibility/inc/accessibility/helper/acc_factory.hxx |   53 -
 accessibility/source/helper/acc_factory.cxx|   39 +-
 l10ntools/inc/export.hxx   |   12 +-
 l10ntools/inc/helpmerge.hxx|3 
 l10ntools/inc/lngmerge.hxx |   21 ++-
 l10ntools/source/cfgmerge.cxx  |9 +
 l10ntools/source/export.cxx|   95 +
 l10ntools/source/export2.cxx   |   42 +--
 l10ntools/source/helpmerge.cxx |9 -
 l10ntools/source/lngex.cxx |5 
 l10ntools/source/lngmerge.cxx  |   51 +++--
 l10ntools/source/merge.cxx |2 
 l10ntools/source/xrmmerge.cxx  |6 -
 sal/osl/unx/system.c   |4 
 unusedcode.easy|7 +
 15 files changed, 180 insertions(+), 178 deletions(-)

New commits:
commit 42502c8484cd0aef4732cc33fdc4b9a5a333a1f8
Author: Caolán McNamara 
Date:   Wed Dec 7 11:36:01 2011 +

|| -> &&

diff --git a/sal/osl/unx/system.c b/sal/osl/unx/system.c
index d1fc724..bf8607d 100644
--- a/sal/osl/unx/system.c
+++ b/sal/osl/unx/system.c
@@ -201,11 +201,11 @@ int macxp_resolveAlias(char *path, int buflen)
 
 #endif /* NO_PTHREAD_RTL */
 
-#if defined(LINUX) && defined (__GLIBC__) && __GLIBC__ == 2 || __GLIBC_MINOR__ 
< 4
+#if defined(LINUX) && defined (__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ 
< 4
 /* The linux kernel 2.4 getpid implemention always return the pid of the
thread subprocess and not of the main process, the NPTL implementation
with a Linux kernel 2.6 kernel return the pid. So when possibly
-   their is the wrong implementation of getpid, we save the pid at startup.
+   there is the wrong implementation of getpid, we save the pid at startup.
FIXME: when our Linux base-line is above:
 + Linux kernel version 2.6 or higher; -> clone() for NTPL
 + glibc2 version 2.4 or higher; -> No longer LinuxThreads, only NPTL
commit 6c335f5754ec1aee70cdba2d332e9cece17a7565
Author: Caolán McNamara 
Date:   Wed Dec 7 10:49:55 2011 +

convert some archaic l10ntools code

diff --git a/l10ntools/inc/export.hxx b/l10ntools/inc/export.hxx
index ae6c21e..a4d2f80 100644
--- a/l10ntools/inc/export.hxx
+++ b/l10ntools/inc/export.hxx
@@ -148,7 +148,7 @@ class ResData
 {
 public:
 ~ResData();
-sal_Bool SetId( const ByteString &rId, sal_uInt16 nLevel );
+sal_Bool SetId(const rtl::OString &rId, sal_uInt16 nLevel);
 
 sal_uInt16 nWidth;
 sal_uInt16 nChildIndex;
@@ -318,8 +318,8 @@ private:
 
 public:
 ParserQueue* pParseQueue; // public ?
-static ByteString sLanguages; // public ?
-static ByteString sForcedLanguages; // public ?
+static rtl::OString sLanguages; // public ?
+static rtl::OString sForcedLanguages; // public ?
 
 
 static bool skipProject( ByteString sPrj ) ;
@@ -352,8 +352,10 @@ public:
 static ByteString GetNativeFile( ByteString sSource );
 static DirEntry GetTempFile();
 
-static void DumpExportList( ByteString& sListName , ExportList& aList );
-static ByteString DumpMap( ByteString& sMapName , ByteStringHashMap& aMap 
);
+static void DumpExportList(const rtl::OString& rListName,
+ExportList& aList);
+static ByteString DumpMap(const rtl::OString& rMapName,
+ByteStringHashMap& aMap);
 
 private:
 static std::vector aLanguages;
diff --git a/l10ntools/inc/helpmerge.hxx b/l10ntools/inc/helpmerge.hxx
index a160b15..aeb61ae 100644
--- a/l10ntools/inc/helpmerge.hxx
+++ b/l10ntools/inc/helpmerge.hxx
@@ -64,7 +64,8 @@ public:
 
 /// Method merges the String from the SDFfile into XMLfile. Both Strings must
 /// point to existing files.
-bool Merge( const ByteString &rSDFFile_in, const ByteString 
&rDestinationFile_in , ByteString& sLanguage , MergeDataFile& aMergeDataFile );
+bool Merge( const ByteString &rSDFFile_in, const ByteString 
&rDestinationFile_in ,
+const rtl::OString& sLanguage , MergeDataFile& aMergeDataFile );
 bool Merge( const ByteString &rSDFFile, const ByteString &rPathX , const 
ByteString &rPathY , bool bISO
 , const std::vector& aLanguages , MergeDataFile& 
aMergeDataFile , bool bCreateDir );
 
diff --git a/l10ntools/inc/lngmerge.hxx b/l10ntools/inc/lngmerge.hxx
index e658817..285f129 100644
--- a/l10ntools/inc/lngmerge.hxx
+++ b/l10ntools/inc/lngmerge.hxx
@@ -47,23 +47,28 @@ class LngParser
 private:
 sal_uInt16 nError;
 LngLineList *pLines;
-ByteString sSource;
+rtl::OString sSource;
 sal_Bool bDBIsUTF8;
 sal_Bool bULF;
 bool bQuiet;
 std::vector aLanguages;
 
 bool isNextGroup(  ByteString &sGroup_out , ByteString &sLine_in);
-void ReadLine( const ByteString &sLine_in , ByteStringHashMap &rText_inout 
);
- 

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

2011-12-07 Thread Michael Meeks
 sdext/source/presenter/bitmaps/ButtonSwitchMonitorDisabled.png  |binary
 sdext/source/presenter/bitmaps/ButtonSwitchMonitorMouseOver.png |binary
 sdext/source/presenter/bitmaps/ButtonSwitchMonitorNormal.png|binary
 3 files changed

New commits:
commit 7f72f1bb144262be7215f53a985cd1d6ed6ec8a9
Author: Stefan Knorr (astron) 
Date:   Wed Dec 7 11:19:12 2011 +

much improved presenter console monitor switch artwork

diff --git a/sdext/source/presenter/bitmaps/ButtonSwitchMonitorDisabled.png 
b/sdext/source/presenter/bitmaps/ButtonSwitchMonitorDisabled.png
index 653dffe..65073e4 100644
Binary files a/sdext/source/presenter/bitmaps/ButtonSwitchMonitorDisabled.png 
and b/sdext/source/presenter/bitmaps/ButtonSwitchMonitorDisabled.png differ
diff --git a/sdext/source/presenter/bitmaps/ButtonSwitchMonitorMouseOver.png 
b/sdext/source/presenter/bitmaps/ButtonSwitchMonitorMouseOver.png
index f567516..bc1055a 100644
Binary files a/sdext/source/presenter/bitmaps/ButtonSwitchMonitorMouseOver.png 
and b/sdext/source/presenter/bitmaps/ButtonSwitchMonitorMouseOver.png differ
diff --git a/sdext/source/presenter/bitmaps/ButtonSwitchMonitorNormal.png 
b/sdext/source/presenter/bitmaps/ButtonSwitchMonitorNormal.png
index 3ca0f6f..8cfe81d 100644
Binary files a/sdext/source/presenter/bitmaps/ButtonSwitchMonitorNormal.png and 
b/sdext/source/presenter/bitmaps/ButtonSwitchMonitorNormal.png differ
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sdext/source

2011-12-07 Thread Michael Meeks
 sdext/source/presenter/bitmaps/ButtonSwitchMonitorDisabled.png  |binary
 sdext/source/presenter/bitmaps/ButtonSwitchMonitorMouseOver.png |binary
 sdext/source/presenter/bitmaps/ButtonSwitchMonitorNormal.png|binary
 3 files changed

New commits:
commit 1671c16d6081db4516b62838ab365c1f41951b12
Author: Stefan Knorr (astron) 
Date:   Wed Dec 7 11:19:12 2011 +

much improved presenter console monitor switch artwork

diff --git a/sdext/source/presenter/bitmaps/ButtonSwitchMonitorDisabled.png 
b/sdext/source/presenter/bitmaps/ButtonSwitchMonitorDisabled.png
index 653dffe..65073e4 100644
Binary files a/sdext/source/presenter/bitmaps/ButtonSwitchMonitorDisabled.png 
and b/sdext/source/presenter/bitmaps/ButtonSwitchMonitorDisabled.png differ
diff --git a/sdext/source/presenter/bitmaps/ButtonSwitchMonitorMouseOver.png 
b/sdext/source/presenter/bitmaps/ButtonSwitchMonitorMouseOver.png
index f567516..bc1055a 100644
Binary files a/sdext/source/presenter/bitmaps/ButtonSwitchMonitorMouseOver.png 
and b/sdext/source/presenter/bitmaps/ButtonSwitchMonitorMouseOver.png differ
diff --git a/sdext/source/presenter/bitmaps/ButtonSwitchMonitorNormal.png 
b/sdext/source/presenter/bitmaps/ButtonSwitchMonitorNormal.png
index 3ca0f6f..8cfe81d 100644
Binary files a/sdext/source/presenter/bitmaps/ButtonSwitchMonitorNormal.png and 
b/sdext/source/presenter/bitmaps/ButtonSwitchMonitorNormal.png differ
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2011-12-07 Thread Thorsten Behrens
 slideshow/source/engine/slideshowimpl.cxx |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 3881092eba0b42f16a48a54690232aedf411fd8d
Author: Caolán McNamara 
Date:   Tue Dec 6 16:26:05 2011 +

Resolves: rhbz#759647 ::dispose clears mpPresTimer before releaseTimer 
called

diff --git a/slideshow/source/engine/slideshowimpl.cxx 
b/slideshow/source/engine/slideshowimpl.cxx
index 5be3b62..4277280 100644
--- a/slideshow/source/engine/slideshowimpl.cxx
+++ b/slideshow/source/engine/slideshowimpl.cxx
@@ -2025,10 +2025,14 @@ sal_Bool SlideShowImpl::update( double & nNextTimeout )
 //that have zero delay.  While the timer is stopped these events
 //are processed in the same run.
 {
+//Get a shared-ptr that outlives the scope-guard which will
+//ensure that the pointed-to-item exists in the case of a
+//::dispose clearing mpPresTimer
+boost::shared_ptr xTimer(mpPresTimer);
 comphelper::ScopeGuard scopeGuard(
 boost::bind( &canvas::tools::ElapsedTime::releaseTimer,
- boost::cref(mpPresTimer) ) );
-mpPresTimer->holdTimer();
+ boost::cref(xTimer) ) );
+xTimer->holdTimer();
 
 // process queues
 maEventQueue.process();
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: dbaccess/source embeddedobj/source framework/source svx/source sw/source vcl/inc vcl/source vcl/win

2011-12-07 Thread Tor Lillqvist
 dbaccess/source/ui/inc/dbu_resource.hrc|2 +-
 embeddedobj/source/general/docholder.cxx   |4 ++--
 framework/source/uielement/langselectionmenucontroller.cxx |2 +-
 svx/source/mnuctrls/SmartTagCtl.cxx|2 +-
 sw/source/ui/smartmenu/stmenu.cxx  |2 +-
 vcl/inc/svdata.hxx |2 +-
 vcl/inc/vcl/menu.hxx   |4 ++--
 vcl/source/window/decoview.cxx |2 +-
 vcl/source/window/floatwin.cxx |2 +-
 vcl/source/window/menu.cxx |4 ++--
 vcl/source/window/window.cxx   |8 
 vcl/source/window/winproc.cxx  |2 +-
 vcl/win/source/window/salframe.cxx |8 
 vcl/win/source/window/salmenu.cxx  |8 
 14 files changed, 26 insertions(+), 26 deletions(-)

New commits:
commit 181b1815f807635ecdd8e5f8bbd2c5798f8d7703
Author: Michael T. Whiteley 
Date:   Tue Dec 6 23:04:19 2011 -0800

Change "menues" to "menus"

diff --git a/dbaccess/source/ui/inc/dbu_resource.hrc 
b/dbaccess/source/ui/inc/dbu_resource.hrc
index 7ba85bc..e2cb7fc 100644
--- a/dbaccess/source/ui/inc/dbu_resource.hrc
+++ b/dbaccess/source/ui/inc/dbu_resource.hrc
@@ -286,7 +286,7 @@
 // free
 
 //
-// menues
+// menus
 
 #define MENU_TABLETREE_POPUPRID_MENU_START +  0
 #define MENU_DATASOURCELIST_POPUP   RID_MENU_START +  1
diff --git a/embeddedobj/source/general/docholder.cxx 
b/embeddedobj/source/general/docholder.cxx
index 5e24643..036c2d6 100644
--- a/embeddedobj/source/general/docholder.cxx
+++ b/embeddedobj/source/general/docholder.cxx
@@ -747,11 +747,11 @@ sal_Bool DocumentHolder::ShowUI( const uno::Reference< 
::com::sun::star::frame::
 // as long as the LM is invisible and locked an empty tool 
space will be used on resizing
 xOwnLM->setDockingAreaAcceptor( xDocAreaAcc );
 
-// try to merge menues; don't do anything else if it fails
+// try to merge menus; don't do anything else if it fails
 if ( MergeMenues_Impl( xOwnLM, xContainerLM, xContainerDP, 
aContModuleName ) )
 {
 // make sure that the container LM does not control the 
size of the containers window anymore
-// this must be done after merging menues as we won't get 
the container menu otherwise
+// this must be done after merging menus as we won't get 
the container menu otherwise
 xContainerLM->setDockingAreaAcceptor( uno::Reference < 
ui::XDockingAreaAcceptor >() );
 
 // prevent further changes at this LM
diff --git a/framework/source/uielement/langselectionmenucontroller.cxx 
b/framework/source/uielement/langselectionmenucontroller.cxx
index 4b04b5c..b5f1566 100644
--- a/framework/source/uielement/langselectionmenucontroller.cxx
+++ b/framework/source/uielement/langselectionmenucontroller.cxx
@@ -260,7 +260,7 @@ void LanguageSelectionMenuController::fillPopupMenu( 
Reference< css::awt::XPopup
 m_nScriptType, m_aCurLang, m_aKeyboardLang, m_aGuessedTextLang );
 
 // now add menu entries
-// the different menues purpose will be handled by the different string
+// the different menus purpose will be handled by the different string
 // for aCmd_Dialog and aCmd_Language
 
 sal_Int16 nItemId = 1;  // in this control the item id is not important 
for executing the command
diff --git a/svx/source/mnuctrls/SmartTagCtl.cxx 
b/svx/source/mnuctrls/SmartTagCtl.cxx
index 8d83ae3..ffe8ad3 100644
--- a/svx/source/mnuctrls/SmartTagCtl.cxx
+++ b/svx/source/mnuctrls/SmartTagCtl.cxx
@@ -103,7 +103,7 @@ void SvxSmartTagsControl::FillMenu()
 const rtl::OUString aSmartTagType = xAction->getSmartTagName( 
nSmartTagIndex );
 const rtl::OUString aSmartTagCaption = xAction->getSmartTagCaption( 
nSmartTagIndex, rLocale );
 
-// no sub-menues if there's only one smart tag type listed:
+// no sub-menus if there's only one smart tag type listed:
 PopupMenu* pSbMenu = mpMenu;
 if ( 1 < rActionComponentsSequence.getLength() )
 {
diff --git a/sw/source/ui/smartmenu/stmenu.cxx 
b/sw/source/ui/smartmenu/stmenu.cxx
index 144dcae..201ec88 100644
--- a/sw/source/ui/smartmenu/stmenu.cxx
+++ b/sw/source/ui/smartmenu/stmenu.cxx
@@ -95,7 +95,7 @@ SwSmartTagPopup::SwSmartTagPopup( SwView* pSwView,
 const rtl::OUString aSmartTagType = xAction->getSmartTagName( 
nSmartTagIndex );
 const rtl::OUString aSmartTagCaption = xAction->getSmartTagCaption( 
nSmartTagIndex, aLocale );
 
-// no sub-menues if there's only one smart tag type listed:
+   

[Libreoffice-commits] .: sal/osl

2011-12-07 Thread Tor Lillqvist
 sal/osl/unx/system.c |   14 --
 1 file changed, 8 insertions(+), 6 deletions(-)

New commits:
commit 8538a096603341d78e7c104dacf3048ad7fb953b
Author: Arnaud Versini 
Date:   Tue Dec 6 19:49:34 2011 +0100

Don't replace getpid on Linux when the system version is correct

diff --git a/sal/osl/unx/system.c b/sal/osl/unx/system.c
index 478fdaf..d1fc724 100644
--- a/sal/osl/unx/system.c
+++ b/sal/osl/unx/system.c
@@ -201,14 +201,16 @@ int macxp_resolveAlias(char *path, int buflen)
 
 #endif /* NO_PTHREAD_RTL */
 
-#if defined(LINUX)
-/* The linux kernel thread implemention, always return the pid of the
-   thread subprocess and not of the main process. So we save the main
-   pid at startup
+#if defined(LINUX) && defined (__GLIBC__) && __GLIBC__ == 2 || __GLIBC_MINOR__ 
< 4
+/* The linux kernel 2.4 getpid implemention always return the pid of the
+   thread subprocess and not of the main process, the NPTL implementation
+   with a Linux kernel 2.6 kernel return the pid. So when possibly
+   their is the wrong implementation of getpid, we save the pid at startup.
FIXME: when our Linux base-line is above:
-+ Linux kernel version 2.6.18 or higher; -> clone() for NTPL
-+ glibc2 version 2.5 or higher; -> NPTL
++ Linux kernel version 2.6 or higher; -> clone() for NTPL
++ glibc2 version 2.4 or higher; -> No longer LinuxThreads, only NPTL
Then we get a working getpid() and can remove this hack.
+   FIXME: getppid is also wrong in this situation
 */
 
 // Directly from libc.so.6, obviously missing from some unistd.h:
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits