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

2015-06-03 Thread Noel Grandin
 sw/inc/crstate.hxx|   15 +--
 sw/source/core/layout/trvlfrm.cxx |   22 +++---
 sw/source/core/text/itrcrsr.cxx   |   10 +-
 3 files changed, 25 insertions(+), 22 deletions(-)

New commits:
commit 79800559268c636740fec69018b1f99f047c3f93
Author: Noel Grandin 
Date:   Sun May 17 20:46:09 2015 +0200

convert MT_ constants to scoped enum

Change-Id: I21e253ed9dccdab84be4838b5beee9385467ed37
Reviewed-on: https://gerrit.libreoffice.org/16068
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/sw/inc/crstate.hxx b/sw/inc/crstate.hxx
index 678ccd4..119817b 100644
--- a/sw/inc/crstate.hxx
+++ b/sw/inc/crstate.hxx
@@ -49,18 +49,21 @@ struct SwFillCrsrPos
 
 // Multiportion types: two lines, bidirectional, 270 degrees rotation,
 // ruby portion and 90 degrees rotation
-#define MT_TWOLINE  0
-#define MT_BIDI 1
-#define MT_ROT_270  3
-#define MT_RUBY 4
-#define MT_ROT_90   7
+enum class MultiPortionType : sal_uInt8
+{
+TWOLINE  = 0,
+BIDI = 1,
+ROT_270  = 3,
+RUBY = 4,
+ROT_90   = 7,
+};
 
 struct Sw2LinesPos
 {
 SwRect aLine;   ///< Position and size of the line
 SwRect aPortion;///< Position and size of the multi portion
 SwRect aPortion2;   ///< needed for nested multi portions
-sal_uInt8 nMultiType;///< Multiportion type
+MultiPortionType nMultiType;  ///< Multiportion type
 };
 
 /**
diff --git a/sw/source/core/layout/trvlfrm.cxx 
b/sw/source/core/layout/trvlfrm.cxx
index 999afd1..c60cb74 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -2145,11 +2145,11 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr)
 SwRect aTmp( aStRect );
 
 // BiDi-Portions are swimming against the current.
-const bool bPorR2L = ( MT_BIDI == pSt2Pos->nMultiType ) ?
+const bool bPorR2L = ( MultiPortionType::BIDI == 
pSt2Pos->nMultiType ) ?
 ! bR2L :
 bR2L;
 
-if( MT_BIDI == pSt2Pos->nMultiType &&
+if( MultiPortionType::BIDI == pSt2Pos->nMultiType &&
 (pSt2Pos->aPortion2.*fnRect->fnGetWidth)() )
 {
 // nested bidi portion
@@ -2177,7 +2177,7 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr)
 (pSt2Pos->aPortion.*fnRect->fnGetRight)() );
 }
 
-if( MT_ROT_90 == pSt2Pos->nMultiType ||
+if( MultiPortionType::ROT_90 == pSt2Pos->nMultiType ||
 (pSt2Pos->aPortion.*fnRect->fnGetTop)() ==
 (aTmp.*fnRect->fnGetTop)() )
 {
@@ -2189,7 +2189,7 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr)
 Sub( aRegion, aTmp );
 
 SwTwips nTmp = (pSt2Pos->aLine.*fnRect->fnGetBottom)();
-if( MT_ROT_90 != pSt2Pos->nMultiType &&
+if( MultiPortionType::ROT_90 != pSt2Pos->nMultiType &&
 (aStRect.*fnRect->fnBottomDist)( nTmp ) > 0 )
 {
 (aTmp.*fnRect->fnSetTop)( (aTmp.*fnRect->fnGetBottom)() );
@@ -2221,11 +2221,11 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr)
 SwRect aTmp( aEndRect );
 
 // BiDi-Portions are swimming against the current.
-const bool bPorR2L = ( MT_BIDI == pEnd2Pos->nMultiType ) ?
+const bool bPorR2L = ( MultiPortionType::BIDI == 
pEnd2Pos->nMultiType ) ?
! bEndR2L :
  bEndR2L;
 
-if( MT_BIDI == pEnd2Pos->nMultiType &&
+if( MultiPortionType::BIDI == pEnd2Pos->nMultiType &&
 (pEnd2Pos->aPortion2.*fnRectX->fnGetWidth)() )
 {
 // nested bidi portion
@@ -2253,7 +2253,7 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr)
 (pEnd2Pos->aPortion.*fnRectX->fnGetLeft)() );
 }
 
-if( MT_ROT_90 == pEnd2Pos->nMultiType ||
+if( MultiPortionType::ROT_90 == pEnd2Pos->nMultiType ||
 (pEnd2Pos->aPortion.*fnRectX->fnGetBottom)() ==
 (aEndRect.*fnRectX->fnGetBottom)() )
 {
@@ -2265,7 +2265,7 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr)
 Sub( aRegion, aTmp );
 
 // The next statement means neither ruby nor rotate(90):
-if( !( MT_RUBY & pEnd2Pos->nMultiType ) )
+if( !( MultiPortionType::RUBY == pEnd2Pos->nMultiType ) )
 {
 SwTwips nTmp = (pEnd2Pos->aLine.*fnRectX->fnGetTop)();
 if( (aEndRect.*fnRectX->fnGetTop)() != nTmp )
@@ -2296,8 +2296,8 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr)
 }
 }
 else if( pSt2Pos && pEnd2Pos &&
- MT_BIDI == pSt2Pos->nMultiType &&
- MT_BIDI == pEnd2Pos->nMultiType &&
+ MultiPortionType::BIDI == pSt2Pos->nMultiTyp

[Libreoffice-commits] core.git: basctl/source basegfx/source chart2/source comphelper/source dbaccess/source extensions/source framework/source include/comphelper svx/source toolkit/source xmloff/sour

2015-06-03 Thread Noel Grandin
 basctl/source/basicide/scriptdocument.cxx|2 +-
 basegfx/source/tools/keystoplerp.cxx |4 +---
 chart2/source/controller/dialogs/DialogModel.cxx |2 +-
 chart2/source/inc/ContainerHelper.hxx|5 ++---
 chart2/source/model/template/ChartTypeTemplate.cxx   |4 ++--
 chart2/source/model/template/ColumnLineChartTypeTemplate.cxx |8 
 chart2/source/model/template/ColumnLineDataInterpreter.cxx   |4 ++--
 chart2/source/tools/DataSeriesHelper.cxx |2 +-
 chart2/source/tools/DataSourceHelper.cxx |4 ++--
 chart2/source/tools/DiagramHelper.cxx|7 +++
 comphelper/source/container/embeddedobjectcontainer.cxx  |2 +-
 dbaccess/source/core/dataaccess/connection.cxx   |2 +-
 extensions/source/propctrlr/eformshelper.cxx |6 ++
 extensions/source/propctrlr/eventhandler.cxx |4 ++--
 extensions/source/propctrlr/formcomponenthandler.cxx |3 +--
 extensions/source/propctrlr/propertycomposer.cxx |4 ++--
 extensions/source/propctrlr/xsdvalidationhelper.cxx  |2 +-
 framework/source/services/autorecovery.cxx   |2 +-
 framework/source/uiconfiguration/imagemanagerimpl.cxx|3 +--
 include/comphelper/sequence.hxx  |6 +++---
 svx/source/form/formcontroller.cxx   |2 +-
 toolkit/source/helper/formpdfexport.cxx  |4 ++--
 xmloff/source/chart/SchXMLExport.cxx |6 +++---
 xmloff/source/chart/SchXMLSeriesHelper.cxx   |2 +-
 xmloff/source/chart/SchXMLTableContext.cxx   |3 +--
 25 files changed, 42 insertions(+), 51 deletions(-)

New commits:
commit 81610561edfb8c899a062cc09fc1a80e8098577f
Author: Noel Grandin 
Date:   Wed Jun 3 15:16:19 2015 +0200

uno::Sequence provides now begin and end

use begin() and end() when calling std::copy on an uno::Sequence

Inspired by commit b34b648fc3262c5d9aa295f621e8fe9c97d4c6b2
"uno::Sequence provides now begin and end"

Change-Id: I08e8c3fd6144e77b95a26f85bc0daf6a9edeeb0b
Reviewed-on: https://gerrit.libreoffice.org/16057
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/basctl/source/basicide/scriptdocument.cxx 
b/basctl/source/basicide/scriptdocument.cxx
index b318aa9..7fdb066 100644
--- a/basctl/source/basicide/scriptdocument.cxx
+++ b/basctl/source/basicide/scriptdocument.cxx
@@ -1277,7 +1277,7 @@ namespace basctl
 
 Sequence< OUString > aUsedNames( getObjectNames( _eType, _rLibName ) );
 ::std::set< OUString > aUsedNamesCheck;
-::std::copy( aUsedNames.getConstArray(), aUsedNames.getConstArray() + 
aUsedNames.getLength(),
+::std::copy( aUsedNames.begin(), aUsedNames.end(),
 ::std::insert_iterator< ::std::set< OUString > >( aUsedNamesCheck, 
aUsedNamesCheck.begin() ) );
 
 bool bValid = false;
diff --git a/basegfx/source/tools/keystoplerp.cxx 
b/basegfx/source/tools/keystoplerp.cxx
index 14a0312..9dfd625 100644
--- a/basegfx/source/tools/keystoplerp.cxx
+++ b/basegfx/source/tools/keystoplerp.cxx
@@ -54,9 +54,7 @@ namespace basegfx
 maKeyStops(rKeyStops.getLength()),
 mnLastIndex(0)
 {
-std::copy( rKeyStops.getConstArray(),
-   rKeyStops.getConstArray()+rKeyStops.getLength(),
-   maKeyStops.begin() );
+std::copy( rKeyStops.begin(), rKeyStops.end(), maKeyStops.begin() 
);
 validateInput(maKeyStops);
 }
 
diff --git a/chart2/source/controller/dialogs/DialogModel.cxx 
b/chart2/source/controller/dialogs/DialogModel.cxx
index f8ea3f7..6127ee9 100644
--- a/chart2/source/controller/dialogs/DialogModel.cxx
+++ b/chart2/source/controller/dialogs/DialogModel.cxx
@@ -522,7 +522,7 @@ DialogModel::tRolesWithRanges 
DialogModel::getRolesWithRanges(
 {
 Reference< data::XDataSource > xSource( xSeries, uno::UNO_QUERY_THROW 
);
 const Sequence< Reference< data::XLabeledDataSequence > > aSeq( 
xSource->getDataSequences());
-::std::copy( aSeq.getConstArray(), aSeq.getConstArray() + 
aSeq.getLength(),
+::std::copy( aSeq.begin(), aSeq.end(),
  lcl_RolesWithRangeAppend( &aResult, 
aRoleOfSequenceForLabel ));
 if( xChartType.is())
 {
diff --git a/chart2/source/inc/ContainerHelper.hxx 
b/chart2/source/inc/ContainerHelper.hxx
index 139ddd6..d6eee1a 100644
--- a/chart2/source/inc/ContainerHelper.hxx
+++ b/chart2/source/inc/ContainerHelper.hxx
@@ -69,8 +69,7 @@ template< class Container >
 SequenceToSTLSequenceContainer( const ::com::sun::star::uno::Sequence< 
typename Container::value_type > & rSeq )
 {
 Container aResult( rSeq.getLength());
-::std::cop

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

2015-06-03 Thread Noel Grandin
 sw/inc/dbmgr.hxx|9 +
 sw/source/ui/dbui/addresslistdialog.cxx |2 +-
 sw/source/uibase/dbui/dbmgr.cxx |8 
 sw/source/uibase/dbui/mmconfigitem.cxx  |2 +-
 sw/source/uibase/shells/textsh2.cxx |2 +-
 5 files changed, 12 insertions(+), 11 deletions(-)

New commits:
commit a9a2375a744368415a7ea4c563c8e4776a6ec059
Author: Noel Grandin 
Date:   Tue May 19 20:49:17 2015 +0200

convert SW_DB_SELECT constants to scoped enum

Change-Id: I03387e8e90891b3477c9c15200acc127262170bc
Reviewed-on: https://gerrit.libreoffice.org/16070
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx
index 657e957..007755d 100644
--- a/sw/inc/dbmgr.hxx
+++ b/sw/inc/dbmgr.hxx
@@ -89,9 +89,10 @@ enum DBManagerOptions
 };
 
 // Administration of (new) logical databases.
-#define SW_DB_SELECT_UNKNOWN0
-#define SW_DB_SELECT_TABLE  1
-#define SW_DB_SELECT_QUERY  2
+enum class SwDBSelect
+{
+UNKNOWN, TABLE, QUERY
+};
 
 struct SwDSParam : public SwDBData
 {
@@ -339,7 +340,7 @@ public:
 static ::com::sun::star::uno::Reference< 
::com::sun::star::sdbcx::XColumnsSupplier>
 GetColumnSupplier(::com::sun::star::uno::Reference< 
::com::sun::star::sdbc::XConnection>,
 const OUString& rTableOrQuery,
-sal_uInt8   eTableOrQuery = 
SW_DB_SELECT_UNKNOWN);
+SwDBSelect eTableOrQuery = 
SwDBSelect::UNKNOWN);
 
 static ::com::sun::star::uno::Sequence 
GetExistingDatabaseNames();
 
diff --git a/sw/source/ui/dbui/addresslistdialog.cxx 
b/sw/source/ui/dbui/addresslistdialog.cxx
index cda553a..4bf8261 100644
--- a/sw/source/ui/dbui/addresslistdialog.cxx
+++ b/sw/source/ui/dbui/addresslistdialog.cxx
@@ -616,7 +616,7 @@ void SwAddressListDialog::DetectTablesAndQueries(
 pUserData->xColumnsSupplier = 
SwDBManager::GetColumnSupplier(pUserData->xConnection,
 m_aDBData.sCommand,
 m_aDBData.nCommandType == 
CommandType::TABLE ?
-SW_DB_SELECT_TABLE : 
SW_DB_SELECT_QUERY );
+SwDBSelect::TABLE : 
SwDBSelect::QUERY );
 //#i97577#
 if( pUserData->xColumnsSupplier.is() )
 m_pListLB->SetEntryText(m_aDBData.sCommand, pSelect, 
ITEMID_TABLE - 1);
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index d59d78b..be81dce 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -1755,12 +1755,12 @@ uno::Reference< sdbc::XConnection> 
SwDBManager::GetConnection(const OUString& rD
 
 uno::Reference< sdbcx::XColumnsSupplier> 
SwDBManager::GetColumnSupplier(uno::Reference xConnection,
 const OUString& rTableOrQuery,
-sal_uInt8   eTableOrQuery)
+SwDBSelect   eTableOrQuery)
 {
 Reference< sdbcx::XColumnsSupplier> xRet;
 try
 {
-if(eTableOrQuery == SW_DB_SELECT_UNKNOWN)
+if(eTableOrQuery == SwDBSelect::UNKNOWN)
 {
 //search for a table with the given command name
 Reference xTSupplier = 
Reference(xConnection, UNO_QUERY);
@@ -1768,10 +1768,10 @@ uno::Reference< sdbcx::XColumnsSupplier> 
SwDBManager::GetColumnSupplier(uno::Ref
 {
 Reference xTables = xTSupplier->getTables();
 eTableOrQuery = xTables->hasByName(rTableOrQuery) ?
-SW_DB_SELECT_TABLE : SW_DB_SELECT_QUERY;
+SwDBSelect::TABLE : SwDBSelect::QUERY;
 }
 }
-sal_Int32 nCommandType = SW_DB_SELECT_TABLE == eTableOrQuery ?
+sal_Int32 nCommandType = SwDBSelect::TABLE == eTableOrQuery ?
 CommandType::TABLE : CommandType::QUERY;
 Reference< XMultiServiceFactory > xMgr( 
::comphelper::getProcessServiceFactory() );
 Reference 
xRowSet(xMgr->createInstance("com.sun.star.sdb.RowSet"), UNO_QUERY);
diff --git a/sw/source/uibase/dbui/mmconfigitem.cxx 
b/sw/source/uibase/dbui/mmconfigitem.cxx
index 8523fac..468a54c 100644
--- a/sw/source/uibase/dbui/mmconfigitem.cxx
+++ b/sw/source/uibase/dbui/mmconfigitem.cxx
@@ -858,7 +858,7 @@ Reference< XColumnsSupplier> 
SwMailMergeConfigItem::GetColumnsSupplier()
 m_pImpl->xColumnsSupplier = 
SwDBManager::GetColumnSupplier(m_pImpl->xConnection,
 m_pImpl->aDBData.sCommand,
 m_pImpl->aDBData.nCommandType == 
CommandType::TABLE ?
-SW_DB_SELECT_TABLE : 
SW_DB_SELECT_QUERY );
+SwDBSelect::TABLE : SwDBSelect::QUERY 
);
 }
 return m_pImpl->xColumnsSupplier;
 }
diff --git a/sw/source/uibase

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

2015-06-03 Thread Noel Grandin
 sw/inc/crstate.hxx|   11 ++-
 sw/source/core/access/accportions.cxx |   11 ---
 sw/source/core/crsr/crsrsh.cxx|2 +-
 sw/source/core/text/itrcrsr.cxx   |   12 ++--
 4 files changed, 17 insertions(+), 19 deletions(-)

New commits:
commit 68577e5a902db11b5ec000e878cf212007452c72
Author: Noel Grandin 
Date:   Sun May 17 21:06:36 2015 +0200

convert SP_EXTEND_RANGE constants to scoped enum

Change-Id: I4d6ed976f4df63c7c51dd110b45787f2396518e4
Reviewed-on: https://gerrit.libreoffice.org/16069
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/sw/inc/crstate.hxx b/sw/inc/crstate.hxx
index fdba241..678ccd4 100644
--- a/sw/inc/crstate.hxx
+++ b/sw/inc/crstate.hxx
@@ -94,19 +94,20 @@ struct Sw2LinesPos
  *  Call SwTextFrm:::GetCharRect with core string position 33.
  */
 
-#define SP_EXTEND_RANGE_NONE0
-#define SP_EXTEND_RANGE_BEFORE  1
-#define SP_EXTEND_RANGE_BEHIND  2
+enum class SwSPExtendRange : sal_uInt8
+{
+NONE, BEFORE, BEHIND
+};
 
 struct SwSpecialPos
 {
 sal_Int32 nCharOfst;
 sal_uInt16 nLineOfst;
-sal_uInt8 nExtendRange;
+SwSPExtendRange nExtendRange;
 
 // #i27615#
 SwSpecialPos() : nCharOfst(0), nLineOfst(0),
- nExtendRange(SP_EXTEND_RANGE_NONE)
+ nExtendRange(SwSPExtendRange::NONE)
 {}
 };
 
diff --git a/sw/source/core/access/accportions.cxx 
b/sw/source/core/access/accportions.cxx
index 486c40c..9713574 100644
--- a/sw/source/core/access/accportions.cxx
+++ b/sw/source/core/access/accportions.cxx
@@ -582,13 +582,13 @@ sal_Int32 SwAccessiblePortionData::FillSpecialPos(
 {
 size_t nPortionNo = FindLastBreak( aAccessiblePositions, nPos );
 
-sal_uInt8 nExtend(SP_EXTEND_RANGE_NONE);
+SwSPExtendRange nExtend(SwSPExtendRange::NONE);
 sal_Int32 nRefPos(0);
 sal_Int32 nModelPos(0);
 
 if( nPortionNo < nBeforePortions )
 {
-nExtend = SP_EXTEND_RANGE_BEFORE;
+nExtend = SwSPExtendRange::BEFORE;
 rpPos = &rPos;
 }
 else
@@ -620,7 +620,7 @@ sal_Int32 SwAccessiblePortionData::FillSpecialPos(
 // reference position is the first accessibilty for our
 // core portion
 nRefPos = aAccessiblePositions[ nCorePortionNo ];
-nExtend = SP_EXTEND_RANGE_NONE;
+nExtend = SwSPExtendRange::NONE;
 rpPos = &rPos;
 }
 else if(nPortionNo != nCorePortionNo)
@@ -630,7 +630,7 @@ sal_Int32 SwAccessiblePortionData::FillSpecialPos(
 // reference position is the first character of the next
 // portion, and we are 'behind'
 nRefPos = aAccessiblePositions[ nCorePortionNo+1 ];
-nExtend = SP_EXTEND_RANGE_BEHIND;
+nExtend = SwSPExtendRange::BEHIND;
 rpPos = &rPos;
 }
 else
@@ -649,9 +649,6 @@ sal_Int32 SwAccessiblePortionData::FillSpecialPos(
 {
 OSL_ENSURE( rpPos == &rPos, "Yes!" );
 OSL_ENSURE( nRefPos <= nPos, "wrong reference" );
-OSL_ENSURE( (nExtend == SP_EXTEND_RANGE_NONE) ||
-(nExtend == SP_EXTEND_RANGE_BEFORE) ||
-(nExtend == SP_EXTEND_RANGE_BEHIND), "need extend" );
 
 // get the line number, and adjust nRefPos for the line
 // (if necessary)
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 30781fb..501a0e8 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -1734,7 +1734,7 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, bool 
bIdleEnd )
 
 // #i27615#,#i30453#
 SwSpecialPos aSpecialPos;
-aSpecialPos.nExtendRange = SP_EXTEND_RANGE_BEFORE;
+aSpecialPos.nExtendRange = SwSPExtendRange::BEFORE;
 if (pShellCrsr->IsInFrontOfLabel())
 {
 aTmpState.pSpecialPos = &aSpecialPos;
diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx
index d8ea12b..2969e10 100644
--- a/sw/source/core/text/itrcrsr.cxx
+++ b/sw/source/core/text/itrcrsr.cxx
@@ -484,9 +484,9 @@ void SwTextCursor::_GetCharRect( SwRect* pOrig, const 
sal_Int32 nOfst,
 // more than one line we may not skip any "empty portions" at the
 // beginning of a line
 const bool bInsideFirstField = pCMS && pCMS->pSpecialPos &&
-   ( pCMS->pSpecialPos->nLineOfst ||
- SP_EXTEND_RANGE_BEFORE ==
- pCMS->pSpecialPos->nExtendRange );
+( pCMS->pSpecialPos->nLineOfst ||
+  SwSPExtendRange::BEFORE ==
+  pCMS->pSpecialPos->nExtendRange );
 
 bool bWidth = pCMS && pCMS->bRealWidth;
 if( !pCurr->GetLen() && !pCurr->Width() )
@@ -1176,13 +1176,13 @@ bool SwTextCursor::GetCharRect( SwRect* pOrig, const 

[Libreoffice-commits] core.git: 8 commits - avmedia/source basebmp/source basebmp/test basegfx/source basegfx/test basic/source canvas/source cppcanvas/source drawinglayer/source filter/source include

2015-06-03 Thread Noel Grandin
 avmedia/source/framework/mediacontrol.cxx|   10 -
 avmedia/source/framework/mediaitem.cxx   |2 
 avmedia/source/viewer/mediawindow_impl.cxx   |   10 -
 basebmp/source/bitmapdevice.cxx  |   83 
 basebmp/source/debug.cxx |   38 ++--
 basebmp/test/basictest.cxx   |   78 
 basebmp/test/bmpmasktest.cxx |   30 +--
 basebmp/test/bmptest.cxx |   36 +--
 basebmp/test/cliptest.cxx|   46 ++--
 basebmp/test/filltest.cxx|   34 +--
 basebmp/test/linetest.cxx|   34 +--
 basebmp/test/masktest.cxx|   16 -
 basebmp/test/polytest.cxx|   38 ++--
 basegfx/source/polygon/b2dlinegeometry.cxx   |   22 +-
 basegfx/source/polygon/b2dpolygon.cxx|2 
 basegfx/source/polygon/b2dpolygontools.cxx   |   38 ++--
 basegfx/source/polygon/b2dpolygontriangulator.cxx|2 
 basegfx/source/polygon/b2dpolypolygoncutter.cxx  |   16 -
 basegfx/source/polygon/b2dpolypolygontools.cxx   |4 
 basegfx/source/polygon/b2dsvgpolypolygon.cxx |2 
 basegfx/source/range/b2drangeclipper.cxx |4 
 basegfx/source/tools/b2dclipstate.cxx|2 
 basegfx/source/tools/unotools.cxx|4 
 basegfx/source/vector/b2dvector.cxx  |   14 -
 basegfx/test/basegfx2d.cxx   |8 
 basegfx/test/boxclipper.cxx  |   82 
 basic/source/comp/codegen.cxx|8 
 basic/source/comp/dim.cxx|   10 -
 basic/source/comp/symtbl.cxx |   12 -
 canvas/source/vcl/canvashelper.cxx   |   10 -
 cppcanvas/source/mtfrenderer/implrenderer.cxx|8 
 drawinglayer/source/attribute/lineattribute.cxx  |2 
 drawinglayer/source/attribute/sdrlineattribute.cxx   |2 
 drawinglayer/source/primitive2d/metafileprimitive2d.cxx  |4 
 drawinglayer/source/primitive2d/polygonprimitive2d.cxx   |2 
 drawinglayer/source/primitive2d/textlineprimitive2d.cxx  |4 
 drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx |2 
 drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx   |   18 -
 drawinglayer/source/processor2d/hittestprocessor2d.cxx   |2 
 drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx   |   10 -
 filter/source/graphicfilter/eps/eps.cxx  |   12 -
 filter/source/graphicfilter/ipict/shape.cxx  |   12 -
 filter/source/svg/gfxtypes.hxx   |2 
 filter/source/svg/svgreader.cxx  |   12 -
 filter/source/svg/svgwriter.cxx  |   26 +-
 filter/source/svg/svgwriter.hxx  |2 
 include/avmedia/mediaitem.hxx|   40 +---
 include/basebmp/drawmodes.hxx|   10 -
 include/basebmp/genericcolorimageaccessor.hxx|2 
 include/basebmp/polypolygonrenderer.hxx  |9 
 include/basebmp/scanlineformats.hxx  |   42 ++--
 include/basegfx/polygon/b2dlinegeometry.hxx  |2 
 include/basegfx/polygon/b2dpolypolygonfillrule.hxx   |   12 -
 include/basegfx/vector/b2enums.hxx   |   26 +-
 include/basic/sbdef.hxx  |   10 -
 include/drawinglayer/attribute/lineattribute.hxx |2 
 include/vcl/outdev.hxx   |4 
 sd/source/ui/animations/motionpathtag.cxx|8 
 slideshow/source/engine/slide/layer.cxx  |2 
 svgio/source/svgreader/svgstyleattributes.cxx|6 
 svx/source/engine3d/extrud3d.cxx |2 
 svx/source/sdr/attribute/sdrformtextattribute.cxx|   10 -
 svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx|2 
 svx/source/sdr/primitive2d/sdrattributecreator.cxx   |   10 -
 svx/source/svdraw/svdfmtf.cxx|   16 -
 svx/source/svdraw/svdpoev.cxx|   14 -
 tools/source/generic/poly.cxx|4 
 vcl/android/androidinst.cxx  |2 
 vcl/headless/svpbmp.cxx  |  104 +--
 vcl/headless/svpgdi.cxx  |   20 +-

LibreOffice Gerrit News for core on 2015-06-04

2015-06-03 Thread gerrit
Moin!

* Open changes on master for project core changed in the last 25 hours:

 First time contributors doing great things! 
+ tdf#89972: also copy external reference status
  in https://gerrit.libreoffice.org/16066 from Mike Kaganski
  about module sc
+ tdf#91781 Changes based on heiko suggestions
  in https://gerrit.libreoffice.org/16067 from Yousuf Philips
  about module sw
+ tdf#86614 Adjusting some text entries and rearranging and removing others
  in https://gerrit.libreoffice.org/16062 from Yousuf Philips
  about module sd
+ tdf#91641 adjust cursor when deleting preceding characters
  in https://gerrit.libreoffice.org/15961 from Justin Luth
  about module vcl
+ Update title of Conditional Format dialog when range modified
  in https://gerrit.libreoffice.org/15711 from Andrzej Hunt
  about module sc
+ tdf#91634: Image hyperlink is not export after roundtrip.
  in https://gerrit.libreoffice.org/15919 from Yogesh Bharate
  about module oox, sc
 End of freshness 

+ convert GOTOOBJ constants to scoped enum
  in https://gerrit.libreoffice.org/16071 from Noel Grandin
  about module sw
+ convert SW_DB_SELECT constants to scoped enum
  in https://gerrit.libreoffice.org/16070 from Noel Grandin
  about module sw
+ convert MT_ constants to scoped enum
  in https://gerrit.libreoffice.org/16068 from Noel Grandin
  about module sw
+ convert SP_EXTEND_RANGE constants to scoped enum
  in https://gerrit.libreoffice.org/16069 from Noel Grandin
  about module sw
+ replace FLYPROTECT with scoped enum
  in https://gerrit.libreoffice.org/16072 from Noel Grandin
  about module sw
+ new uno sidebar api
  in https://gerrit.libreoffice.org/15856 from Laurent Godard
  about module dbaccess, include, offapi, sfx2, vcl
+ update to liborcus 0.9.1
  in https://gerrit.libreoffice.org/15822 from Markus Mohrhard
  about module build, external, sc
+ tdf#91425 CRASH - Calc Insert Columns Left
  in https://gerrit.libreoffice.org/16063 from Takeshi Abe
  about module sc
+ [GSoC2015] Refactor DrawGrid to use logic units
  in https://gerrit.libreoffice.org/16008 from Krisztian Pinter
  about module sc
+ uno::Sequence provides now begin and end
  in https://gerrit.libreoffice.org/16057 from Noel Grandin
  about module basctl, basegfx, chart2, comphelper, dbaccess, extensions, 
framework, include, svx, toolkit, xmloff
+ improve vclwidget clang plugin to detect incorrect constructions
  in https://gerrit.libreoffice.org/16052 from Noel Grandin
  about module basctl, basic, compilerplugins, cui, dbaccess, desktop, 
extensions, framework, include, sc, sd, sfx2, starmath, svtools, svx, sw, 
toolkit, vcl, xmlsecurity
+ loplugin:unnecessaryvirtuals
  in https://gerrit.libreoffice.org/16035 from Noel Grandin
  about module basegfx, compilerplugins, connectivity, dbaccess, extensions, 
include, lotuswordpro, svx, vcl, writerfilter


* Merged changes on master for project core changed in the last 25 hours:

+ calc mapmode: Refactor DrawDocumentBackground to use logic units
  in https://gerrit.libreoffice.org/15984 from Krisztian Pinter
+ tdf#87822 Impress: hide common task toolbar in master view
  in https://gerrit.libreoffice.org/16060 from Philippe Jung
+ Build time option --disable-extension-update
  in https://gerrit.libreoffice.org/16027 from Katarina Behrens
+ tdf#91726: AutoFormat: Crash when using an existing name
  in https://gerrit.libreoffice.org/16000 from Julien Nabet
+ Skeletal SfxControllerItem / bindings unit test.
  in https://gerrit.libreoffice.org/16040 from Michael Meeks
+ reduce sleep when connecting to soffice from Java
  in https://gerrit.libreoffice.org/16038 from Noel Grandin
+ tdf#91781 Fix some entry headings
  in https://gerrit.libreoffice.org/16020 from Yousuf Philips


* Abandoned changes on master for project core changed in the last 25 hours:

None

* Open changes needing tweaks, but being untouched for more than a week:

+ writefilter: removed #includes
  in https://gerrit.libreoffice.org/15850 from Andrea Gelmini
+ Removed getNormal() from polygontools, it just calls B3DPolygon::getNorma
  in https://gerrit.libreoffice.org/15809 from Zsolt Bölöny
+ fdo#58194 - export DOCX Automatic indent as firstLine indent
  in https://gerrit.libreoffice.org/15768 from Joren De Cuyper
+ tdf#76334 push viewbox properties to the CustomShapeProperties
  in https://gerrit.libreoffice.org/15753 from Joren De Cuyper
+ Add very initial support for Visual Studio 2015
  in https://gerrit.libreoffice.org/15644 from Jesús Corrius
+ tdf#90494: Change gradient angle diagonally by choosing option.
  in https://gerrit.libreoffice.org/15180 from Heena Gupta
+ Rendering support for  multiStop GradientFill (OOXML LINEAR)
  in https://gerrit.libreoffice.org/12056 from Vinaya Mandke
+ Resolves tdf#83365 Other: Access across spreadsheet returns Err:504
  in https://gerrit.libreoffice.org/15363 from Henry Castro
+ tdf#46037: Exchange some uses of configurationhelper for officecfg in Wri
  in https://gerrit.libreoffice.org/15611 from Ma

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

2015-06-03 Thread Tomaž Vajngerl
 include/vcl/status.hxx   |2 
 vcl/source/window/status.cxx |   96 +--
 2 files changed, 31 insertions(+), 67 deletions(-)

New commits:
commit 758916a88d6dfbabc31b8430b1cc605cb2c1e890
Author: Tomaž Vajngerl 
Date:   Thu Jun 4 12:18:36 2015 +0900

fix status bar flickering (zoom slider fo example)

Change-Id: I3fb71868a9f8f56c76353f3a2d84fdb078c8f8fb

diff --git a/include/vcl/status.hxx b/include/vcl/status.hxx
index 85a94cd..fd79dd1 100644
--- a/include/vcl/status.hxx
+++ b/include/vcl/status.hxx
@@ -96,7 +96,7 @@ private:
 
 using Window::ImplInit;
 SAL_DLLPRIVATE void  ImplInit( vcl::Window* pParent, WinBits nStyle );
-SAL_DLLPRIVATE void  ImplInitSettings( bool bFont, bool bForeground, 
bool bBackground );
+SAL_DLLPRIVATE void  ImplInitSettings();
 SAL_DLLPRIVATE void  ImplFormat();
 SAL_DLLPRIVATE bool  ImplIsItemUpdate();
 
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index 73ea7b7..3cfb43c 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -123,7 +123,7 @@ void StatusBar::ImplInit( vcl::Window* pParent, WinBits 
nStyle )
 
 // remember WinBits
 mpItemList  = new ImplStatusItemList;
-mpImplData->mpVirDev= VclPtr::Create( *this );
+mpImplData->mpVirDev = VclPtr::Create( *this );
 mnCurItemId = 0;
 mbFormat= true;
 mbVisibleItems  = true;
@@ -137,8 +137,7 @@ void StatusBar::ImplInit( vcl::Window* pParent, WinBits 
nStyle )
 mnItemY = STATUSBAR_OFFSET_Y;
 mnTextY = STATUSBAR_OFFSET_TEXTY;
 
-ImplInitSettings( true, true, true );
-SetLineColor();
+ImplInitSettings();
 
 SetOutputSizePixel( CalcWindowSizePixel() );
 }
@@ -175,6 +174,8 @@ void StatusBar::AdjustItemWidthsForHiDPI(bool bAdjustHiDPI)
 
 void StatusBar::ApplySettings(vcl::RenderContext& rRenderContext)
 {
+rRenderContext.SetLineColor();
+
 const StyleSettings& rStyleSettings = 
rRenderContext.GetSettings().GetStyleSettings();
 vcl::Font aFont = rStyleSettings.GetToolFont();
 if (IsControlFont())
@@ -209,56 +210,15 @@ void StatusBar::ApplySettings(vcl::RenderContext& 
rRenderContext)
 }
 }
 
-void StatusBar::ImplInitSettings(bool bFont, bool bForeground, bool 
bBackground)
+void StatusBar::ImplInitSettings()
 {
-const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
-
-if (bFont)
-{
-vcl::Font aFont = rStyleSettings.GetToolFont();
-if (IsControlFont())
-aFont.Merge(GetControlFont());
-SetZoomedPointFont(*this, aFont);
-}
-
-if (bForeground || bFont)
-{
-Color aColor;
-if (IsControlForeground())
-aColor = GetControlForeground();
-else if ( GetStyle() & WB_3DLOOK )
-aColor = rStyleSettings.GetButtonTextColor();
-else
-aColor = rStyleSettings.GetWindowTextColor();
-SetTextColor(aColor);
-SetTextFillColor();
-
-mpImplData->mpVirDev->SetFont( GetFont() );
-mpImplData->mpVirDev->SetTextColor( GetTextColor() );
-mpImplData->mpVirDev->SetTextAlign( GetTextAlign() );
-mpImplData->mpVirDev->SetTextFillColor();
-}
+ApplySettings(*this);
 
-if ( bBackground )
-{
-Color aColor;
-if ( IsControlBackground() )
-aColor = GetControlBackground();
-else if ( GetStyle() & WB_3DLOOK )
-aColor = rStyleSettings.GetFaceColor();
-else
-aColor = rStyleSettings.GetWindowColor();
-SetBackground( aColor );
-mpImplData->mpVirDev->SetBackground( GetBackground() );
-
-// NWF background
-if( ! IsControlBackground() &&
-  IsNativeControlSupported( CTRL_WINDOW_BACKGROUND, 
PART_BACKGROUND_WINDOW ) )
-{
-ImplGetWindowImpl()->mnNativeBackground = PART_BACKGROUND_WINDOW;
-EnableChildTransparentMode( true );
-}
-}
+mpImplData->mpVirDev->SetFont(GetFont());
+mpImplData->mpVirDev->SetTextColor(GetTextColor());
+mpImplData->mpVirDev->SetTextAlign(GetTextAlign());
+mpImplData->mpVirDev->SetTextFillColor();
+mpImplData->mpVirDev->SetBackground(GetBackground());
 }
 
 void StatusBar::ImplFormat()
@@ -745,7 +705,20 @@ void StatusBar::Paint(vcl::RenderContext& rRenderContext, 
const Rectangle&)
 sal_uInt16 nItemCount = sal_uInt16( mpItemList->size() );
 
 if (mbProgressMode)
+{
+rRenderContext.Push(PushFlags::FILLCOLOR | PushFlags::LINECOLOR);
+
+const StyleSettings& rStyleSettings = 
rRenderContext.GetSettings().GetStyleSettings();
+Color aProgressColor = rStyleSettings.GetHighlightColor();
+if (aProgressColor == rStyleSettings.GetFaceColor())
+aProgressColor = rStyleSettings.GetDarkShadowColor();
+rRenderContext.SetLineColor();
+rRenderContext.SetFillColor(aProgressColor);

[Libreoffice-commits] core.git: Branch 'aoo/trunk' - filter/source

2015-06-03 Thread Kay Schenk
 filter/source/config/fragments/fcfg_writer.mk |2 --
 1 file changed, 2 deletions(-)

New commits:
commit d4dcdfa54b940afb09d6086a179a02c6ff1daa40
Author: Kay Schenk 
Date:   Wed Jun 3 22:53:11 2015 +

#i126281# Remove HWP as an option to Writer open menu.

diff --git a/filter/source/config/fragments/fcfg_writer.mk 
b/filter/source/config/fragments/fcfg_writer.mk
index 115d711..68bfba2 100644
--- a/filter/source/config/fragments/fcfg_writer.mk
+++ b/filter/source/config/fragments/fcfg_writer.mk
@@ -40,7 +40,6 @@ T4_WRITER = \
 writer_T602_Document \
 writer_Text \
 writer_Text_encoded \
-writer_MIZI_Hwp_97 \
 writer_StarOffice_XML_Writer_Template \
 pdf_Portable_Document_Format\
 writer8_template\
@@ -74,7 +73,6 @@ F4_WRITER = \
 T602Document \
 Text \
 Text__encoded_ \
-writer_MIZI_Hwp_97 \
 writer_StarOffice_XML_Writer_Template \
 writer_pdf_Export\
 writer8\
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[GSoC] Haskell UNO Language Binding - Weekly Report 1

2015-06-03 Thread Jorge Mendes
Hi,

Sorry for the late report.

For the first week (and also during the bonding period) I have been
looking to LibreOffice code related to UNO bindings (C++, Java,
Python) for inspiration, and played a little bit with Haskell's FFI to
check how well it works with C++. For this, C wrappers around C++ code
should be sufficient. However, the compilation process is a little bit
complicated.

Now I am working on converting a simple C/C++ code (provided by my
mentor Stephan) that uses UNO to Haskell, which includes:
 - the compilation process (linking Haskell, C and C++ is tricky);
 - type conversions;
 - UNO calls.
The compilation process is working. Bootstraping is running. Some work
on the code is still needed to make the UNO calls work (it's strange
to work with pointers and explicit dynamic memory in Haskell).

After having the example code working, I'll work on providing the UNO
API to Haskell programs.

Kind regards,
Jorge
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Changes to 'private/moggi/opengl-preparation'

2015-06-03 Thread Markus Mohrhard
New branch 'private/moggi/opengl-preparation' available with the following 
commits:
commit 1570bcb3c96e4dc89af98b997b72d3d348ac4cb8
Author: Markus Mohrhard 
Date:   Thu Jun 4 00:26:41 2015 +0200

first part for server based blacklist

We are now switching from ahrd coding the blacklist in the source code
to using a xml file. In a second step that xml file will be fetched from
a TDF server.

Change-Id: I1c67d366c77b2f4185bedaa552fa655cc8ddb047

commit 9197858bf3c3ad99cc222945dacc66e2f8e9d88c
Author: Markus Mohrhard 
Date:   Wed Jun 3 18:39:35 2015 +0200

they are surely unused in the wgl code

Change-Id: If853be02e0ad9079820ca696746073254fff280a

commit 7d79e4b9ba876671617fb9ebb882903a73c31474
Author: Markus Mohrhard 
Date:   Wed Jun 3 18:32:10 2015 +0200

no blocked geforce device

Change-Id: I05cde96cd4316950337013102a965b7cf8171033

commit be4eb97cdcc07647d9e225a3a1a732b31ae3af18
Author: Markus Mohrhard 
Date:   Wed Jun 3 18:31:23 2015 +0200

no blocked nvidia device

Change-Id: I14ba3f645e6d9e123dc0be495504f1ce0d7a38c2

commit 3b90aa94b5de574b3668e75662cc4c5af9522bcb
Author: Markus Mohrhard 
Date:   Wed Jun 3 18:30:40 2015 +0200

no blocked X1000 device

Change-Id: Ibfcb70207bb6f8f4433006f528886b99bd3b3f76

commit 60f01c7de8916cb2cffdfea11a732a06bdf8e60c
Author: Markus Mohrhard 
Date:   Wed Jun 3 18:29:28 2015 +0200

no need for DX9 blocked devices

Change-Id: I6cbcfa53164dc75ba1f3d77dc0294464c83270d0

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


[Libreoffice-commits] core.git: Branch 'feature/gsoc-tiled-rendering' - libreofficekit/source

2015-06-03 Thread Pranav Kant
 libreofficekit/source/gtk/tilebuffer.cxx |  104 +++
 libreofficekit/source/gtk/tilebuffer.hxx |   69 ++--
 2 files changed, 86 insertions(+), 87 deletions(-)

New commits:
commit 767797a89db147f0baa42d997a1421de1b5bcebc
Author: Pranav Kant 
Date:   Thu Jun 4 03:53:00 2015 +0530

TileBuffer: style fixes

Change-Id: I6b1e64f1ad75acd53aa20cf45aa46a4e172d76cb

diff --git a/libreofficekit/source/gtk/tilebuffer.cxx 
b/libreofficekit/source/gtk/tilebuffer.cxx
index f932e4f..e13f5b0 100644
--- a/libreofficekit/source/gtk/tilebuffer.cxx
+++ b/libreofficekit/source/gtk/tilebuffer.cxx
@@ -23,82 +23,82 @@ static float twipToPixel(float fInput, float zoom)
 
 GdkPixbuf* Tile::tile_get_buffer()
 {
-  return m_pBuffer;
+return m_pBuffer;
 }
 
 void Tile::tile_release()
 {
-  gdk_pixbuf_unref(m_pBuffer);
-  m_pBuffer = NULL;
+g_object_unref (m_pBuffer);
+m_pBuffer = NULL;
 }
 
 void TileBuffer::tile_buffer_set_zoom(float newZoomFactor, int rows, int 
columns)
 {
-  m_fZoomFactor = newZoomFactor;
+m_fZoomFactor = newZoomFactor;
 
-  tile_buffer_reset_all_tiles();
+tile_buffer_reset_all_tiles();
 
-  // set new buffer width and height
-  m_nWidth = columns;
-  m_nHeight = rows;
+// set new buffer width and height
+m_nWidth = columns;
+m_nHeight = rows;
 }
 
 void TileBuffer::tile_buffer_reset_all_tiles()
 {
-  std::map::iterator it = m_mTiles.begin();
-  for (; it != m_mTiles.end(); it++)
-{
-   it->second.tile_release();
-}
-  m_mTiles.clear();
+std::map::iterator it = m_mTiles.begin();
+for (; it != m_mTiles.end(); it++)
+{
+it->second.tile_release();
+}
+m_mTiles.clear();
 }
 
 void TileBuffer::tile_buffer_set_invalid(int x, int y)
 {
-  int index = x * m_nWidth + y;
-  g_info("setting invalid : %d %d",x, y);
-  if (m_mTiles.find(index) != m_mTiles.end())
-  {
-  m_mTiles[index].valid = 0;
-  m_mTiles[index].tile_release();
-  m_mTiles.erase(index);
-  }
+int index = x * m_nWidth + y;
+g_info("setting invalid : %d %d",x, y);
+if (m_mTiles.find(index) != m_mTiles.end())
+{
+m_mTiles[index].valid = 0;
+m_mTiles[index].tile_release();
+m_mTiles.erase(index);
+}
 }
 
 Tile& TileBuffer::tile_buffer_get_tile(int x, int y)
 {
-  int index = x * m_nWidth + y;
-  if(m_mTiles.find(index) == m_mTiles.end() || !m_mTiles[index].valid)
-{
-
-  GdkPixbuf* pPixBuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8, 
m_nTileSize, m_nTileSize);
-  if (!pPixBuf){
-g_info ("error allocating memory to pixbuf");
-  }
-  unsigned char* pBuffer = gdk_pixbuf_get_pixels(pPixBuf);
-  GdkRectangle aTileRectangle;
-  aTileRectangle.x = pixelToTwip(m_nTileSize, m_fZoomFactor) * y;
-  aTileRectangle.y = pixelToTwip(m_nTileSize, m_fZoomFactor) * x;
-
-  g_info ("rendering (%d %d)", x, y);
-  m_pLOKDocument->pClass->paintTile(m_pLOKDocument,
-// Buffer and its size, depends on the 
position only.
-pBuffer,
-m_nTileSize, m_nTileSize,
-// Position of the tile.
-aTileRectangle.x, aTileRectangle.y,
-// Size of the tile, depends on the 
zoom factor and the tile position only.
-pixelToTwip(m_nTileSize, 
m_fZoomFactor), pixelToTwip(m_nTileSize, m_fZoomFactor));
-
-  //create a mapping for it
-  m_mTiles[index].tile_set_pixbuf(pPixBuf);
-  m_mTiles[index].valid = 1;
-}
-
-  return m_mTiles[index];
+int index = x * m_nWidth + y;
+if(m_mTiles.find(index) == m_mTiles.end() || !m_mTiles[index].valid)
+{
+
+GdkPixbuf* pPixBuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8, 
m_nTileSize, m_nTileSize);
+if (!pPixBuf){
+g_info ("error allocating memory to pixbuf");
+}
+unsigned char* pBuffer = gdk_pixbuf_get_pixels(pPixBuf);
+GdkRectangle aTileRectangle;
+aTileRectangle.x = pixelToTwip(m_nTileSize, m_fZoomFactor) * y;
+aTileRectangle.y = pixelToTwip(m_nTileSize, m_fZoomFactor) * x;
+
+g_info ("rendering (%d %d)", x, y);
+m_pLOKDocument->pClass->paintTile(m_pLOKDocument,
+  // Buffer and its size, depends 
on the position only.
+  pBuffer,
+  m_nTileSize, m_nTileSize,
+  // Position of the tile.
+  aTileRectangle.x, 
aTileRectangle.y,
+  // Size of the tile, depends on 
the zoom factor and the tile position only

[Libreoffice-commits] core.git: Branch 'feature/gsoc-tiled-rendering' - libreofficekit/source

2015-06-03 Thread Pranav Kant
 libreofficekit/source/gtk/lokdocview.cxx |   50 ---
 libreofficekit/source/gtk/tilebuffer.cxx |   15 -
 libreofficekit/source/gtk/tilebuffer.hxx |1 
 3 files changed, 61 insertions(+), 5 deletions(-)

New commits:
commit 857440900b3169d19a560d24b08122405e2398db
Author: Pranav Kant 
Date:   Thu Jun 4 03:32:18 2015 +0530

gtktiledviewer: add support for editing

Change-Id: I8637d99e6fa59129af207e667bcdf03dc212efeb

diff --git a/libreofficekit/source/gtk/lokdocview.cxx 
b/libreofficekit/source/gtk/lokdocview.cxx
index f476a23..2a3a395 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -821,7 +821,7 @@ void LOKDocView_Impl::renderDocument(GdkRectangle* pPartial)
 
 if (bPaint)
 {
-g_info("gettile: (%d %d)", nRow, nColumn);
+//g_info("gettile: (%d %d)", nRow, nColumn);
 
 Tile& currentTile = m_pTileBuffer->tile_buffer_get_tile(nRow, 
nColumn);
 GdkPixbuf* pPixBuf = currentTile.tile_get_buffer();
@@ -934,17 +934,50 @@ gboolean LOKDocView_Impl::callbackImpl(CallbackData* 
pCallback)
 if (pCallback->m_aPayload != "EMPTY")
 {
 GdkRectangle aRectangle = 
LOKDocView_Impl::payloadToRectangle(pCallback->m_aPayload.c_str());
-renderDocument(&aRectangle);
+GdkRectangle aRectanglePixels;
+aRectanglePixels.x = twipToPixel(aRectangle.x);
+aRectanglePixels.y = twipToPixel(aRectangle.y);
+aRectanglePixels.width = twipToPixel(aRectangle.width);
+aRectanglePixels.height = twipToPixel(aRectangle.height);
+int rowStart = aRectanglePixels.x / nTileSizePixels;
+int colStart = aRectanglePixels.y / nTileSizePixels;
+int rowEnd = (aRectanglePixels.x + aRectanglePixels.height + 
nTileSizePixels) / nTileSizePixels;
+int colEnd = (aRectanglePixels.y + aRectanglePixels.width + 
nTileSizePixels) / nTileSizePixels;
+int i,j;
+for (i = rowStart; i < rowEnd; i++) {
+for (j = colStart; j < colEnd; j++) {
+m_pTileBuffer->tile_buffer_set_invalid(i, j);
+}
+}
+renderDocument(0);
 }
 else
+{
+m_pTileBuffer->tile_buffer_reset_all_tiles();
 renderDocument(0);
+}
 }
 break;
 case LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR:
 {
 m_aVisibleCursor = 
LOKDocView_Impl::payloadToRectangle(pCallback->m_aPayload.c_str());
 m_bCursorOverlayVisible = true;
-gtk_widget_queue_draw(GTK_WIDGET(m_pDrawingArea));
+GdkRectangle aRectanglePixels;
+aRectanglePixels.x = twipToPixel(m_aVisibleCursor.x);
+aRectanglePixels.y = twipToPixel(m_aVisibleCursor.y);
+aRectanglePixels.width = twipToPixel(m_aVisibleCursor.width);
+aRectanglePixels.height = twipToPixel(m_aVisibleCursor.height);
+int rowStart = aRectanglePixels.x / nTileSizePixels;
+int colStart = aRectanglePixels.y / nTileSizePixels;
+int rowEnd = (aRectanglePixels.x + aRectanglePixels.height + 
nTileSizePixels) / nTileSizePixels;
+int colEnd = (aRectanglePixels.y + aRectanglePixels.width + 
nTileSizePixels) / nTileSizePixels;
+int i,j;
+for (i = rowStart; i < rowEnd; i++) {
+for (j = colStart; j < colEnd; j++) {
+m_pTileBuffer->tile_buffer_set_invalid(i, j);
+}
+}
+renderDocument(0);
 }
 break;
 case LOK_CALLBACK_TEXT_SELECTION:
@@ -961,7 +994,6 @@ gboolean LOKDocView_Impl::callbackImpl(CallbackData* 
pCallback)
 }
 else
 memset(&m_aHandleMiddleRect, 0, sizeof(m_aHandleMiddleRect));
-gtk_widget_queue_draw(GTK_WIDGET(m_pDrawingArea));
 }
 break;
 case LOK_CALLBACK_TEXT_SELECTION_START:
@@ -1144,6 +1176,16 @@ static void lok_docview_init( GTypeInstance* pInstance, 
gpointer )
 g_signal_connect(GTK_OBJECT(pDocView->m_pImpl->m_pDrawingArea),
  "expose-event",
  GTK_SIGNAL_FUNC(LOKDocView_Impl::on_exposed), pDocView);
+g_signal_connect(GTK_OBJECT(pDocView->m_pImpl->m_pDrawingArea),
+ "expose-event",
+ GTK_SIGNAL_FUNC(LOKDocView_Impl::renderOverlay), 
pDocView);
+gtk_widget_add_events(pDocView->m_pImpl->m_pDrawingArea,
+  GDK_BUTTON_PRESS_MASK
+  | GDK_BUTTON_RELEASE_MASK
+  | GDK_BUTTON_MOTION_MASK);
+g_signal_connect(G_OBJECT(pDocView->m_pImpl->m_pDrawingArea), 
"button-press-event", G_CALLBACK(LOKDocView_Impl::signalButton), pDocView);
+g_signal_connect(G_OBJECT(pDocView->m_pImpl->m_pDrawingArea), 
"button-release-event", G_CALLBACK(LOKDocView_Impl::signalButton), pDocView);
+g_signal_connect(G_OBJECT(pDocV

[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - sd/source

2015-06-03 Thread Philippe Jung
 sd/source/ui/inc/ToolBarManager.hxx  |1 +
 sd/source/ui/view/ToolBarManager.cxx |9 ++---
 sd/source/ui/view/drviews1.cxx   |   24 
 3 files changed, 23 insertions(+), 11 deletions(-)

New commits:
commit db79d2710e78c712763aaba0dc74165da5ad01cc
Author: Philippe Jung 
Date:   Wed Jun 3 16:28:02 2015 +0200

tdf#87822 Impress: hide common task toolbar in master view

When Master Slide or Master Notes are active,
hides the Common task toolbar as it it not usefull.

Change-Id: Ice07661bf203c029d733614e1eceb5ef3d0661f9
Reviewed-on: https://gerrit.libreoffice.org/16060
Reviewed-by: Yousuf Philips 
Tested-by: Yousuf Philips 
(cherry picked from commit 1191ed8584f9fd63c39514dd2e3e71682913d4bc)
Reviewed-on: https://gerrit.libreoffice.org/16061
Reviewed-by: Jan Holesovsky 

diff --git a/sd/source/ui/inc/ToolBarManager.hxx 
b/sd/source/ui/inc/ToolBarManager.hxx
index b5b9f80..5263dd0 100644
--- a/sd/source/ui/inc/ToolBarManager.hxx
+++ b/sd/source/ui/inc/ToolBarManager.hxx
@@ -126,6 +126,7 @@ public:
 
 TBG_PERMANENT = TBG__FIRST,
 TBG_FUNCTION,
+TBG_COMMON_TASK,
 TBG_MASTER_MODE,
 
 TBG__LAST = TBG_MASTER_MODE
diff --git a/sd/source/ui/view/ToolBarManager.cxx 
b/sd/source/ui/view/ToolBarManager.cxx
index 403230c..9e59223 100644
--- a/sd/source/ui/view/ToolBarManager.cxx
+++ b/sd/source/ui/view/ToolBarManager.cxx
@@ -1001,9 +1001,6 @@ void ToolBarRules::MainViewShellChanged 
(ViewShell::ShellType nShellType)
 ToolBarManager::msOptionsToolBar);
 mpToolBarManager->AddToolBar(
 ToolBarManager::TBG_PERMANENT,
-ToolBarManager::msCommonTaskToolBar);
-mpToolBarManager->AddToolBar(
-ToolBarManager::TBG_PERMANENT,
 ToolBarManager::msViewerToolBar);
 break;
 
@@ -1065,10 +1062,16 @@ void ToolBarRules::MainViewShellChanged (const 
ViewShell& rMainViewShell)
 const DrawViewShell* pDrawViewShell
 = dynamic_cast(&rMainViewShell);
 if (pDrawViewShell != NULL)
+{
 if (pDrawViewShell->GetEditMode() == EM_MASTERPAGE)
 mpToolBarManager->AddToolBar(
 ToolBarManager::TBG_MASTER_MODE,
 ToolBarManager::msMasterViewToolBar);
+else
+mpToolBarManager->AddToolBar(
+ToolBarManager::TBG_COMMON_TASK,
+ToolBarManager::msCommonTaskToolBar);
+}
 break;
 }
 
diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx
index 9aa19da..109d82c 100644
--- a/sd/source/ui/view/drviews1.cxx
+++ b/sd/source/ui/view/drviews1.cxx
@@ -363,14 +363,18 @@ void DrawViewShell::ChangeEditMode(EditMode eEMode, bool 
bIsLayerModeActive)
 // view.
 bool bShowMasterViewToolbar (meEditMode == EM_MASTERPAGE
  && GetShellType() != ViewShell::ST_HANDOUT);
+bool bShowPresentationToolbar (meEditMode != EM_MASTERPAGE
+ && GetShellType() != ViewShell::ST_HANDOUT);
 
 // If the master view toolbar is not shown we hide it before
 // switching the edit mode.
 if (::sd::ViewShell::mpImpl->mbIsInitialized
-&& IsMainViewShell()
-&& ! bShowMasterViewToolbar)
+&& IsMainViewShell())
 {
-
GetViewShellBase().GetToolBarManager()->ResetToolBars(ToolBarManager::TBG_MASTER_MODE);
+if ( !bShowMasterViewToolbar )
+
GetViewShellBase().GetToolBarManager()->ResetToolBars(ToolBarManager::TBG_MASTER_MODE);
+if ( !bShowPresentationToolbar )
+
GetViewShellBase().GetToolBarManager()->ResetToolBars(ToolBarManager::TBG_COMMON_TASK);
 }
 
 if (meEditMode == EM_PAGE)
@@ -441,12 +445,16 @@ void DrawViewShell::ChangeEditMode(EditMode eEMode, bool 
bIsLayerModeActive)
 // If the master view toolbar is to be shown we turn it on after the
 // edit mode has been changed.
 if (::sd::ViewShell::mpImpl->mbIsInitialized
-&& IsMainViewShell()
-&& bShowMasterViewToolbar)
+&& IsMainViewShell())
 {
-GetViewShellBase().GetToolBarManager()->SetToolBar(
-ToolBarManager::TBG_MASTER_MODE,
-ToolBarManager::msMasterViewToolBar);
+if (bShowMasterViewToolbar)
+GetViewShellBase().GetToolBarManager()->SetToolBar(
+ToolBarManager::TBG_MASTER_MODE,
+ToolBarManager::msMasterViewToolBar);
+if (bShowPresentationToolbar)
+GetViewShellBase().GetToolBarManager()->SetToolBar(
+ToolBarManager::TBG_COMMON_TASK,
+ToolBarManager::msCommonTaskToolBar);
 }
 
 if ( ! mbIsLayerModeActive)
__

[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - vcl/source

2015-06-03 Thread Jan Holesovsky
 vcl/source/app/IconThemeSelector.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8aeb66d1b31b171b9268342d987d358930196f38
Author: Jan Holesovsky 
Date:   Wed Jun 3 19:44:21 2015 +0200

OS X: Default to the 'breeze' icon theme.

As agreed in the Design team meeting today.

Change-Id: I660462fb7b56eb3c8f883f8540cf88801e48165c
Reviewed-on: https://gerrit.libreoffice.org/16065
Reviewed-by: Adolfo Jayme Barrientos 
Tested-by: Adolfo Jayme Barrientos 

diff --git a/vcl/source/app/IconThemeSelector.cxx 
b/vcl/source/app/IconThemeSelector.cxx
index 4ef0031..6f77375 100644
--- a/vcl/source/app/IconThemeSelector.cxx
+++ b/vcl/source/app/IconThemeSelector.cxx
@@ -63,7 +63,7 @@ IconThemeSelector::GetIconThemeForDesktopEnvironment(const 
OUString& desktopEnvi
 r = "breeze";
 }
 else if ( desktopEnvironment.equalsIgnoreAsciiCase("MacOSX") ) {
-r = "sifr";
+r = "breeze";
 }
 else {
 r = FALLBACK_ICON_THEME_ID;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: help needed: hsqldb shutdown race condition, how to fix without deadlock

2015-06-03 Thread Michael Stahl
On 03.06.2015 17:31, Lionel Elie Mamane wrote:
> On Wed, Jun 03, 2015 at 03:01:39PM +0200, Michael Stahl wrote:
>> On 03.06.2015 14:47, Lionel Elie Mamane wrote:
> 
>>> Since the problem is essentially that the two threads take the same mutexes
>>> in different order, here is a dirty hack that forces the hsqldb thread
>>> to take the "affine bridge" mutex before taking the "HSQL driver"
>>> mutex.
> 
>> i'm not entirely sure this is sensible...
> 
> Thinking the issue from yet another angle, if we go back to the
> situation at the start of this thread (hsqldb is *not* affine). I
> don't understand why the
> connectivity::hsqldb::ODriverDelegator::disposing thread holds the
> affine lock, and goes through the affine bridge:
> 
> #6  0x2b4ff40b8342 in connectivity::hsqldb::ODriverDelegator::disposing 
> (this=0x1ca1cf0, Source=...)
> at 
> /home/master/src/libreoffice/workdirs/libreoffice-5-1/connectivity/source/drivers/hsqldb/HDriver.cxx:566
> (...)
> #13 0x2b4ff45f5f4b in AffineBridge::outerDispatch 
> (this=this@entry=0x1ca77b0, loop=loop@entry=1)
> at 
> /home/master/src/libreoffice/workdirs/libreoffice-5-1/cppu/source/AffineBridge/AffineBridge.cxx:201
> #14 0x2b4ff45f6186 in AffineBridge::v_callInto_v (this=0x1ca77b0, 
> pCallee=0x2b4fd23f9dda ,
> pParam=0x2b4fecb5d3c0)
> at 
> /home/master/src/libreoffice/workdirs/libreoffice-5-1/cppu/source/AffineBridge/AffineBridge.cxx:270
> (...)
> #26 0x2b4ff47fdccc in Proxy::dispatch (this=this@entry=0x1cb3ac0,
> pReturnTypeRef=pReturnTypeRef@entry=0x8ce880, 
> pParams=pParams@entry=0x20789e0, nParams=nParams@entry=0,
> pMemberType=pMemberType@entry=0x236b4c0, 
> pReturn=pReturn@entry=0x2b4fecb5dd90, pArgs=0x2b4fecb5d9a0,
> ppException=0x2b4fecb5da30)
> at 
> /home/master/src/libreoffice/workdirs/libreoffice-5-1/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx:445
> #27 0x2b4ff47fcc7d in s_Proxy_dispatch (pUnoI=0x1cb3ac0, 
> pMemberType=0x236b4c0, pReturn=0x2b4fecb5dd90,
> pArgs=0x2b4fecb5d9a0, ppException=0x2b4fecb5da30)
> at 
> /home/master/src/libreoffice/workdirs/libreoffice-5-1/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx:170
> (...)
> #32 0x2b4fe831ac12 in privateSnippetExecutor ()
>from 
> /home/master/src/libreoffice/workdirs/libreoffice-5-1/instdir/program/libgcc3_uno.so
> #33 0x2b4fecd6e866 in dbaccess::OConnection::disposing (this=0x2058670)
> at 
> /home/master/src/libreoffice/workdirs/libreoffice-5-1/dbaccess/source/core/dataaccess/connection.cxx:492
> 
> 
> Why does the call from dbaccess::OConnection::disposing into
> connectivity::hsqldb::ODriverDelegator::disposing go through the
> affine bridge?

because OConnection is outside the affine environment, so it has to go
through the bridge to call a component inside the affine environment.

however the ODriverDelegator isn't inside the affine environment, what
happens is that while AffineBridge::v_callInto_v() waits for the call on
the "inner" thread to return, it assigns the current (calling) thread as
the "outer" thread and in AffineBridge::outerDispatch() it waits for
outgoing calls from the "inner" thread.

(this is something i mis-remembered: i wrote that outgoing calls happen
on a thread different from the calling one but evidently that is not
always the case; a new "outer" thread may be launched but only if no
"outer" thread exists.)

the "inner" thread executes only calls against the affine component; if
the affine component does a UNO call to another component, the "inner"
thread stores some closure in the AffineBridge instance and signals the
"outer" thread, which will then do the call and once it's done signal
back to the "inner" thread.

because the thread locked the AffineBridge mutex, which is a recursive
mutex, it can call into the affine component again, so you can have
re-entrant calls in the affine component, but no other thread can call
into it.

>> a component is (in general) responsible for its own thread safety, and
>> should not make assumptions about how other components are implemented,
>> in particular wrt. locking.
> 
> The hsqldb module is in great part a wrapper around the jdbc module,
> so I'm not too worried about hsqldb "knowing too much" about the jdbc
> module.
> 
> Alternatively, is there any way to force the hsqldb module to run in
> the same thread as the jdbc module?

that depends on how many AffineBridges there are...

>> this implies that if a component takes a lock, it must release the
>> lock before calling a method that could end up calling into a
>> different component, to avoid deadlock.
> 
> This sounds very restrictive. Essentially, you are saying that a
> method from class A in component CA cannot protect itself from being
> called "reentrantively" (or another method being called on the same
> object) if it has to call a method of an object B from component CB
> that is a member of class A:

yes, it is quite non-intuitive and likely violated in thousands of
places curre

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

2015-06-03 Thread Caolán McNamara
 sc/source/core/data/documen9.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 8ae25bbc092254f680e2976873f15bdbc26615ef
Author: Caolán McNamara 
Date:   Wed Jun 3 16:51:41 2015 +0100

Resolves: tdf#90435 secondary pool set to that of temp docs drawing layers

overwriting the original one, and when the temp doc goes away then its 
drawing
layer goes away autoamtically settings the secondary pools of the other 
pools
it is a secondary of back to 0

(see also tdf#87245)

Change-Id: Ie6dd8d615f81cf4d4776eaeac1cc2507b2abaa37

diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx
index bc8d76d..18d483c 100644
--- a/sc/source/core/data/documen9.cxx
+++ b/sc/source/core/data/documen9.cxx
@@ -138,11 +138,11 @@ void ScDocument::InitDrawLayer( SfxObjectShell* pDocShell 
)
 // in SfxItemSets using the Calc SfxItemPool. This is e.g. needed when
 // the PageStyle using SvxBrushItem is visualized and will be 
potentially
 // used more intense in the future
-if(xPoolHelper.is())
+if (xPoolHelper.is() && !IsClipOrUndo()) //Using IsClipOrUndo as a 
proxy for SharePooledResources called
 {
 ScDocumentPool* pLocalPool = xPoolHelper->GetDocPool();
 
-if(pLocalPool)
+if (pLocalPool)
 {
 OSL_ENSURE(!pLocalPool->GetSecondaryPool(), "OOps, already a 
secondary pool set where the DrawingLayer ItemPool is to be placed (!)");
 pLocalPool->SetSecondaryPool(&pDrawLayer->GetItemPool());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/unitver' - external/udunits2 RepositoryExternal.mk

2015-06-03 Thread Andrzej Hunt
Rebased ref, commits from common ancestor:
commit e4cc9f887c982476c568a19b655421b794fe9203
Author: Andrzej Hunt 
Date:   Wed Jun 3 21:28:24 2015 +0100

Fix udunits2 install_name on OSX

Change-Id: I048d23d647a6d6f38efddc11f7d3bde3b583e752

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 2f633bd..2e3b1ec 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -177,7 +177,7 @@ $(call gb_LinkTarget_add_libs,$(1),\
 )
 else
 $(call gb_LinkTarget_add_libs,$(1),\
-   -L$(call gb_UnpackedTarball_get_dir,udunits2)/lib -ludunits2 \
+   -L$(call gb_UnpackedTarball_get_dir,udunits2)/lib/.libs -ludunits2 \
 )
 endif
 
diff --git a/external/udunits2/UnpackedTarball_udunits2.mk 
b/external/udunits2/UnpackedTarball_udunits2.mk
index db096ca..820472e 100644
--- a/external/udunits2/UnpackedTarball_udunits2.mk
+++ b/external/udunits2/UnpackedTarball_udunits2.mk
@@ -11,4 +11,10 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,udunits2))
 
 $(eval $(call gb_UnpackedTarball_set_tarball,udunits2,$(UDUNITS2_TARBALL)))
 
+ifeq ($(OS),MACOSX)
+$(eval $(call gb_UnpackedTarball_add_patches,udunits2,\
+   external/udunits2/udunits2-macosx.patch.1 \
+))
+endif
+
 # vim: set noet sw=4 ts=4:
diff --git a/external/udunits2/udunits2-macosx.patch.1 
b/external/udunits2/udunits2-macosx.patch.1
new file mode 100644
index 000..0b6fb4e
--- /dev/null
+++ b/external/udunits2/udunits2-macosx.patch.1
@@ -0,0 +1,27 @@
+diff -ur udunits2.org/configure udunits2/configure
+--- udunits2.org/configure 2015-06-03 21:24:12.440541277 +0100
 udunits2/configure 2015-06-03 21:25:59.873829068 +0100
+@@ -10254,9 +10254,9 @@
+   esac
+   if test "$_lt_dar_can_shared" = "yes"; then
+ output_verbose_link_cmd=func_echo_all
+-archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs 
\$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring 
$_lt_dar_single_mod${_lt_dsymutil}"
++archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs 
\$deplibs \$compiler_flags -install_name 
@__OOO/\$soname \$verstring 
$_lt_dar_single_mod${_lt_dsymutil}"
+ module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs 
\$deplibs \$compiler_flags${_lt_dsymutil}"
+-archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > 
\$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib 
\$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags 
-install_name \$rpath/\$soname \$verstring 
${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
++archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > 
\$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib 
\$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags 
-install_name @__OOO/\$soname 
\$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+ module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > 
\$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib 
-bundle \$libobjs \$deplibs 
\$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+ 
+   else
+@@ -14000,9 +14000,9 @@
+   esac
+   if test "$_lt_dar_can_shared" = "yes"; then
+ output_verbose_link_cmd=func_echo_all
+-archive_cmds_FC="\$CC -dynamiclib \$allow_undefined_flag -o \$lib 
\$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring 
$_lt_dar_single_mod${_lt_dsymutil}"
++archive_cmds_FC="\$CC -dynamiclib \$allow_undefined_flag -o \$lib 
\$libobjs \$deplibs \$compiler_flags -install_name 
@__OOO/\$soname \$verstring 
$_lt_dar_single_mod${_lt_dsymutil}"
+ module_cmds_FC="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs 
\$deplibs \$compiler_flags${_lt_dsymutil}"
+-archive_expsym_cmds_FC="sed 's,^,_,' < \$export_symbols > 
\$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib 
\$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags 
-install_name \$rpath/\$soname \$verstring 
${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
++archive_expsym_cmds_FC="sed 's,^,_,' < \$export_symbols > 
\$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib 
\$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags 
-install_name @__OOO/\$soname 
\$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+ module_expsym_cmds_FC="sed -e 's,^,_,' < \$export_symbols > 
\$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib 
-bundle \$libobjs \$deplibs 
\$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+ 
+   else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/unitver' - external/udunits2 RepositoryExternal.mk

2015-06-03 Thread Andrzej Hunt
Rebased ref, commits from common ancestor:
commit 1704ec6a8c576855398035da216faa5e66559d9f
Author: Andrzej Hunt 
Date:   Wed Jun 3 21:28:24 2015 +0100

Possibly fix udunits2 loading on OSX

Change-Id: I048d23d647a6d6f38efddc11f7d3bde3b583e752

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 2f633bd..2e3b1ec 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -177,7 +177,7 @@ $(call gb_LinkTarget_add_libs,$(1),\
 )
 else
 $(call gb_LinkTarget_add_libs,$(1),\
-   -L$(call gb_UnpackedTarball_get_dir,udunits2)/lib -ludunits2 \
+   -L$(call gb_UnpackedTarball_get_dir,udunits2)/lib/.libs -ludunits2 \
 )
 endif
 
diff --git a/external/udunits2/UnpackedTarball_udunits2.mk 
b/external/udunits2/UnpackedTarball_udunits2.mk
index db096ca..820472e 100644
--- a/external/udunits2/UnpackedTarball_udunits2.mk
+++ b/external/udunits2/UnpackedTarball_udunits2.mk
@@ -11,4 +11,10 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,udunits2))
 
 $(eval $(call gb_UnpackedTarball_set_tarball,udunits2,$(UDUNITS2_TARBALL)))
 
+ifeq ($(OS),MACOSX)
+$(eval $(call gb_UnpackedTarball_add_patches,udunits2,\
+   external/udunits2/udunits2-macosx.patch.1 \
+))
+endif
+
 # vim: set noet sw=4 ts=4:
diff --git a/external/udunits2/udunits2-macosx.patch.1 
b/external/udunits2/udunits2-macosx.patch.1
new file mode 100644
index 000..0b6fb4e
--- /dev/null
+++ b/external/udunits2/udunits2-macosx.patch.1
@@ -0,0 +1,27 @@
+diff -ur udunits2.org/configure udunits2/configure
+--- udunits2.org/configure 2015-06-03 21:24:12.440541277 +0100
 udunits2/configure 2015-06-03 21:25:59.873829068 +0100
+@@ -10254,9 +10254,9 @@
+   esac
+   if test "$_lt_dar_can_shared" = "yes"; then
+ output_verbose_link_cmd=func_echo_all
+-archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs 
\$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring 
$_lt_dar_single_mod${_lt_dsymutil}"
++archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs 
\$deplibs \$compiler_flags -install_name 
@__OOO/\$soname \$verstring 
$_lt_dar_single_mod${_lt_dsymutil}"
+ module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs 
\$deplibs \$compiler_flags${_lt_dsymutil}"
+-archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > 
\$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib 
\$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags 
-install_name \$rpath/\$soname \$verstring 
${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
++archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > 
\$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib 
\$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags 
-install_name @__OOO/\$soname 
\$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+ module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > 
\$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib 
-bundle \$libobjs \$deplibs 
\$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+ 
+   else
+@@ -14000,9 +14000,9 @@
+   esac
+   if test "$_lt_dar_can_shared" = "yes"; then
+ output_verbose_link_cmd=func_echo_all
+-archive_cmds_FC="\$CC -dynamiclib \$allow_undefined_flag -o \$lib 
\$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring 
$_lt_dar_single_mod${_lt_dsymutil}"
++archive_cmds_FC="\$CC -dynamiclib \$allow_undefined_flag -o \$lib 
\$libobjs \$deplibs \$compiler_flags -install_name 
@__OOO/\$soname \$verstring 
$_lt_dar_single_mod${_lt_dsymutil}"
+ module_cmds_FC="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs 
\$deplibs \$compiler_flags${_lt_dsymutil}"
+-archive_expsym_cmds_FC="sed 's,^,_,' < \$export_symbols > 
\$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib 
\$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags 
-install_name \$rpath/\$soname \$verstring 
${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
++archive_expsym_cmds_FC="sed 's,^,_,' < \$export_symbols > 
\$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib 
\$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags 
-install_name @__OOO/\$soname 
\$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+ module_expsym_cmds_FC="sed -e 's,^,_,' < \$export_symbols > 
\$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib 
-bundle \$libobjs \$deplibs 
\$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+ 
+   else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/gsoc-tiled-rendering' - libreofficekit/source

2015-06-03 Thread Pranav Kant
 libreofficekit/source/gtk/tilebuffer.cxx |   17 +
 libreofficekit/source/gtk/tilebuffer.hxx |8 +++-
 2 files changed, 12 insertions(+), 13 deletions(-)

New commits:
commit 99070af0cdda393f5edc4601d37e9947b3afceb5
Author: Pranav Kant 
Date:   Thu Jun 4 01:44:47 2015 +0530

lokdocview: Use maps instead of vector

Using vector each tile needs to be allocated memory irrespective of
whether tile is required or not. This approach fails when we zoom in to
a very high level to have thousands of tiles due to lot of memory
required. Using maps instead of vector takes care of this, and only
allocates Tiles when required.

Change-Id: I523f815618451a7f014e28258e0de7b1c0693370

diff --git a/libreofficekit/source/gtk/tilebuffer.cxx 
b/libreofficekit/source/gtk/tilebuffer.cxx
index ca66ae90..e1b5b32 100644
--- a/libreofficekit/source/gtk/tilebuffer.cxx
+++ b/libreofficekit/source/gtk/tilebuffer.cxx
@@ -41,22 +41,22 @@ void TileBuffer::tile_buffer_set_zoom(float newZoomFactor, 
int rows, int columns
   // set new buffer width and height
   m_nWidth = columns;
   m_nHeight = rows;
-  m_aTiles.resize(m_nWidth * m_nHeight);
 }
 
 void TileBuffer::tile_buffer_reset_all_tiles()
 {
-  for (size_t i = 0; i < m_aTiles.size(); i++)
+  std::map::iterator it = m_mTiles.begin();
+  for (; it != m_mTiles.end(); it++)
 {
-  m_aTiles[i].tile_release();
+   it->second.tile_release();
 }
-  m_aTiles.clear();
+  m_mTiles.clear();
 }
 
 Tile& TileBuffer::tile_buffer_get_tile(int x, int y)
 {
   int index = x * m_nWidth + y;
-  if(!m_aTiles[index].valid)
+  if(m_mTiles.find(index) == m_mTiles.end())
 {
   GdkPixbuf* pPixBuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8, 
m_nTileSize, m_nTileSize);
   if (!pPixBuf){
@@ -77,11 +77,12 @@ Tile& TileBuffer::tile_buffer_get_tile(int x, int y)
 // Size of the tile, depends on the 
zoom factor and the tile position only.
 pixelToTwip(m_nTileSize, 
m_fZoomFactor), pixelToTwip(m_nTileSize, m_fZoomFactor));
 
-  m_aTiles[index].tile_set_pixbuf(pPixBuf);
-  m_aTiles[index].valid = 1;
+  //create a mapping for it
+  m_mTiles[index].tile_set_pixbuf(pPixBuf);
+  m_mTiles[index].valid = 1;
 }
 
-  return m_aTiles[index];
+  return m_mTiles[index];
 }
 
 void Tile::tile_set_pixbuf(GdkPixbuf *buffer)
diff --git a/libreofficekit/source/gtk/tilebuffer.hxx 
b/libreofficekit/source/gtk/tilebuffer.hxx
index a5ed0dc..0bc2d38 100644
--- a/libreofficekit/source/gtk/tilebuffer.hxx
+++ b/libreofficekit/source/gtk/tilebuffer.hxx
@@ -12,7 +12,7 @@
 
 #include 
 #include 
-#include 
+#include 
 
 #define LOK_USE_UNSTABLE_API
 #include 
@@ -55,9 +55,7 @@ public:
 , m_fZoomFactor(1)
 , m_nWidth(columns)
 , m_nHeight(rows)
-  {
-m_aTiles.resize(rows * columns);
-  }
+{  }
 
   ~TileBuffer() {}
 
@@ -69,7 +67,7 @@ private:
   LibreOfficeKitDocument *m_pLOKDocument;
   int m_nTileSize;
   float m_fZoomFactor;
-  std::vector m_aTiles;
+  std::map m_mTiles;
   //TODO: Also set width and height when document size changes
   int m_nWidth;
   int m_nHeight;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/gsoc-tiled-rendering' - libreofficekit/source

2015-06-03 Thread Pranav Kant
 libreofficekit/source/gtk/lokdocview.cxx |   32 +++
 libreofficekit/source/gtk/tilebuffer.hxx |8 +++
 2 files changed, 16 insertions(+), 24 deletions(-)

New commits:
commit 62074927bf1849169b2c84e0fae1fffcf0fff257
Author: Pranav Kant 
Date:   Thu Jun 4 01:16:11 2015 +0530

clean up; removed warnings

Change-Id: I38614726ca8e3127439faf79d491d9e5a336f962

diff --git a/libreofficekit/source/gtk/lokdocview.cxx 
b/libreofficekit/source/gtk/lokdocview.cxx
index b34a501..f476a23 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -66,11 +66,7 @@ void payloadToSize(const char* pPayload, long& rWidth, long& 
rHeight)
 struct LOKDocView_Impl
 {
 LOKDocView* m_pDocView;
-GtkWidget* m_pEventBox;
-GtkWidget* m_pTable;
-GtkWidget** m_pCanvas;
-GtkWidget *darea;
-
+GtkWidget *m_pDrawingArea;
 TileBuffer *m_pTileBuffer;
 
 float m_fZoom;
@@ -266,10 +262,7 @@ LOKDocView_Impl::CallbackData::CallbackData(int nType, 
const std::string& rPaylo
 
 LOKDocView_Impl::LOKDocView_Impl(LOKDocView* pDocView)
 : m_pDocView(pDocView),
-m_pEventBox(gtk_event_box_new()),
-darea(gtk_drawing_area_new()),
-m_pTable(0),
-m_pCanvas(0),
+m_pDrawingArea(gtk_drawing_area_new()),
 m_fZoom(1),
 m_pOffice(0),
 m_pDocument(0),
@@ -317,7 +310,7 @@ void LOKDocView_Impl::destroy(LOKDocView* pDocView, 
gpointer /*pData*/)
 delete pDocView->m_pImpl;
 }
 
-void LOKDocView_Impl::on_exposed(GtkWidget *widget, GdkEvent *event, gpointer 
userdata)
+void LOKDocView_Impl::on_exposed(GtkWidget* /*widget*/, GdkEvent* /*event*/, 
gpointer userdata)
 {
 LOKDocView *pDocView = LOK_DOCVIEW (userdata);
 pDocView->m_pImpl->renderDocument(0);
@@ -777,7 +770,7 @@ gboolean LOKDocView_Impl::handleTimeoutImpl()
 m_bCursorOverlayVisible = false;
 else
 m_bCursorOverlayVisible = true;
-gtk_widget_queue_draw(GTK_WIDGET(m_pEventBox));
+gtk_widget_queue_draw(GTK_WIDGET(m_pDrawingArea));
 }
 
 return G_SOURCE_CONTINUE;
@@ -794,8 +787,8 @@ void LOKDocView_Impl::renderDocument(GdkRectangle* pPartial)
 guint nRows = ceil((double)nDocumentHeightPixels / nTileSizePixels);
 guint nColumns = ceil((double)nDocumentWidthPixels / nTileSizePixels);
 
-gtk_widget_set_size_request(darea, nDocumentWidthPixels, 
nDocumentHeightPixels);
-cairo_t *pcairo = gdk_cairo_create(darea->window);
+gtk_widget_set_size_request(m_pDrawingArea, nDocumentWidthPixels, 
nDocumentHeightPixels);
+cairo_t *pcairo = gdk_cairo_create(m_pDrawingArea->window);
 
 // Render the tiles.
 for (guint nRow = 0; nRow < nRows; ++nRow)
@@ -832,7 +825,6 @@ void LOKDocView_Impl::renderDocument(GdkRectangle* pPartial)
 
 Tile& currentTile = m_pTileBuffer->tile_buffer_get_tile(nRow, 
nColumn);
 GdkPixbuf* pPixBuf = currentTile.tile_get_buffer();
-unsigned char* pBuffer = gdk_pixbuf_get_pixels(pPixBuf);
 
 gdk_cairo_set_source_pixbuf (pcairo, pPixBuf, 
twipToPixel(aTileRectangleTwips.x), twipToPixel(aTileRectangleTwips.y));
 cairo_paint(pcairo);
@@ -952,7 +944,7 @@ gboolean LOKDocView_Impl::callbackImpl(CallbackData* 
pCallback)
 {
 m_aVisibleCursor = 
LOKDocView_Impl::payloadToRectangle(pCallback->m_aPayload.c_str());
 m_bCursorOverlayVisible = true;
-gtk_widget_queue_draw(GTK_WIDGET(m_pEventBox));
+gtk_widget_queue_draw(GTK_WIDGET(m_pDrawingArea));
 }
 break;
 case LOK_CALLBACK_TEXT_SELECTION:
@@ -969,7 +961,7 @@ gboolean LOKDocView_Impl::callbackImpl(CallbackData* 
pCallback)
 }
 else
 memset(&m_aHandleMiddleRect, 0, sizeof(m_aHandleMiddleRect));
-gtk_widget_queue_draw(GTK_WIDGET(m_pEventBox));
+gtk_widget_queue_draw(GTK_WIDGET(m_pDrawingArea));
 }
 break;
 case LOK_CALLBACK_TEXT_SELECTION_START:
@@ -993,7 +985,7 @@ gboolean LOKDocView_Impl::callbackImpl(CallbackData* 
pCallback)
 m_aGraphicSelection = 
LOKDocView_Impl::payloadToRectangle(pCallback->m_aPayload.c_str());
 else
 memset(&m_aGraphicSelection, 0, sizeof(m_aGraphicSelection));
-gtk_widget_queue_draw(GTK_WIDGET(m_pEventBox));
+gtk_widget_queue_draw(GTK_WIDGET(m_pDrawingArea));
 }
 break;
 case LOK_CALLBACK_HYPERLINK_CLICKED:
@@ -1147,9 +1139,9 @@ static void lok_docview_init( GTypeInstance* pInstance, 
gpointer )
 
 pDocView->m_pImpl = new LOKDocView_Impl(pDocView);
 gtk_scrolled_window_add_with_viewport( GTK_SCROLLED_WINDOW(pDocView),
-   pDocView->m_pImpl->darea );
+   pDocView->m_pImpl->m_pDrawingArea );
 
-g_signal_connect(GTK_OBJECT(pDocView->m_pImpl->darea),
+g_signal_connect(GTK_OBJECT(pDocView->m_pImpl->m_pDrawingArea),
  "expose-event",
  

[Libreoffice-commits] core.git: Branch 'feature/gsoc-tiled-rendering' - libreofficekit/Library_libreofficekitgtk.mk libreofficekit/source

2015-06-03 Thread Pranav Kant
 libreofficekit/Library_libreofficekitgtk.mk |1 
 libreofficekit/source/gtk/lokdocview.cxx|   42 -
 libreofficekit/source/gtk/tilebuffer.cxx|   90 
 libreofficekit/source/gtk/tilebuffer.hxx|   78 
 4 files changed, 196 insertions(+), 15 deletions(-)

New commits:
commit 1858a2a30dcd75698af704a7ddf8fb12c89e8112
Author: Pranav Kant 
Date:   Thu Jun 4 00:06:46 2015 +0530

lokdocview: add tile buffering support

The TileBuffer class now manages all the tiles.

Change-Id: Ic667a93dcf1c097e0601c0496e8a083c4742e8cb

diff --git a/libreofficekit/Library_libreofficekitgtk.mk 
b/libreofficekit/Library_libreofficekitgtk.mk
index ff800d0..9240953 100644
--- a/libreofficekit/Library_libreofficekitgtk.mk
+++ b/libreofficekit/Library_libreofficekitgtk.mk
@@ -17,6 +17,7 @@ $(eval $(call gb_Library_use_externals,libreofficekitgtk,\
 
 $(eval $(call gb_Library_add_exception_objects,libreofficekitgtk,\
 libreofficekit/source/gtk/lokdocview \
+libreofficekit/source/gtk/tilebuffer \
 ))
 
 ifeq ($(OS),LINUX)
diff --git a/libreofficekit/source/gtk/lokdocview.cxx 
b/libreofficekit/source/gtk/lokdocview.cxx
index 676952c..b34a501 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -22,6 +22,8 @@
 #include 
 #include 
 
+#include "tilebuffer.hxx"
+
 #if !GLIB_CHECK_VERSION(2,32,0)
 #define G_SOURCE_REMOVE FALSE
 #define G_SOURCE_CONTINUE TRUE
@@ -37,6 +39,8 @@
 
 // We know that VirtualDevices use a DPI of 96.
 static const int DPI = 96;
+// Lets use a square of side 256 pixels.
+static const int nTileSizePixels = 256;
 
 namespace {
 
@@ -67,7 +71,7 @@ struct LOKDocView_Impl
 GtkWidget** m_pCanvas;
 GtkWidget *darea;
 
-TileBuffer *mTileBuffer;
+TileBuffer *m_pTileBuffer;
 
 float m_fZoom;
 
@@ -781,8 +785,6 @@ gboolean LOKDocView_Impl::handleTimeoutImpl()
 
 void LOKDocView_Impl::renderDocument(GdkRectangle* pPartial)
 {
-const int nTileSizePixels = 256;
-
 GdkRectangle visibleArea;
 lok_docview_get_visarea (m_pDocView, &visibleArea);
 
@@ -826,20 +828,11 @@ void LOKDocView_Impl::renderDocument(GdkRectangle* 
pPartial)
 
 if (bPaint)
 {
-// Index of the current tile.
-guint nTile = nRow * nColumns + nColumn;
+g_info("gettile: (%d %d)", nRow, nColumn);
 
-GdkPixbuf* pPixBuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 
8, aTileRectanglePixels.width, aTileRectanglePixels.height);
+Tile& currentTile = m_pTileBuffer->tile_buffer_get_tile(nRow, 
nColumn);
+GdkPixbuf* pPixBuf = currentTile.tile_get_buffer();
 unsigned char* pBuffer = gdk_pixbuf_get_pixels(pPixBuf);
-g_info("renderDocument: paintTile(%d, %d)", nRow, nColumn);
-m_pDocument->pClass->paintTile(m_pDocument,
-   // Buffer and its size, depends 
on the position only.
-   pBuffer,
-   aTileRectanglePixels.width, 
aTileRectanglePixels.height,
-   // Position of the tile.
-   aTileRectangleTwips.x, 
aTileRectangleTwips.y,
-   // Size of the tile, depends on 
the zoom factor and the tile position only.
-   aTileRectangleTwips.width, 
aTileRectangleTwips.height);
 
 gdk_cairo_set_source_pixbuf (pcairo, pPixBuf, 
twipToPixel(aTileRectangleTwips.x), twipToPixel(aTileRectangleTwips.y));
 cairo_paint(pcairo);
@@ -1218,6 +1211,18 @@ SAL_DLLPUBLIC_EXPORT gboolean lok_docview_open_document( 
LOKDocView* pDocView, c
 
pDocView->m_pImpl->m_pDocument->pClass->registerCallback(pDocView->m_pImpl->m_pDocument,
 &LOKDocView_Impl::callbackWorker, pDocView);
 
pDocView->m_pImpl->m_pDocument->pClass->getDocumentSize(pDocView->m_pImpl->m_pDocument,
 &pDocView->m_pImpl->m_nDocumentWidthTwips, 
&pDocView->m_pImpl->m_nDocumentHeightTwips);
 g_timeout_add(600, &LOKDocView_Impl::handleTimeout, pDocView);
+
+long nDocumentWidthTwips = pDocView->m_pImpl->m_nDocumentWidthTwips;
+long nDocumentHeightTwips = pDocView->m_pImpl->m_nDocumentHeightTwips;
+long nDocumentWidthPixels = 
pDocView->m_pImpl->twipToPixel(nDocumentWidthTwips);
+long nDocumentHeightPixels = 
pDocView->m_pImpl->twipToPixel(nDocumentHeightTwips);
+// Total number of rows / columns in this document.
+guint nRows = ceil((double)nDocumentHeightPixels / nTileSizePixels);
+guint nColumns = ceil((double)nDocumentWidthPixels / nTileSizePixels);
+pDocView->m_pImpl->m_pTileBuffer = new 
TileBuffer(pDocView->m_pImpl->m_pDocument,
+

Re: test infrastructure ideas appreciated ...

2015-06-03 Thread Terrence Enger
Thanks to Michael Meeks for asking for suggestions for test
infrastructure.

I suggest a bunch of virtual partitions provisioned with all the
world's freely available database engines.  This would enpower
interested testers to work on Base bugs without having to have the
database engine referenced in the bug report.

This idea has been floating around for years.  The wiki page
"User:Drew/baseQA VM"
 has not been
updated since 2011.

Terry.


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


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

2015-06-03 Thread Jan Holesovsky
 vcl/source/app/IconThemeSelector.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 816941f1396b79eba2dc3b46c6cffb53835ee923
Author: Jan Holesovsky 
Date:   Wed Jun 3 19:44:21 2015 +0200

OS X: Default to the 'breeze' icon theme.

As agreed in the Design team meeting today.

Change-Id: I660462fb7b56eb3c8f883f8540cf88801e48165c

diff --git a/vcl/source/app/IconThemeSelector.cxx 
b/vcl/source/app/IconThemeSelector.cxx
index 235ba1f..bed75fa 100644
--- a/vcl/source/app/IconThemeSelector.cxx
+++ b/vcl/source/app/IconThemeSelector.cxx
@@ -63,7 +63,7 @@ IconThemeSelector::GetIconThemeForDesktopEnvironment(const 
OUString& desktopEnvi
 r = "breeze";
 }
 else if ( desktopEnvironment.equalsIgnoreAsciiCase("MacOSX") ) {
-r = "sifr";
+r = "breeze";
 }
 else {
 r = FALLBACK_ICON_THEME_ID;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: help needed: hsqldb shutdown race condition, how to fix without deadlock

2015-06-03 Thread Robert Antoni Buj i Gelonch
Hi Lionel,

If you considered this, or if I'm wrong, please excuse me. ;-)

Regards,
Robert

2015-06-03 19:19 GMT+02:00 Robert Antoni Buj i Gelonch :

> Hi Lionel,
>
> I'm not sure if HSQLDB is not using reflection and, the concern code is
> not synchronized.
> Did you have that in mind?
>
> Regards,
> Robert
>
> --
> http://about.me/rbuj
>



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


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

2015-06-03 Thread Miklos Vajna
 sw/inc/dbmgr.hxx |   10 ++
 sw/inc/swdbdata.hxx  |6 +---
 sw/source/core/doc/doc.cxx   |9 --
 sw/source/core/doc/docfmt.cxx|1 
 sw/source/core/doc/docnew.cxx|5 +++
 sw/source/uibase/dbui/dbmgr.cxx  |   39 ---
 sw/source/uibase/uno/SwXDocumentSettings.cxx |   10 +++---
 7 files changed, 57 insertions(+), 23 deletions(-)

New commits:
commit d611b2e0b2b713ffaf8b2ec75e6a74180316f50b
Author: Miklos Vajna 
Date:   Wed Jun 3 19:11:57 2015 +0200

sw: add SwDBManager::RevokeDataSource()

And call it from the SwDoc dtor, so that embedded data source
definitions registered on opening are deregistered on close.

Change-Id: I40309389d44dcbc225f6f2ef98bb20579e12d650

diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx
index e397e57..657e957 100644
--- a/sw/inc/dbmgr.hxx
+++ b/sw/inc/dbmgr.hxx
@@ -376,6 +376,9 @@ public:
 /// Load the embedded data source of the document and also register it.
 void LoadAndRegisterEmbeddedDataSource(const SwDBData& rData, const 
SwDocShell& rDocShell);
 
+/// Unregister a data source.
+static void RevokeDataSource(const OUString& rName);
+
 /** try to get the data source from the given connection through the 
XChild interface.
 If this is not possible, the data source will be created through its 
name.
 @param _xConnection
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index ec44cb5..302ebef 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -540,6 +540,11 @@ SwDoc::~SwDoc()
 mpCharFormatTable->erase( mpCharFormatTable->begin() );
 
 #if HAVE_FEATURE_DBCONNECTIVITY
+// On load, SwDBManager::setEmbeddedName() may register a data source.
+// If we have an embedded one, then sDataSoure points to the registered 
name, so revoke it here.
+if (!mpDBManager->getEmbeddedName().isEmpty() && 
!maDBData.sDataSource.isEmpty())
+SwDBManager::RevokeDataSource(maDBData.sDataSource);
+
 DELETEZ( mpDBManager );
 #endif
 
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index b138730..d59d78b 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -2663,6 +2663,13 @@ OUString SwDBManager::LoadAndRegisterDataSource(const 
OUString &rURI, const OUSt
 return LoadAndRegisterDataSource( type, aURLAny, pSettings, rURI, pPrefix, 
pDestDir );
 }
 
+void SwDBManager::RevokeDataSource(const OUString& rName)
+{
+uno::Reference xDatabaseContext = 
sdb::DatabaseContext::create(comphelper::getProcessComponentContext());
+if (xDatabaseContext->hasByName(rName))
+xDatabaseContext->revokeObject(rName);
+}
+
 void SwDBManager::LoadAndRegisterEmbeddedDataSource(const SwDBData& rData, 
const SwDocShell& rDocShell)
 {
 uno::Reference xDatabaseContext = 
sdb::DatabaseContext::create(comphelper::getProcessComponentContext());
@@ -2673,8 +2680,7 @@ void SwDBManager::LoadAndRegisterEmbeddedDataSource(const 
SwDBData& rData, const
 if (sDataSource.isEmpty())
 sDataSource = "EmbeddedDatabase";
 
-if (xDatabaseContext->hasByName(rData.sDataSource))
-xDatabaseContext->revokeObject(rData.sDataSource);
+SwDBManager::RevokeDataSource(rData.sDataSource);
 
 // Encode the stream name and the real path into a single URL.
 const INetURLObject& rURLObject = rDocShell.GetMedium()->GetURLObject();
commit b79017f49a487a3981b1cd9f488ed5062eeb880b
Author: Miklos Vajna 
Date:   Wed Jun 3 18:54:08 2015 +0200

sw: move name of the embedded data source def from SwDBData to SwDBManager

The problem is that SwDBData just describes the current data source,
and when changing that, the embedded name doesn't change, so they should
be separate.

Change-Id: I2dd7e0a97b9f7d6a3a74a5752467515a0a09171a

diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx
index 27c86a7..e397e57 100644
--- a/sw/inc/dbmgr.hxx
+++ b/sw/inc/dbmgr.hxx
@@ -199,6 +199,8 @@ friend class SwConnectionDisposedListener_Impl;
 SwDSParamArraDataSourceParams;
 SwDBManager_Impl*pImpl;
 const SwXMailMerge* pMergeEvtSrc;   ///< != 0 if mail merge events are to 
be send
+/// Name of the embedded database that's included in the current document.
+OUString m_sEmbeddedName;
 
 SAL_DLLPRIVATE SwDSParam*  FindDSData(const SwDBData& rData, bool 
bCreate);
 SAL_DLLPRIVATE SwDSParam*  FindDSConnection(const OUString& 
rSource, bool bCreate);
@@ -372,7 +374,7 @@ public:
  const 
::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet > 
*pSettings = 0);
 
 /// Load the embedded data source of the document and also register it.
-static void LoadAndRegisterEmbeddedDataSource(const SwDBData& rData, const 
SwDocShell& rDocShell);
+

[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - 2 commits - icon-themes/tango svx/uiconfig

2015-06-03 Thread Yousuf Philips
 icon-themes/tango/cmd/lc_editheaderandfooter.png |binary
 icon-themes/tango/cmd/lc_outlinefont.png |binary
 icon-themes/tango/cmd/sc_outlinefont.png |binary
 svx/uiconfig/ui/sidebarparagraph.ui  |4 ++--
 4 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit b7f25b94f5e767438c20445e9936996e6cd8d721
Author: Yousuf Philips 
Date:   Tue Jun 2 13:40:45 2015 +0400

Fix indent button icons in impress/draw sidebar

Change-Id: Ib21c2489e1ff420e651e50a2731dfd3f16c9cef8
Reviewed-on: https://gerrit.libreoffice.org/16028
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit ed6b7d972bf1aee323947f22c6b5de430db4a9a5)
Reviewed-on: https://gerrit.libreoffice.org/16037
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/svx/uiconfig/ui/sidebarparagraph.ui 
b/svx/uiconfig/ui/sidebarparagraph.ui
index df0acc3..1338e9b 100644
--- a/svx/uiconfig/ui/sidebarparagraph.ui
+++ b/svx/uiconfig/ui/sidebarparagraph.ui
@@ -535,7 +535,7 @@
 False
 True
 Increase Indent
-.uno:Promote
+.uno:IncrementIndent
 True
   
   
@@ -549,7 +549,7 @@
 False
 True
 Decrease Indent
-.uno:Demote
+.uno:DecrementIndent
 True
   
   
commit 2159157d60da03ad0589ba8a2c8a18a63cd8e3c5
Author: Yousuf Philips 
Date:   Tue Jun 2 15:00:34 2015 +0400

TANGO: Fixing header icon and adding new outline icons

Change-Id: Id1368d1e0e5152e5e44b45a4717e8e0b8549f3a3
Reviewed-on: https://gerrit.libreoffice.org/16032
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/icon-themes/tango/cmd/lc_editheaderandfooter.png 
b/icon-themes/tango/cmd/lc_editheaderandfooter.png
index 02378f6..1be07bd 100644
Binary files a/icon-themes/tango/cmd/lc_editheaderandfooter.png and 
b/icon-themes/tango/cmd/lc_editheaderandfooter.png differ
diff --git a/icon-themes/tango/cmd/lc_outlinefont.png 
b/icon-themes/tango/cmd/lc_outlinefont.png
new file mode 100644
index 000..e25584b
Binary files /dev/null and b/icon-themes/tango/cmd/lc_outlinefont.png differ
diff --git a/icon-themes/tango/cmd/sc_outlinefont.png 
b/icon-themes/tango/cmd/sc_outlinefont.png
new file mode 100644
index 000..92b2307
Binary files /dev/null and b/icon-themes/tango/cmd/sc_outlinefont.png differ
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - editeng/source icon-themes/breeze icon-themes/crystal icon-themes/galaxy icon-themes/hicontrast icon-themes/human icon-themes/industrial icon

2015-06-03 Thread Katarina Behrens
 editeng/source/editeng/editdoc.cxx   |2 
 icon-themes/breeze/links.txt |4 +
 icon-themes/crystal/links.txt|4 +
 icon-themes/galaxy/links.txt |3 
 icon-themes/hicontrast/links.txt |4 +
 icon-themes/human/links.txt  |4 +
 icon-themes/industrial/links.txt |4 +
 icon-themes/oxygen/links.txt |4 +
 icon-themes/sifr/links.txt   |3 
 icon-themes/tango/links.txt  |3 
 icon-themes/tango_testing/links.txt  |4 +
 include/editeng/editids.hrc  |6 +
 include/svx/dialogs.hrc  |1 
 officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu |8 ++
 sd/sdi/_drvwsh.sdi   |5 +
 sd/sdi/drtxtob.sdi   |6 +
 sd/source/ui/app/sddll.cxx   |1 
 sd/uiconfig/sdraw/toolbar/textobjectbar.xml  |1 
 sd/uiconfig/simpress/toolbar/textobjectbar.xml   |1 
 svx/sdi/svx.sdi  |   25 
+++
 svx/sdi/svxitems.sdi |1 
 svx/source/sidebar/text/TextPropertyPanel.cxx|   19 
-
 svx/source/sidebar/text/TextPropertyPanel.hxx|1 
 svx/source/tbxctrls/tbcontrl.cxx |   18 
+
 svx/source/tbxctrls/tbcontrl.src |5 +
 svx/uiconfig/ui/sidebartextpanel.ui  |   33 
--
 26 files changed, 158 insertions(+), 12 deletions(-)

New commits:
commit c0e07bc592b7fe270514ae392eacb6ebde3df879
Author: Katarina Behrens 
Date:   Tue Jun 2 11:55:40 2015 +0200

tdf#88276: toolbar|sidebar button for text background colour

Change-Id: I547a562384d30b95b744673feb284ccbcf50a614
Reviewed-on: https://gerrit.libreoffice.org/16030
Reviewed-by: Jan Holesovsky 
Tested-by: Yousuf Philips 
Reviewed-by: Philippe Jung 
Reviewed-by: Yousuf Philips 

diff --git a/editeng/source/editeng/editdoc.cxx 
b/editeng/source/editeng/editdoc.cxx
index 6f447b9..ca6adb3 100644
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -211,7 +211,7 @@ const SfxItemInfo aItemInfos[EDITITEMCOUNT] = {
 { SID_ATTR_CHAR_OVERLINE, SfxItemPoolFlags::POOLABLE },
 { SID_ATTR_CHAR_CASEMAP, SfxItemPoolFlags::POOLABLE },   // 
EE_CHAR_CASEMAP
 { SID_ATTR_CHAR_GRABBAG, SfxItemPoolFlags::POOLABLE },   // 
EE_CHAR_GRABBAG
-{ 0, SfxItemPoolFlags::POOLABLE },   // 
EE_CHAR_BKGCOLOR
+{ SID_ATTR_CHAR_BACK_COLOR, SfxItemPoolFlags::POOLABLE },// 
EE_CHAR_BKGCOLOR
 { 0, SfxItemPoolFlags::POOLABLE },   // 
EE_FEATURE_TAB
 { 0, SfxItemPoolFlags::POOLABLE },   // 
EE_FEATURE_LINEBR
 { SID_ATTR_CHAR_CHARSETCOLOR, SfxItemPoolFlags::POOLABLE },  // 
EE_FEATURE_NOTCONV
diff --git a/icon-themes/breeze/links.txt b/icon-themes/breeze/links.txt
index dcc73b8..32d8aac 100644
--- a/icon-themes/breeze/links.txt
+++ b/icon-themes/breeze/links.txt
@@ -105,3 +105,7 @@ database/linked_text_table.png cmd/sc_dataimport.png
 #cmd/lc_undo.png cmd/he/lc_redo.png
 #cmd/sc_redo.png cmd/he/sc_undo.png
 #cmd/sc_undo.png cmd/he/sc_redo.png
+
+# text background colour Impress/Draw
+cmd/sc_charbackcolor.png cmd/sc_backcolor.png
+cmd/lc_charbackcolor.png cmd/lc_backcolor.png
diff --git a/icon-themes/crystal/links.txt b/icon-themes/crystal/links.txt
index 5c8bad3..3e7c8a7 100644
--- a/icon-themes/crystal/links.txt
+++ b/icon-themes/crystal/links.txt
@@ -4,3 +4,7 @@ cmd/lc_showsinglepage.png cmd/lc_adddirect.png
 # paragraph line spacing
 cmd/lc_linespacing.png cmd/lc_spacepara15.png
 cmd/sc_linespacing.png cmd/sc_spacepara15.png
+
+# text background colour Impress/Draw
+cmd/sc_charbackcolor.png cmd/sc_backcolor.png
+cmd/lc_charbackcolor.png cmd/lc_backcolor.png
diff --git a/icon-themes/galaxy/links.txt b/icon-themes/galaxy/links.txt
index 0a257a3..8825c9f 100644
--- a/icon-themes/galaxy/links.txt
+++ b/icon-themes/galaxy/links.txt
@@ -59,3 +59,6 @@ cmd/sc_formatselection.png 
sfx2/res/symphony/sidebar-property-small.png
 cmd/lc_view3d.png sfx2/res/symphony/sidebar-3d-large.png
 cmd/sc_view3d.png sfx2/res/symphony/sidebar-3d-small.png
 
+# text background colour Impress/Draw
+cmd/sc_charbackcolor.png cmd/sc_backcolor.png
+cmd/lc_charb

[Libreoffice-commits] core.git: Branch 'feature/owncloud-provider-for-android' - 8 commits - android/experimental configure.ac download.lst external/Module_external.mk external/owncloud-android-lib Ma

2015-06-03 Thread Jacobo Aragunde Pérez
Rebased ref, commits from common ancestor:
commit b31d175eb982a8c95e89d051e723cb843af2d1a0
Author: Jacobo Aragunde Pérez 
Date:   Tue Feb 10 16:17:12 2015 +

Android: improve error handling in ownCloud provider.

This provider now throws exceptions with properly internationalized
messages to be shown to the user.

Change-Id: I0464bffe14cab24d50180cb5e2e62ce746bcba74

diff --git a/android/experimental/LOAndroid3/res/values/strings.xml 
b/android/experimental/LOAndroid3/res/values/strings.xml
index 336b19b..135e52d 100644
--- a/android/experimental/LOAndroid3/res/values/strings.xml
+++ b/android/experimental/LOAndroid3/res/values/strings.xml
@@ -36,6 +36,10 @@
 Local file system
 ownCloud
 
+Cannot connect to ownCloud 
server. Check your configuration.
+Cannot log into ownCloud server. 
Check your configuration.
+Unspecified error connecting to 
ownCloud server. Check your configuration and/or try later.
+
 
 Storage provider settings
 ownCloud settings
diff --git 
a/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/owncloud/OwnCloudFile.java
 
b/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/owncloud/OwnCloudFile.java
index a8d1a06..ce10ab6 100644
--- 
a/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/owncloud/OwnCloudFile.java
+++ 
b/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/owncloud/OwnCloudFile.java
@@ -69,8 +69,7 @@ public class OwnCloudFile implements IFile {
 RemoteOperationResult result = refreshOperation.execute(provider
 .getClient());
 if (!result.isSuccess()) {
-throw new RuntimeException(result.getLogMessage(),
-result.getException());
+throw 
provider.buildRuntimeExceptionForResultCode(result.getCode());
 }
 for (Object obj : result.getData()) {
 RemoteFile child = (RemoteFile) obj;
@@ -104,7 +103,10 @@ public class OwnCloudFile implements IFile {
 File downFolder = provider.getCacheDir();
 DownloadRemoteFileOperation operation = new 
DownloadRemoteFileOperation(
 file.getRemotePath(), downFolder.getAbsolutePath());
-operation.execute(provider.getClient());
+RemoteOperationResult result = operation.execute(provider.getClient());
+if (!result.isSuccess()) {
+throw 
provider.buildRuntimeExceptionForResultCode(result.getCode());
+}
 return new File(downFolder.getAbsolutePath() + file.getRemotePath());
 }
 
diff --git 
a/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/owncloud/OwnCloudProvider.java
 
b/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/owncloud/OwnCloudProvider.java
index 827c0af..66e4633 100644
--- 
a/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/owncloud/OwnCloudProvider.java
+++ 
b/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/owncloud/OwnCloudProvider.java
@@ -18,6 +18,7 @@ import com.owncloud.android.lib.common.OwnCloudClient;
 import com.owncloud.android.lib.common.OwnCloudClientFactory;
 import com.owncloud.android.lib.common.OwnCloudCredentialsFactory;
 import com.owncloud.android.lib.common.operations.RemoteOperationResult;
+import 
com.owncloud.android.lib.common.operations.RemoteOperationResult.ResultCode;
 import com.owncloud.android.lib.resources.files.FileUtils;
 import com.owncloud.android.lib.resources.files.ReadRemoteFileOperation;
 import com.owncloud.android.lib.resources.files.RemoteFile;
@@ -78,8 +79,7 @@ public class OwnCloudProvider implements IDocumentProvider,
 uri.getPath());
 RemoteOperationResult result = refreshOperation.execute(client);
 if (!result.isSuccess()) {
-throw new RuntimeException(result.getLogMessage(),
-result.getException());
+throw buildRuntimeExceptionForResultCode(result.getCode());
 }
 if (result.getData().size() > 0) {
 return new OwnCloudFile(this, (RemoteFile) 
result.getData().get(0));
@@ -113,6 +113,29 @@ public class OwnCloudProvider implements IDocumentProvider,
 }
 
 /**
+ * Build the proper RuntimeException for some error result.
+ *
+ * @param code Result code got from some RemoteOperationResult.
+ * @return exception with the proper internationalized error message.
+ */
+protected RuntimeException buildRuntimeExceptionForResultCode(ResultCode 
code) {
+int errorMessage;
+switch (code) {
+case WRONG_CONNECTION:  // SocketException
+case FILE_NOT_FOUND:// HTTP 404
+errorMessage = R.string.owncloud_wrong_connection;
+break;
+case UNAUTHORIZED:  // wrong user/pass
+errorMessage = R.string.owncloud_unauthorized;
+break;
+default:
+

Re: help needed: hsqldb shutdown race condition, how to fix without deadlock

2015-06-03 Thread Robert Antoni Buj i Gelonch
Hi Lionel,

I'm not sure if HSQLDB is not using reflection and, the concern code is not
synchronized.
Did you have that in mind?

Regards,
Robert

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


[Libreoffice-commits] core.git: Branch 'feature/unitver' - external/udunits2 RepositoryExternal.mk

2015-06-03 Thread Andrzej Hunt
Rebased ref, commits from common ancestor:
commit e0d7de574cadaed45f6988281e14c1385adaa03f
Author: Andrzej Hunt 
Date:   Wed Jun 3 17:55:59 2015 +0100

Possibly fix udunits2 loading on OSX

Change-Id: I048d23d647a6d6f38efddc11f7d3bde3b583e752

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 2f633bd..2e3b1ec 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -177,7 +177,7 @@ $(call gb_LinkTarget_add_libs,$(1),\
 )
 else
 $(call gb_LinkTarget_add_libs,$(1),\
-   -L$(call gb_UnpackedTarball_get_dir,udunits2)/lib -ludunits2 \
+   -L$(call gb_UnpackedTarball_get_dir,udunits2)/lib/.libs -ludunits2 \
 )
 endif
 
diff --git a/external/udunits2/ExternalProject_udunits2.mk 
b/external/udunits2/ExternalProject_udunits2.mk
index ba6479e..ad0da50 100644
--- a/external/udunits2/ExternalProject_udunits2.mk
+++ b/external/udunits2/ExternalProject_udunits2.mk
@@ -24,6 +24,9 @@ $(call gb_ExternalProject_get_state_target,udunits2,build) : 
$(call gb_ExternalP
$(MAKE) libudunits2.la && \
mkdir udunits2 && \
cp udunits2.h udunits2/ \
+   $(if $(filter MACOSX,$(OS)),&& $(PERL) \
+   $(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl 
OOO \
+   
$(gb_Package_SOURCEDIR_udunits2)/lib/.libs/libudunits2.0.dylib) \
)
 
 $(call gb_ExternalProject_get_state_target,udunits2,configure) :
diff --git a/external/udunits2/UnpackedTarball_udunits2.mk 
b/external/udunits2/UnpackedTarball_udunits2.mk
index db096ca..820472e 100644
--- a/external/udunits2/UnpackedTarball_udunits2.mk
+++ b/external/udunits2/UnpackedTarball_udunits2.mk
@@ -11,4 +11,10 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,udunits2))
 
 $(eval $(call gb_UnpackedTarball_set_tarball,udunits2,$(UDUNITS2_TARBALL)))
 
+ifeq ($(OS),MACOSX)
+$(eval $(call gb_UnpackedTarball_add_patches,udunits2,\
+   external/udunits2/udunits2-macosx.patch.1 \
+))
+endif
+
 # vim: set noet sw=4 ts=4:
diff --git a/external/udunits2/udunits2-macosx.patch.1 
b/external/udunits2/udunits2-macosx.patch.1
new file mode 100644
index 000..8f5f207
--- /dev/null
+++ b/external/udunits2/udunits2-macosx.patch.1
@@ -0,0 +1,11 @@
+diff -ur udunits2.org/lib/Makefile.in udunits2/lib/Makefile.in
+--- udunits2.org/lib/Makefile.in   2015-06-03 17:51:56.955223787 +0100
 udunits2/lib/Makefile.in   2015-06-03 17:52:56.659947119 +0100
+@@ -94,6 +94,7 @@
+ libudunits2_la_OBJECTS = $(am_libudunits2_la_OBJECTS)
+ libudunits2_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+   $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
++  -install_name 
@__OOO/libudunits2.0.dylib \
+   $(libudunits2_la_LDFLAGS) $(LDFLAGS) -o $@
+ @ENABLE_UDUNITS_1_TRUE@@HAVE_CUNIT_TRUE@am__EXEEXT_1 =  \
+ @ENABLE_UDUNITS_1_TRUE@@HAVE_CUNIT_TRUE@  testUnits-1$(EXEEXT)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/unitver' - 2 commits - external/udunits2 RepositoryExternal.mk

2015-06-03 Thread Andrzej Hunt
Rebased ref, commits from common ancestor:
commit 869f0130f3fbab066ff03763099e59d83727f7ab
Author: Andrzej Hunt 
Date:   Wed Jun 3 17:26:38 2015 +0100

Possibly fix udunits2 loading on OSX

Change-Id: I048d23d647a6d6f38efddc11f7d3bde3b583e752

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 2f633bd..2e3b1ec 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -177,7 +177,7 @@ $(call gb_LinkTarget_add_libs,$(1),\
 )
 else
 $(call gb_LinkTarget_add_libs,$(1),\
-   -L$(call gb_UnpackedTarball_get_dir,udunits2)/lib -ludunits2 \
+   -L$(call gb_UnpackedTarball_get_dir,udunits2)/lib/.libs -ludunits2 \
 )
 endif
 
diff --git a/external/udunits2/ExternalProject_udunits2.mk 
b/external/udunits2/ExternalProject_udunits2.mk
index 2ff0187..ad0da50 100644
--- a/external/udunits2/ExternalProject_udunits2.mk
+++ b/external/udunits2/ExternalProject_udunits2.mk
@@ -26,7 +26,7 @@ $(call gb_ExternalProject_get_state_target,udunits2,build) : 
$(call gb_ExternalP
cp udunits2.h udunits2/ \
$(if $(filter MACOSX,$(OS)),&& $(PERL) \
$(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl 
OOO \
-   
$(gb_Package_SOURCEDIR_udunits2)/.libs/libudunits2.0.dylib) \
+   
$(gb_Package_SOURCEDIR_udunits2)/lib/.libs/libudunits2.0.dylib) \
)
 
 $(call gb_ExternalProject_get_state_target,udunits2,configure) :
commit 860576e8a77dbd946d8853f9e5f1e003299bd58e
Author: Andrzej Hunt 
Date:   Wed Jun 3 17:14:57 2015 +0100

Possibly fix udunits2 loading on OSX

Change-Id: I048d23d647a6d6f38efddc11f7d3bde3b583e752

diff --git a/external/udunits2/ExternalProject_udunits2.mk 
b/external/udunits2/ExternalProject_udunits2.mk
index ba6479e..2ff0187 100644
--- a/external/udunits2/ExternalProject_udunits2.mk
+++ b/external/udunits2/ExternalProject_udunits2.mk
@@ -24,6 +24,9 @@ $(call gb_ExternalProject_get_state_target,udunits2,build) : 
$(call gb_ExternalP
$(MAKE) libudunits2.la && \
mkdir udunits2 && \
cp udunits2.h udunits2/ \
+   $(if $(filter MACOSX,$(OS)),&& $(PERL) \
+   $(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl 
OOO \
+   
$(gb_Package_SOURCEDIR_udunits2)/.libs/libudunits2.0.dylib) \
)
 
 $(call gb_ExternalProject_get_state_target,udunits2,configure) :
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: [GSoC] Reuse Mozilla's rolling update mechanism for LibreOffice - Weekly Report 1

2015-06-03 Thread Wols Lists
On 01/06/15 17:59, Nathan Yee wrote:
> This is the week 1 progress report of the GSoC bug "Reuse Mozilla's
> rolling update mechanism for LibreOffice":
> 
Just chucking a minor wrench into the works ... I hope this has been
thought about but ... will (all) users be happy with rolling updates, in
particular on the database side.

There's some interesting debate on lwn in the recent article on the new
PostgreSQL release, and it points out that there's a wide choice of
browsers, so if Firefox breaks, users can always use Chrome, or
Konqueror, or whatever.

What alternatives are there to LibreOffice, should we accidentally roll
out a broken version? I know MS regularly ship broken updates, but we
don't want to bring a business to a halt because a bug in, say, Writer,
means that LO is effectively unusable ... ?

(I'm currently feeling this pain - I haven't got round to fixing
MySQL/MariaDB, which has busted my email setup - due I believe to an
upgrade ... :-(

This update mechanism needs to be EASY to enable/disable, not hidden in
a filing cabinet over on Alpha Centauri behind a message warning of
leopards ...

Cheers,
Wol

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


[Libreoffice-commits] core.git: Branch 'feature/unitver' - external/udunits2

2015-06-03 Thread Andrzej Hunt
Rebased ref, commits from common ancestor:
commit 8b75bd5c1f9ad2ff3981fd909d07855530d28c2c
Author: Andrzej Hunt 
Date:   Wed Jun 3 17:07:15 2015 +0100

Possibly fix udunits2 loading on OSX

Change-Id: I048d23d647a6d6f38efddc11f7d3bde3b583e752

diff --git a/external/udunits2/ExternalProject_udunits2.mk 
b/external/udunits2/ExternalProject_udunits2.mk
index ba6479e..0c7a7d7 100644
--- a/external/udunits2/ExternalProject_udunits2.mk
+++ b/external/udunits2/ExternalProject_udunits2.mk
@@ -21,9 +21,12 @@ $(eval $(call gb_ExternalProject_register_targets,udunits2,\
 $(call gb_ExternalProject_get_state_target,udunits2,build) : $(call 
gb_ExternalProject_get_state_target,udunits2,configure)
+$(call gb_ExternalProject_run,build,\
cd lib && \
-   $(MAKE) libudunits2.la && \
+   $(MAKE) libudunits2.la \
mkdir udunits2 && \
cp udunits2.h udunits2/ \
+   $(if $(filter MACOSX,$(OS)),&& $(PERL) \
+   $(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl 
OOO \
+   
$(gb_Package_SOURCEDIR_udunits2)/.lib/libudunits2.0.dylib) \
)
 
 $(call gb_ExternalProject_get_state_target,udunits2,configure) :
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 7 commits - vcl/opengl

2015-06-03 Thread Markus Mohrhard
 vcl/opengl/win/WinDeviceInfo.cxx |  229 +--
 vcl/opengl/x11/X11DeviceInfo.cxx |  114 ---
 2 files changed, 222 insertions(+), 121 deletions(-)

New commits:
commit 1096ca46a23fc4df30865c243e10881157fe4840
Author: Markus Mohrhard 
Date:   Wed Jun 3 17:44:24 2015 +0200

more style fixes

Change-Id: Iadf157f3d2673047e2d81c74847b16d12478ca65

diff --git a/vcl/opengl/x11/X11DeviceInfo.cxx b/vcl/opengl/x11/X11DeviceInfo.cxx
index e896f05..f60f9c1 100644
--- a/vcl/opengl/x11/X11DeviceInfo.cxx
+++ b/vcl/opengl/x11/X11DeviceInfo.cxx
@@ -66,14 +66,17 @@ char* strtok_wrapper(const char* aDelims, char** aStr)
 
 char* ret = const_cast(strspnp_wrapper(aDelims, *aStr));
 
-if (!*ret) {
+if (!*ret)
+{
 *aStr = ret;
 return nullptr;
 }
 
 char* i = ret;
-do {
-for (const char* d = aDelims; *d != '\0'; ++d) {
+do
+{
+for (const char* d = aDelims; *d != '\0'; ++d)
+{
 if (*i == *d) {
 *i = '\0';
 *aStr = ++i;
commit 5ebc2673cc3337d4e6656abdfb5e18ac169d3cbd
Author: Markus Mohrhard 
Date:   Wed Jun 3 17:39:10 2015 +0200

that is not a TODO anymore, we actually block OpenGL in RDP connections

Change-Id: I782e93e6106b3940e7e83c615072beebca1c0965

diff --git a/vcl/opengl/win/WinDeviceInfo.cxx b/vcl/opengl/win/WinDeviceInfo.cxx
index 86672fe..151476d 100644
--- a/vcl/opengl/win/WinDeviceInfo.cxx
+++ b/vcl/opengl/win/WinDeviceInfo.cxx
@@ -793,7 +793,7 @@ void WinOpenGLDeviceInfo::GetData()
 if (maDeviceID.isEmpty() &&
 maDeviceString == "RDPUDD Chained DD")
 {
-// TODO: moggi: we need to block RDP as it does not provide OpenGL 2.1+
+// we need to block RDP as it does not provide OpenGL 2.1+
 mbRDP = true;
 SAL_WARN("vcl.opengl", "RDP => blocked");
 return;
commit 4d1faeec4513ee602dc1daafaebc1c4212819a7a
Author: Markus Mohrhard 
Date:   Wed Jun 3 17:36:40 2015 +0200

fix comment

Change-Id: I1d6fc43447c3c98e21d1d0752aa621c9ab2a92a7

diff --git a/vcl/opengl/win/WinDeviceInfo.cxx b/vcl/opengl/win/WinDeviceInfo.cxx
index ac7911c..86672fe 100644
--- a/vcl/opengl/win/WinDeviceInfo.cxx
+++ b/vcl/opengl/win/WinDeviceInfo.cxx
@@ -86,11 +86,11 @@ void GetDLLVersion(const sal_Unicode* aDLLPath, OUString& 
aVersion)
 }
 
 /*
-*  * Compute the length of an array with constant length.  (Use of this method
-*   * with a non-array pointer will not compile.)
-**
-* * Beware of the implicit trailing '\0' when using this with string 
constants.
-*  */
+ * Compute the length of an array with constant length.  (Use of this method
+ * with a non-array pointer will not compile.)
+ *
+ * Beware of the implicit trailing '\0' when using this with string constants.
+*/
 template
 size_t ArrayLength(T (&aArr)[N])
 {
commit 2d06511010ea800e62c076c2583d72eccc795691
Author: Markus Mohrhard 
Date:   Wed Jun 3 17:35:44 2015 +0200

document that these are references to mozilla bugs

Change-Id: Ie84924ee77805ce4b4f6d5a7e77213ce2d51877f

diff --git a/vcl/opengl/win/WinDeviceInfo.cxx b/vcl/opengl/win/WinDeviceInfo.cxx
index 7e80390..ac7911c 100644
--- a/vcl/opengl/win/WinDeviceInfo.cxx
+++ b/vcl/opengl/win/WinDeviceInfo.cxx
@@ -1001,7 +1001,7 @@ void WinOpenGLDeviceInfo::GetData()
 mbHasDriverVersionMismatch = false;
 if (maAdapterVendorID == GetDeviceVendor(wgl::VendorIntel))
 {
-// we've had big crashers (bugs 590373 and 595364) apparently 
correlated
+// we've had big crashers (moz#590373 and moz#595364) apparently 
correlated
 // with bad Intel driver installations where the DriverVersion reported
 // by the registry was not the version of the DLL.
 OUString aDLLFileName("igd10umd32.dll");
@@ -1031,8 +1031,6 @@ void WinOpenGLDeviceInfo::GetData()
 }
 }
 
-
-
 // Macro for assigning a device vendor id to a string.
 #define DECLARE_VENDOR_ID(name, deviceId) \
 case name: \
@@ -1102,7 +1100,7 @@ void WinOpenGLDeviceInfo::FillBlacklist()
 wgl::DRIVER_LESS_THAN, wgl::V(8,62,0,0), "9.6" );
 
 /*
- * Bug 783517 - crashes in AMD driver on Windows 8
+ * moz#783517 - crashes in AMD driver on Windows 8
  */
 APPEND_TO_DRIVER_BLOCKLIST_RANGE( wgl::DRIVER_OS_WINDOWS_8,
 GetDeviceVendor(wgl::VendorATI), wgl::DriverInfo::allDevices,
@@ -1113,8 +,8 @@ void WinOpenGLDeviceInfo::FillBlacklist()
 
 /* OpenGL on any ATI/AMD hardware is discouraged
  * See:
- *  bug 619773 - WebGL: Crash with blue screen : "NMI: Parity Check / 
Memory Parity Error"
- *  bugs 584403, 584404, 620924 - crashes in atioglxx
+ *  bug moz#619773 - WebGL: Crash with blue screen : "NMI: Parity Check / 
Memory Parity Error"
+ *  bugs moz#584403, moz#584404, moz#620924 - crashes in atioglxx
  *  + many complaints about incorrect rendering
  */
 APPEND_TO_DRIVER_BLOCKLIST2( wgl::DRI

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

2015-06-03 Thread Krisztian Pinter
 sc/source/ui/view/gridwin4.cxx |3 ++-
 sc/source/ui/view/output.cxx   |   11 ++-
 2 files changed, 8 insertions(+), 6 deletions(-)

New commits:
commit 682d5eab3068a7889590b86120a6cfdec87f6d1f
Author: Krisztian Pinter 
Date:   Fri May 29 20:03:33 2015 +0100

calc mapmode: Refactor DrawDocumentBackground to use logic units

Change-Id: I316e51bac78981263bfbee55ea5b684a40b44afa

diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index bfda05a..de54116 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -718,9 +718,10 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, 
const ScTableInfo& rTableI
 else
 aOutputData.SetSolidBackground(true);
 
-pContentDev->SetMapMode(MAP_PIXEL);
 aOutputData.DrawDocumentBackground();
 
+pContentDev->SetMapMode(MAP_PIXEL);
+
 if ( bGridFirst && ( bGrid || bPage ) )
 aOutputData.DrawGrid( bGrid, bPage );
 
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 9dfc3b7..4b33d2e 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -767,13 +767,14 @@ void ScOutputData::DrawDocumentBackground()
 if ( !bSolidBackground )
 return;
 
-Size aOnePixel = mpDev->PixelToLogic(Size(1,1));
-long nOneX = aOnePixel.Width();
-long nOneY = aOnePixel.Height();
-Rectangle aRect(nScrX - nOneX, nScrY - nOneY, nScrX + nScrW, nScrY + 
nScrH);
 Color aBgColor( 
SC_MOD()->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor );
+mpDev->SetLineColor(aBgColor);
 mpDev->SetFillColor(aBgColor);
-mpDev->DrawRect(aRect);
+
+Point aScreenPos  = mpDev->PixelToLogic(Point(nScrX, nScrY));
+Size  aScreenSize = mpDev->PixelToLogic(Size(nScrW - 1,nScrH - 1));
+
+mpDev->DrawRect(Rectangle(aScreenPos, aScreenSize));
 }
 
 namespace {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: help needed: hsqldb shutdown race condition, how to fix without deadlock

2015-06-03 Thread Lionel Elie Mamane
On Wed, Jun 03, 2015 at 03:01:39PM +0200, Michael Stahl wrote:
> On 03.06.2015 14:47, Lionel Elie Mamane wrote:

>> Since the problem is essentially that the two threads take the same mutexes
>> in different order, here is a dirty hack that forces the hsqldb thread
>> to take the "affine bridge" mutex before taking the "HSQL driver"
>> mutex.

> i'm not entirely sure this is sensible...

Thinking the issue from yet another angle, if we go back to the
situation at the start of this thread (hsqldb is *not* affine). I
don't understand why the
connectivity::hsqldb::ODriverDelegator::disposing thread holds the
affine lock, and goes through the affine bridge:

#6  0x2b4ff40b8342 in connectivity::hsqldb::ODriverDelegator::disposing 
(this=0x1ca1cf0, Source=...)
at 
/home/master/src/libreoffice/workdirs/libreoffice-5-1/connectivity/source/drivers/hsqldb/HDriver.cxx:566
(...)
#13 0x2b4ff45f5f4b in AffineBridge::outerDispatch 
(this=this@entry=0x1ca77b0, loop=loop@entry=1)
at 
/home/master/src/libreoffice/workdirs/libreoffice-5-1/cppu/source/AffineBridge/AffineBridge.cxx:201
#14 0x2b4ff45f6186 in AffineBridge::v_callInto_v (this=0x1ca77b0, 
pCallee=0x2b4fd23f9dda ,
pParam=0x2b4fecb5d3c0)
at 
/home/master/src/libreoffice/workdirs/libreoffice-5-1/cppu/source/AffineBridge/AffineBridge.cxx:270
(...)
#26 0x2b4ff47fdccc in Proxy::dispatch (this=this@entry=0x1cb3ac0,
pReturnTypeRef=pReturnTypeRef@entry=0x8ce880, 
pParams=pParams@entry=0x20789e0, nParams=nParams@entry=0,
pMemberType=pMemberType@entry=0x236b4c0, 
pReturn=pReturn@entry=0x2b4fecb5dd90, pArgs=0x2b4fecb5d9a0,
ppException=0x2b4fecb5da30)
at 
/home/master/src/libreoffice/workdirs/libreoffice-5-1/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx:445
#27 0x2b4ff47fcc7d in s_Proxy_dispatch (pUnoI=0x1cb3ac0, 
pMemberType=0x236b4c0, pReturn=0x2b4fecb5dd90,
pArgs=0x2b4fecb5d9a0, ppException=0x2b4fecb5da30)
at 
/home/master/src/libreoffice/workdirs/libreoffice-5-1/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx:170
(...)
#32 0x2b4fe831ac12 in privateSnippetExecutor ()
   from 
/home/master/src/libreoffice/workdirs/libreoffice-5-1/instdir/program/libgcc3_uno.so
#33 0x2b4fecd6e866 in dbaccess::OConnection::disposing (this=0x2058670)
at 
/home/master/src/libreoffice/workdirs/libreoffice-5-1/dbaccess/source/core/dataaccess/connection.cxx:492


Why does the call from dbaccess::OConnection::disposing into
connectivity::hsqldb::ODriverDelegator::disposing go through the
affine bridge?


> a component is (in general) responsible for its own thread safety, and
> should not make assumptions about how other components are implemented,
> in particular wrt. locking.

The hsqldb module is in great part a wrapper around the jdbc module,
so I'm not too worried about hsqldb "knowing too much" about the jdbc
module.

Alternatively, is there any way to force the hsqldb module to run in
the same thread as the jdbc module?

> this implies that if a component takes a lock, it must release the
> lock before calling a method that could end up calling into a
> different component, to avoid deadlock.

This sounds very restrictive. Essentially, you are saying that a
method from class A in component CA cannot protect itself from being
called "reentrantively" (or another method being called on the same
object) if it has to call a method of an object B from component CB
that is a member of class A:

class A
{
private:

mutex m_aMutex;
B m_aB0;
B m_aB1;

public:

void foo()
{
   MutexGuard(m_aMutex);
   m_aB1 = m_aB0;
   m_aB0.non_const_method();
}

void bar()
{
   MutexGuard(m_aMutex);
   m_aB0 = m_aB1;
   m_aB1.other_non_const_method();
}
}

How do you suggest this is made thread-safe without holding m_aMutex?
foo() and bar() need to be mutually exclusive, else the results can
differ. Even assuming B::operator=, B::other_non_const_method and
B::non_const_method are thread-safe, one could have interleaved
execution of foo() and bar():

  m_aB0 = m_aB1;
  m_aB1 = m_aB0;
  m_aB0.non_const_method();
  m_aB1.other_non_const_method();

which is the same as:

  m_aB0 = m_aB1;
  m_aB0.non_const_method();
  m_aB1.other_non_const_method();


which gives a different result than:

  m_aB0 = m_aB1;
  m_aB0.non_const_method();
  m_aB1 = m_aB0;
  m_aB1.other_non_const_method();

or

  m_aB1 = m_aB0;
  m_aB1.other_non_const_method();
  m_aB0 = m_aB1;
  m_aB0.non_const_method();

> secondly, those components which run inside the ":affine" purpose
> environment can only be called from a single thread, so they do not
> need a mutex of their own.

Yeah, hsqldb has no good reason to be affine, except to work around
the issue. Yes, its own mutex is redundant with being affine.


>  there may be multiple re-entrant calls into the apartment, where
> the affine component calls out into a different component (which is
> bridged to a thread that is different from both the original c

[Libreoffice-commits] core.git: Branch 'feature/gsoc-tiled-rendering' - libreofficekit/source

2015-06-03 Thread Pranav Kant
 libreofficekit/source/gtk/lokdocview.cxx |   77 ---
 1 file changed, 30 insertions(+), 47 deletions(-)

New commits:
commit 8792f68a0dcc57b216a042b0faa1af08c838c7f3
Author: Pranav Kant 
Date:   Wed Jun 3 20:52:49 2015 +0530

lokdocview: use GtkDrawingArea for drawing tiles

Change-Id: I1a3d8a9229f416418f0f3e9c720b78af09b35978

diff --git a/libreofficekit/source/gtk/lokdocview.cxx 
b/libreofficekit/source/gtk/lokdocview.cxx
index a766b8a..676952c 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -65,6 +65,9 @@ struct LOKDocView_Impl
 GtkWidget* m_pEventBox;
 GtkWidget* m_pTable;
 GtkWidget** m_pCanvas;
+GtkWidget *darea;
+
+TileBuffer *mTileBuffer;
 
 float m_fZoom;
 
@@ -140,6 +143,8 @@ struct LOKDocView_Impl
 ~LOKDocView_Impl();
 /// Connected to the destroy signal of LOKDocView, deletes its 
LOKDocView_Impl.
 static void destroy(LOKDocView* pDocView, gpointer pData);
+/// Connected to the expose-event of the GtkDrawingArea
+static void on_exposed(GtkWidget *widget, GdkEvent *event, gpointer 
user_data);
 /// Converts from screen pixels to document coordinates.
 float pixelToTwip(float fInput);
 /// Converts from document coordinates to screen pixels.
@@ -258,6 +263,7 @@ LOKDocView_Impl::CallbackData::CallbackData(int nType, 
const std::string& rPaylo
 LOKDocView_Impl::LOKDocView_Impl(LOKDocView* pDocView)
 : m_pDocView(pDocView),
 m_pEventBox(gtk_event_box_new()),
+darea(gtk_drawing_area_new()),
 m_pTable(0),
 m_pCanvas(0),
 m_fZoom(1),
@@ -307,6 +313,12 @@ void LOKDocView_Impl::destroy(LOKDocView* pDocView, 
gpointer /*pData*/)
 delete pDocView->m_pImpl;
 }
 
+void LOKDocView_Impl::on_exposed(GtkWidget *widget, GdkEvent *event, gpointer 
userdata)
+{
+LOKDocView *pDocView = LOK_DOCVIEW (userdata);
+pDocView->m_pImpl->renderDocument(0);
+}
+
 float LOKDocView_Impl::pixelToTwip(float fInput)
 {
 return (fInput / DPI / m_fZoom) * 1440.0f;
@@ -771,40 +783,17 @@ void LOKDocView_Impl::renderDocument(GdkRectangle* 
pPartial)
 {
 const int nTileSizePixels = 256;
 
+GdkRectangle visibleArea;
+lok_docview_get_visarea (m_pDocView, &visibleArea);
+
 long nDocumentWidthPixels = twipToPixel(m_nDocumentWidthTwips);
 long nDocumentHeightPixels = twipToPixel(m_nDocumentHeightTwips);
 // Total number of rows / columns in this document.
 guint nRows = ceil((double)nDocumentHeightPixels / nTileSizePixels);
 guint nColumns = ceil((double)nDocumentWidthPixels / nTileSizePixels);
 
-// Set up our table and the tile pointers.
-if (!m_pTable)
-pPartial = 0;
-if (pPartial)
-{
-// Same as nRows / nColumns, but from the previous renderDocument() 
call.
-guint nOldRows, nOldColumns;
-
-#if GTK_CHECK_VERSION(2,22,0)
-gtk_table_get_size(GTK_TABLE(m_pTable), &nOldRows, &nOldColumns);
-if (nOldRows != nRows || nOldColumns != nColumns)
-// Can't do partial rendering, document size changed.
-pPartial = 0;
-#else
-pPartial = 0;
-#endif
-}
-if (!pPartial)
-{
-if (m_pTable)
-gtk_container_remove(GTK_CONTAINER(m_pEventBox), m_pTable);
-m_pTable = gtk_table_new(nRows, nColumns, FALSE);
-gtk_container_add(GTK_CONTAINER(m_pEventBox), m_pTable);
-gtk_widget_show(m_pTable);
-if (m_pCanvas)
-g_free(m_pCanvas);
-m_pCanvas = static_cast(g_malloc0(sizeof(GtkWidget*) * 
nRows * nColumns));
-}
+gtk_widget_set_size_request(darea, nDocumentWidthPixels, 
nDocumentHeightPixels);
+cairo_t *pcairo = gdk_cairo_create(darea->window);
 
 // Render the tiles.
 for (guint nRow = 0; nRow < nRows; ++nRow)
@@ -830,7 +819,10 @@ void LOKDocView_Impl::renderDocument(GdkRectangle* 
pPartial)
 aTileRectangleTwips.width = 
pixelToTwip(aTileRectanglePixels.width);
 aTileRectangleTwips.height = 
pixelToTwip(aTileRectanglePixels.height);
 if (pPartial && !gdk_rectangle_intersect(pPartial, 
&aTileRectangleTwips, 0))
-bPaint = false;
+bPaint = false;
+
+if (!gdk_rectangle_intersect(&visibleArea, &aTileRectangleTwips, 
0))
+bPaint = false;
 
 if (bPaint)
 {
@@ -849,21 +841,16 @@ void LOKDocView_Impl::renderDocument(GdkRectangle* 
pPartial)
// Size of the tile, depends on 
the zoom factor and the tile position only.
aTileRectangleTwips.width, 
aTileRectangleTwips.height);
 
-if (m_pCanvas[nTile])
-gtk_widget_destroy(GTK_WIDGET(m_pCanvas[nTile]));
-m_pCanvas[nTile] = gtk_image_new();
-gtk_image_set_from_pixbuf(GTK_IMAGE(m_pCanvas[nTile]), 
pPixBuf);
-g_object_unref(G_OBJECT(

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

2015-06-03 Thread Caolán McNamara
 svx/source/sdr/attribute/sdrtextattribute.cxx |   13 ++---
 sw/source/core/layout/layact.cxx  |1 +
 2 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 9eb16c85d6af4b73de9a75716c3ff34f929f26b2
Author: Caolán McNamara 
Date:   Wed Jun 3 14:15:03 2015 +0100

don't crash on layout of ooo55381-1.sxw

The pLay here is getting joined and thus deleted in a stack of
FormatLayoutTabs so set it as unjoinable for the duration that
we expect pLay to remain valid

Change-Id: Iedfaf710022ad19c0f415cee84f70c74dd7dbd96

diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index fa4c289..c06706e 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -1393,6 +1393,7 @@ bool SwLayAction::FormatLayout( SwLayoutFrm *pLay, bool 
bAddRect )
 if ( pLay->IsFootnoteFrm() ) // no LayFrms as Lower
 return bChanged;
 
+FlowFrmJoinLockGuard aJoinGuard(pLay);
 SwFrm *pLow = pLay->Lower();
 bool bTabChanged = false;
 while ( pLow && pLow->GetUpper() == pLay )
commit 768a2d61c3b0a71fef0d9d732ae83938fe24633e
Author: Caolán McNamara 
Date:   Tue Jun 2 20:37:04 2015 +0100

coverity#1302605 Resource leak in object

Change-Id: I574714c2d587ac22fcc812ffe8217f151ac40cb6

diff --git a/svx/source/sdr/attribute/sdrtextattribute.cxx 
b/svx/source/sdr/attribute/sdrtextattribute.cxx
index 45b55fb..ddd1ce1 100644
--- a/svx/source/sdr/attribute/sdrtextattribute.cxx
+++ b/svx/source/sdr/attribute/sdrtextattribute.cxx
@@ -38,7 +38,7 @@ namespace drawinglayer
 // all-text attributes. The SdrText itself and a copy
 // of the OPO
 const SdrText*  mpSdrText;
-const OutlinerParaObject*   mpOutlinerParaObject;
+std::shared_ptr mxOutlinerParaObject;
 
 // Set when it's a FormText; contains all FormText attributes
 SdrFormTextAttributemaSdrFormTextAttribute;
@@ -88,7 +88,7 @@ namespace drawinglayer
 bool bFixedCellHeight,
 bool bWrongSpell)
 :   mpSdrText(pSdrText),
-mpOutlinerParaObject(new 
OutlinerParaObject(rOutlinerParaObject)),
+mxOutlinerParaObject(new 
OutlinerParaObject(rOutlinerParaObject)),
 maSdrFormTextAttribute(),
 maTextLeftDistance(aTextLeftDistance),
 maTextUpperDistance(aTextUpperDistance),
@@ -125,7 +125,6 @@ namespace drawinglayer
 
 ImpSdrTextAttribute()
 :   mpSdrText(0),
-mpOutlinerParaObject(0),
 maSdrFormTextAttribute(),
 maTextLeftDistance(0),
 maTextUpperDistance(0),
@@ -155,8 +154,8 @@ namespace drawinglayer
 
 const OutlinerParaObject& getOutlinerParaObject() const
 {
-assert(mpOutlinerParaObject && "Access to OutlinerParaObject 
of default version of ImpSdrTextAttribute (!)");
-return *mpOutlinerParaObject;
+assert(mxOutlinerParaObject && "Access to OutlinerParaObject 
of default version of ImpSdrTextAttribute (!)");
+return *mxOutlinerParaObject;
 }
 
 bool isContour() const { return mbContour; }
@@ -180,9 +179,9 @@ namespace drawinglayer
 // compare operator
 bool operator==(const ImpSdrTextAttribute& rCandidate) const
 {
-if(mpOutlinerParaObject != rCandidate.mpOutlinerParaObject)
+if (mxOutlinerParaObject.get() != 
rCandidate.mxOutlinerParaObject.get())
 {
-if(mpOutlinerParaObject && rCandidate.mpOutlinerParaObject)
+if (mxOutlinerParaObject && 
rCandidate.mxOutlinerParaObject)
 {
 // compares OPO and it's contents, but traditionally 
not the RedLining
 // which is not seen as model, but as temporary 
information
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/unitver' - external/udunits2

2015-06-03 Thread Andrzej Hunt
 external/udunits2/ExternalProject_udunits2.mk |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit a07e4dfa9ddf3fbc4400418102db6c4c399b781a
Author: Andrzej Hunt 
Date:   Wed Jun 3 16:07:53 2015 +0100

Possibly fix udunits2 loading on OSX

Change-Id: I048d23d647a6d6f38efddc11f7d3bde3b583e752

diff --git a/external/udunits2/ExternalProject_udunits2.mk 
b/external/udunits2/ExternalProject_udunits2.mk
index ba6479e..f5a05c0 100644
--- a/external/udunits2/ExternalProject_udunits2.mk
+++ b/external/udunits2/ExternalProject_udunits2.mk
@@ -21,7 +21,10 @@ $(eval $(call gb_ExternalProject_register_targets,udunits2,\
 $(call gb_ExternalProject_get_state_target,udunits2,build) : $(call 
gb_ExternalProject_get_state_target,udunits2,configure)
+$(call gb_ExternalProject_run,build,\
cd lib && \
-   $(MAKE) libudunits2.la && \
+   $(MAKE) libudunits2.la \
+   $(if $(filter MACOSX,$(OS)),&& $(PERL) \
+   $(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl 
OOO \
+   
$(gb_Package_SOURCEDIR_udunits2)/lib/.lib/libudunits2.0.dylib) && \
mkdir udunits2 && \
cp udunits2.h udunits2/ \
)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-06-03 Thread Philippe Jung
 sd/source/ui/inc/ToolBarManager.hxx  |1 +
 sd/source/ui/view/ToolBarManager.cxx |9 ++---
 sd/source/ui/view/drviews1.cxx   |   24 
 3 files changed, 23 insertions(+), 11 deletions(-)

New commits:
commit 1191ed8584f9fd63c39514dd2e3e71682913d4bc
Author: Philippe Jung 
Date:   Wed Jun 3 16:28:02 2015 +0200

tdf#87822 Impress: hide common task toolbar in master view

When Master Slide or Master Notes are active,
hides the Common task toolbar as it it not usefull.

Change-Id: Ice07661bf203c029d733614e1eceb5ef3d0661f9
Reviewed-on: https://gerrit.libreoffice.org/16060
Reviewed-by: Yousuf Philips 
Tested-by: Yousuf Philips 

diff --git a/sd/source/ui/inc/ToolBarManager.hxx 
b/sd/source/ui/inc/ToolBarManager.hxx
index b5b9f80..5263dd0 100644
--- a/sd/source/ui/inc/ToolBarManager.hxx
+++ b/sd/source/ui/inc/ToolBarManager.hxx
@@ -126,6 +126,7 @@ public:
 
 TBG_PERMANENT = TBG__FIRST,
 TBG_FUNCTION,
+TBG_COMMON_TASK,
 TBG_MASTER_MODE,
 
 TBG__LAST = TBG_MASTER_MODE
diff --git a/sd/source/ui/view/ToolBarManager.cxx 
b/sd/source/ui/view/ToolBarManager.cxx
index 403230c..9e59223 100644
--- a/sd/source/ui/view/ToolBarManager.cxx
+++ b/sd/source/ui/view/ToolBarManager.cxx
@@ -1001,9 +1001,6 @@ void ToolBarRules::MainViewShellChanged 
(ViewShell::ShellType nShellType)
 ToolBarManager::msOptionsToolBar);
 mpToolBarManager->AddToolBar(
 ToolBarManager::TBG_PERMANENT,
-ToolBarManager::msCommonTaskToolBar);
-mpToolBarManager->AddToolBar(
-ToolBarManager::TBG_PERMANENT,
 ToolBarManager::msViewerToolBar);
 break;
 
@@ -1065,10 +1062,16 @@ void ToolBarRules::MainViewShellChanged (const 
ViewShell& rMainViewShell)
 const DrawViewShell* pDrawViewShell
 = dynamic_cast(&rMainViewShell);
 if (pDrawViewShell != NULL)
+{
 if (pDrawViewShell->GetEditMode() == EM_MASTERPAGE)
 mpToolBarManager->AddToolBar(
 ToolBarManager::TBG_MASTER_MODE,
 ToolBarManager::msMasterViewToolBar);
+else
+mpToolBarManager->AddToolBar(
+ToolBarManager::TBG_COMMON_TASK,
+ToolBarManager::msCommonTaskToolBar);
+}
 break;
 }
 
diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx
index 9aa19da..109d82c 100644
--- a/sd/source/ui/view/drviews1.cxx
+++ b/sd/source/ui/view/drviews1.cxx
@@ -363,14 +363,18 @@ void DrawViewShell::ChangeEditMode(EditMode eEMode, bool 
bIsLayerModeActive)
 // view.
 bool bShowMasterViewToolbar (meEditMode == EM_MASTERPAGE
  && GetShellType() != ViewShell::ST_HANDOUT);
+bool bShowPresentationToolbar (meEditMode != EM_MASTERPAGE
+ && GetShellType() != ViewShell::ST_HANDOUT);
 
 // If the master view toolbar is not shown we hide it before
 // switching the edit mode.
 if (::sd::ViewShell::mpImpl->mbIsInitialized
-&& IsMainViewShell()
-&& ! bShowMasterViewToolbar)
+&& IsMainViewShell())
 {
-
GetViewShellBase().GetToolBarManager()->ResetToolBars(ToolBarManager::TBG_MASTER_MODE);
+if ( !bShowMasterViewToolbar )
+
GetViewShellBase().GetToolBarManager()->ResetToolBars(ToolBarManager::TBG_MASTER_MODE);
+if ( !bShowPresentationToolbar )
+
GetViewShellBase().GetToolBarManager()->ResetToolBars(ToolBarManager::TBG_COMMON_TASK);
 }
 
 if (meEditMode == EM_PAGE)
@@ -441,12 +445,16 @@ void DrawViewShell::ChangeEditMode(EditMode eEMode, bool 
bIsLayerModeActive)
 // If the master view toolbar is to be shown we turn it on after the
 // edit mode has been changed.
 if (::sd::ViewShell::mpImpl->mbIsInitialized
-&& IsMainViewShell()
-&& bShowMasterViewToolbar)
+&& IsMainViewShell())
 {
-GetViewShellBase().GetToolBarManager()->SetToolBar(
-ToolBarManager::TBG_MASTER_MODE,
-ToolBarManager::msMasterViewToolBar);
+if (bShowMasterViewToolbar)
+GetViewShellBase().GetToolBarManager()->SetToolBar(
+ToolBarManager::TBG_MASTER_MODE,
+ToolBarManager::msMasterViewToolBar);
+if (bShowPresentationToolbar)
+GetViewShellBase().GetToolBarManager()->SetToolBar(
+ToolBarManager::TBG_COMMON_TASK,
+ToolBarManager::msCommonTaskToolBar);
 }
 
 if ( ! mbIsLayerModeActive)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/li

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

2015-06-03 Thread Andrzej Hunt
 sc/source/core/units/unitsimpl.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8144a4cf6d1ca4e80699e54ebc05c81fabab6e71
Author: Andrzej Hunt 
Date:   Wed Jun 3 15:58:29 2015 +0100

Don't assert on unsupported opcode, return unknown instead

We should eventually support all opcodes, but crashing* isn't
really the correct response if not.

*or continuing with completely wrong behvaiour in non-debug builds.

Change-Id: I22d7746f4e809bdc3da62b8b6f741216504b3f22

diff --git a/sc/source/core/units/unitsimpl.cxx 
b/sc/source/core/units/unitsimpl.cxx
index c440df6..66f5019 100644
--- a/sc/source/core/units/unitsimpl.cxx
+++ b/sc/source/core/units/unitsimpl.cxx
@@ -162,7 +162,7 @@ UnitsResult UnitsImpl::getOutputUnitsForOpCode(stack< 
RAUSItem >& rStack, const
 break;
 default:
 SAL_INFO("sc.units", "unit verification not supported for opcode: 
" << nOpCode);
-assert(false);
+return { FormulaStatus::UNKNOWN, boost::none };
 }
 } else if (nOpCode >= SC_OPCODE_START_2_PAR &&
nOpCode < SC_OPCODE_STOP_2_PAR) {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-06-03 Thread Caolán McNamara
 sw/qa/extras/ooxmlexport/data/ooo39845-7.odt  |binary
 sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx |7 +++
 sw/source/filter/ww8/docxattributeoutput.cxx  |6 +++---
 3 files changed, 10 insertions(+), 3 deletions(-)

New commits:
commit 77df4faa4783df38383020a6236136a88eb51069
Author: Caolán McNamara 
Date:   Wed Jun 3 15:20:13 2015 +0100

fix crash on export of ooo39845-7.sxw to .docx

only bump m_nFieldsInHyperlink if the field isn't erased
from the stack

Change-Id: Idb75d087f6fa3ce3cd399623d8ace1e7f3899b5c

diff --git a/sw/qa/extras/ooxmlexport/data/ooo39845-7.odt 
b/sw/qa/extras/ooxmlexport/data/ooo39845-7.odt
new file mode 100644
index 000..ee8d139
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/ooo39845-7.odt differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
index 5e18937..f702fa9 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
@@ -677,6 +677,13 @@ DECLARE_OOXMLEXPORT_TEST(testOO34469, "ooo34469-1.odt")
 assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:hyperlink[1]", 
"anchor", "2.9.2.Creating New files|outline");
 }
 
+DECLARE_OOXMLEXPORT_TEST(testOO39845, "ooo39845-7.odt")
+{
+if (xmlDocPtr pXmlDoc = parseExport())
+assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:hyperlink[1]", 
"anchor", "Figure4|graphic");
+}
+
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 25eec02..aecd1d1 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1058,9 +1058,6 @@ void DocxAttributeOutput::EndRun()
 {
 StartField_Impl( *pIt );
 
-if (m_startedHyperlink)
-++m_nFieldsInHyperlink;
-
 // Remove the field from the stack if only the start has to be 
written
 // Unknown fields should be removed too
 if ( !pIt->bClose || ( pIt->eType == ww::eUNKNOWN ) )
@@ -1069,6 +1066,9 @@ void DocxAttributeOutput::EndRun()
 continue;
 }
 
+if (m_startedHyperlink)
+++m_nFieldsInHyperlink;
+
 if ( m_pHyperlinkAttrList )
 {
 m_nFieldsInHyperlink++;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: URP: queryInterface request message with unknown OID received

2015-06-03 Thread Lionel Elie Mamane
On Tue, Jun 02, 2015 at 02:32:14PM +0200, Lionel Elie Mamane wrote:
> On Mon, Jun 01, 2015 at 11:54:05AM +0200, Lionel Elie Mamane wrote:
>> On Mon, Jun 01, 2015 at 09:55:19AM +0200, Stephan Bergmann wrote:

>>> The UNO remote protocol represents each UNO object with a unique OID string.
>>> The error means that one end of a remote connection sent a queryInterface
>>> request with a OID representing an object that the other end claims it does
>>> not know about.  Which sounds like a scary bug somewhere.  Any way to
>>> reproduce that?

> Well, I ran it many other times (on another machine), and it is
> definitely happens with some (even several) "@Test" commented out, and
> even in the absence of the "uncaught exception from other thread"
> phenomenon. The magic mix seems to be having at least both
> testRowSet() and testRowSetEvents() active.

After solving/working around the deadlock mentioned in the other
thread, I launched this JunitTest in an infinite loop with:

@Test
public void testRowSet() throws java.lang.Exception
@Test
public void testDeleteBehavior() throws Exception

and all other "@Test" commented out.

On the 53rd (!) run, I got this problem again.

warn:binaryurp:29740:6:binaryurp/source/reader.cxx:123: caught UNO exception 
'URP: queryInterface request message with unknown OID received'

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


[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - 4 commits - i18npool/CustomTarget_localedata.mk i18npool/source

2015-06-03 Thread Eike Rathke
 i18npool/CustomTarget_localedata.mk|2 +-
 i18npool/source/localedata/LocaleNode.cxx  |   16 
 i18npool/source/localedata/data/bg_BG.xml  |1 +
 i18npool/source/localedata/data/locale.dtd |6 --
 i18npool/source/localedata/data/tt_RU.xml  |1 +
 5 files changed, 23 insertions(+), 3 deletions(-)

New commits:
commit 7695e2eb2e4f62cb09e06512ffc44796dc975fe4
Author: Eike Rathke 
Date:   Wed Jun 3 15:43:01 2015 +0200

reflect requirement of one abbreviated DateAcceptancePattern in 
documentation

Change-Id: I2593606f3c82eeb9e04be469c20ffb4132cc4f2c
(cherry picked from commit 8fbb45c978327a3047a84c59978a07bdc19a66dd)

diff --git a/i18npool/source/localedata/data/locale.dtd 
b/i18npool/source/localedata/data/locale.dtd
index f0f90ac..99f0778 100644
--- a/i18npool/source/localedata/data/locale.dtd
+++ b/i18npool/source/localedata/data/locale.dtd
@@ -172,8 +172,10 @@
 
  For each locale one pattern that matches a full date is automatically
  generated from FormatElement formatIndex="21" and does not need to be
- defined, for example "M/D/Y" or "D.M.Y", so only if you want abbreviations
- to be in effect add some patterns.
+ defined, for example "M/D/Y" or "D.M.Y".
+
+ At least one pattern for abbreviated date input must be defined, i.e.
+ contain D and M but not Y.
 
  NOTE: use only single letter D,M,Y. Multiple patterns can be defined.
 -->
commit acf8946a5eea8bfb44817709b37dee171abb67e3
Author: Eike Rathke 
Date:   Wed Jun 3 15:37:59 2015 +0200

ensure that at least one abbreviated DateAcceptancePattern is present

Change-Id: I30619fc9f894dda89cd1c84153abcb21214a5fbc
(cherry picked from commit 6df46d63e4397a0eb799149dab56a4c38b940e99)

diff --git a/i18npool/source/localedata/LocaleNode.cxx 
b/i18npool/source/localedata/LocaleNode.cxx
index 07f7d10..8ef4149 100644
--- a/i18npool/source/localedata/LocaleNode.cxx
+++ b/i18npool/source/localedata/LocaleNode.cxx
@@ -896,6 +896,22 @@ void LCFormatNode::generateCode (const OFileWriter &of) 
const
 // LC_FORMAT, not in optional LC_FORMAT_1
 if (mnSection == 0)
 {
+// At least one abbreviated date acceptance pattern must be present.
+if (theDateAcceptancePatterns.empty())
+incError( "No DateAcceptancePattern present.\n");
+else
+{
+bool bHaveAbbr = false;
+for (::std::vector< OUString >::const_iterator it( 
theDateAcceptancePatterns.begin());
+!bHaveAbbr && it != theDateAcceptancePatterns.end(); ++it)
+{
+if ((*it).indexOf('D') > -1 && (*it).indexOf('M') > -1 && 
(*it).indexOf('Y') <= -1)
+bHaveAbbr = true;
+}
+if (!bHaveAbbr)
+incError( "No abbreviated DateAcceptancePattern present. For 
example M/D or D.M.\n");
+}
+
 // 0..47 MUST be present, 48,49 MUST NOT be present
 ValueSet::const_iterator aIter( aFormatIndexSet.begin());
 for (sal_Int16 nNext = cssi::NumberFormatIndex::NUMBER_START;
commit 12a5ed16718365fb9328ac4b399a41f219d4f3d2
Author: Eike Rathke 
Date:   Wed Jun 3 15:35:47 2015 +0200

add missing DateAcceptancePattern for abbreviated date input

Change-Id: I5ac712604204c4cbbce4d1ec3a591fb9f158c6f8
(cherry picked from commit c681c4ca956bfa4a3235c5ae97a745a107f4e4ce)

diff --git a/i18npool/source/localedata/data/bg_BG.xml 
b/i18npool/source/localedata/data/bg_BG.xml
index b66fdf3..926876f 100644
--- a/i18npool/source/localedata/data/bg_BG.xml
+++ b/i18npool/source/localedata/data/bg_BG.xml
@@ -56,6 +56,7 @@
 D.M.Y г.
 D.M.Y Г.
 D.M.Y Г.
+D.M.
 
   General
 
diff --git a/i18npool/source/localedata/data/tt_RU.xml 
b/i18npool/source/localedata/data/tt_RU.xml
index 74bdc10..488e11c 100644
--- a/i18npool/source/localedata/data/tt_RU.xml
+++ b/i18npool/source/localedata/data/tt_RU.xml
@@ -52,6 +52,7 @@
 metric
 
 
+  D.M.
 
 Standard
 
commit 95c567d926647b7fd71e34d3435f01cd759d4e51
Author: Eike Rathke 
Date:   Wed Jun 3 15:19:00 2015 +0200

Revert "make saxparser deps order-only"

This reverts commit 49d8bc1dcce4c662d85d894567501205f94f678d.

If saxparser changed, specifically if
i18npool/source/localedata/LocaleNode.cxx was modified, we actually want
all .cxx regenerated from locale data and not silently skip all.

Conflicts:
i18npool/CustomTarget_localedata.mk

Change-Id: I3a1b0ed0dab12148ee34653cdfac593001d2ecf7
(cherry picked from commit 657524656fdc381ff217011ff025d3d24b79d026)

diff --git a/i18npool/CustomTarget_localedata.mk 
b/i18npool/CustomTarget_localedata.mk
index f455fd5..481b3ee 100644
--- a/i18npool/CustomTarget_localedata.mk
+++ b/i18npool/CustomTarget_localedata.mk
@@ -18,7 +18,7 @@ $(eval $(call 
gb_CustomTarget_register_targets,i18npool/localedata,\
 define i18npool_LD_RULE
 $(ca

[Libreoffice-commits] core.git: 4 commits - i18npool/CustomTarget_localedata.mk i18npool/source

2015-06-03 Thread Eike Rathke
 i18npool/CustomTarget_localedata.mk|2 +-
 i18npool/source/localedata/LocaleNode.cxx  |   16 
 i18npool/source/localedata/data/bg_BG.xml  |1 +
 i18npool/source/localedata/data/locale.dtd |6 --
 i18npool/source/localedata/data/tt_RU.xml  |1 +
 5 files changed, 23 insertions(+), 3 deletions(-)

New commits:
commit 8fbb45c978327a3047a84c59978a07bdc19a66dd
Author: Eike Rathke 
Date:   Wed Jun 3 15:43:01 2015 +0200

reflect requirement of one abbreviated DateAcceptancePattern in 
documentation

Change-Id: I2593606f3c82eeb9e04be469c20ffb4132cc4f2c

diff --git a/i18npool/source/localedata/data/locale.dtd 
b/i18npool/source/localedata/data/locale.dtd
index f0f90ac..99f0778 100644
--- a/i18npool/source/localedata/data/locale.dtd
+++ b/i18npool/source/localedata/data/locale.dtd
@@ -172,8 +172,10 @@
 
  For each locale one pattern that matches a full date is automatically
  generated from FormatElement formatIndex="21" and does not need to be
- defined, for example "M/D/Y" or "D.M.Y", so only if you want abbreviations
- to be in effect add some patterns.
+ defined, for example "M/D/Y" or "D.M.Y".
+
+ At least one pattern for abbreviated date input must be defined, i.e.
+ contain D and M but not Y.
 
  NOTE: use only single letter D,M,Y. Multiple patterns can be defined.
 -->
commit 6df46d63e4397a0eb799149dab56a4c38b940e99
Author: Eike Rathke 
Date:   Wed Jun 3 15:37:59 2015 +0200

ensure that at least one abbreviated DateAcceptancePattern is present

Change-Id: I30619fc9f894dda89cd1c84153abcb21214a5fbc

diff --git a/i18npool/source/localedata/LocaleNode.cxx 
b/i18npool/source/localedata/LocaleNode.cxx
index 3b07bb7..d088dbe 100644
--- a/i18npool/source/localedata/LocaleNode.cxx
+++ b/i18npool/source/localedata/LocaleNode.cxx
@@ -896,6 +896,22 @@ void LCFormatNode::generateCode (const OFileWriter &of) 
const
 // LC_FORMAT, not in optional LC_FORMAT_1
 if (mnSection == 0)
 {
+// At least one abbreviated date acceptance pattern must be present.
+if (theDateAcceptancePatterns.empty())
+incError( "No DateAcceptancePattern present.\n");
+else
+{
+bool bHaveAbbr = false;
+for (::std::vector< OUString >::const_iterator it( 
theDateAcceptancePatterns.begin());
+!bHaveAbbr && it != theDateAcceptancePatterns.end(); ++it)
+{
+if ((*it).indexOf('D') > -1 && (*it).indexOf('M') > -1 && 
(*it).indexOf('Y') <= -1)
+bHaveAbbr = true;
+}
+if (!bHaveAbbr)
+incError( "No abbreviated DateAcceptancePattern present. For 
example M/D or D.M.\n");
+}
+
 // 0..47 MUST be present, 48,49 MUST NOT be present
 ValueSet::const_iterator aIter( aFormatIndexSet.begin());
 for (sal_Int16 nNext = cssi::NumberFormatIndex::NUMBER_START;
commit c681c4ca956bfa4a3235c5ae97a745a107f4e4ce
Author: Eike Rathke 
Date:   Wed Jun 3 15:35:47 2015 +0200

add missing DateAcceptancePattern for abbreviated date input

Change-Id: I5ac712604204c4cbbce4d1ec3a591fb9f158c6f8

diff --git a/i18npool/source/localedata/data/bg_BG.xml 
b/i18npool/source/localedata/data/bg_BG.xml
index b66fdf3..926876f 100644
--- a/i18npool/source/localedata/data/bg_BG.xml
+++ b/i18npool/source/localedata/data/bg_BG.xml
@@ -56,6 +56,7 @@
 D.M.Y г.
 D.M.Y Г.
 D.M.Y Г.
+D.M.
 
   General
 
diff --git a/i18npool/source/localedata/data/tt_RU.xml 
b/i18npool/source/localedata/data/tt_RU.xml
index 74bdc10..488e11c 100644
--- a/i18npool/source/localedata/data/tt_RU.xml
+++ b/i18npool/source/localedata/data/tt_RU.xml
@@ -52,6 +52,7 @@
 metric
 
 
+  D.M.
 
 Standard
 
commit 657524656fdc381ff217011ff025d3d24b79d026
Author: Eike Rathke 
Date:   Wed Jun 3 15:19:00 2015 +0200

Revert "make saxparser deps order-only"

This reverts commit 49d8bc1dcce4c662d85d894567501205f94f678d.

If saxparser changed, specifically if
i18npool/source/localedata/LocaleNode.cxx was modified, we actually want
all .cxx regenerated from locale data and not silently skip all.

Conflicts:
i18npool/CustomTarget_localedata.mk

Change-Id: I3a1b0ed0dab12148ee34653cdfac593001d2ecf7

diff --git a/i18npool/CustomTarget_localedata.mk 
b/i18npool/CustomTarget_localedata.mk
index f455fd5..481b3ee 100644
--- a/i18npool/CustomTarget_localedata.mk
+++ b/i18npool/CustomTarget_localedata.mk
@@ -18,7 +18,7 @@ $(eval $(call 
gb_CustomTarget_register_targets,i18npool/localedata,\
 define i18npool_LD_RULE
 $(call gb_CustomTarget_get_workdir,i18npool/localedata)/localedata_$(1).cxx : \
$(SRCDIR)/i18npool/source/localedata/data/$(1).xml \
-   | $(call gb_Executable_get_runtime_dependencies,saxparser)
+   $(call gb_Executable_get_runtime_dependencies,saxparser)

Re: test infrastructure ideas appreciated ...

2015-06-03 Thread Robert Antoni Buj i Gelonch
We could add an automatic validation test for checking the discovery of
dynamic library dependencies on OS X & Linux.

   - OS X: otool -L file
   - Linux: ldd file


2015-06-03 15:33 GMT+02:00 Michael Meeks :

> Hi guys,
>
> The ESC are interested in improving unit (and other automated)
> testing
> and are interested in concrete ideas for implementing new automated
> tests to prevent regressions. We hope to turn this into a proposal for
> the Board, which if approved -could- turn into a tender to fund more
> work in this area. Having said that writing unit tests is every
> developers' responsibility where feasible - so this ask focuses on new
> infrastructure.
>
> It is noticeable that where there are existing tests &
> infrastructure,
> new tests are easier to create and often there are more of them - so are
> there places where we should work to create infrastructure ?
>
> Is there something we can improve by throwing hardware at it ? as
> we
> have done for the crash-testing; if so what hardware is needed ?
>
> Is there a large area of code that is completely un-tested or
> under-tested that you'd love us to invest in making test-able ?
>
> Is there a test that currently only runs in an obscure setup /
> corner-case that we can invest in standardizing and making more easy to
> use ?
>
> Constructive thoughts appreciated in reply here.
>
> ATB,
>
> Michael.
>
> --
>  michael.me...@collabora.com  <><, Pseudo Engineer, itinerant idiot
>
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
>



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


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

2015-06-03 Thread Miklos Vajna
 sw/source/uibase/dbui/dbmgr.cxx |5 -
 1 file changed, 5 deletions(-)

New commits:
commit cf7439c5510578572b30a92a52549b5babfa93d9
Author: Miklos Vajna 
Date:   Wed Jun 3 15:17:22 2015 +0200

SwDBManager: store of embedded data source definition is implemented

Since commit 290cc96e98c8d66396402f9be51739646b1eafa7 (SwDBManager:
refer embedded data source from doc settings, 2015-06-02).

Change-Id: Iaf261d31ad00541b40e2fa8c35d60bd6768dbbcd

diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index db84bae..fd57164 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -2518,11 +2518,6 @@ OUString lcl_getOwnURL(SwDocShell* pDocShell)
 {
 OUString aRet;
 
-// Experimental till load/store of embedded data source definition is not 
fully implemented.
-static bool bEmbed = 
officecfg::Office::Common::Misc::ExperimentalMode::get();
-if (!bEmbed)
-return aRet;
-
 if (!pDocShell)
 return aRet;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


test infrastructure ideas appreciated ...

2015-06-03 Thread Michael Meeks
Hi guys,

The ESC are interested in improving unit (and other automated) testing
and are interested in concrete ideas for implementing new automated
tests to prevent regressions. We hope to turn this into a proposal for
the Board, which if approved -could- turn into a tender to fund more
work in this area. Having said that writing unit tests is every
developers' responsibility where feasible - so this ask focuses on new
infrastructure.

It is noticeable that where there are existing tests & infrastructure,
new tests are easier to create and often there are more of them - so are
there places where we should work to create infrastructure ?

Is there something we can improve by throwing hardware at it ? as we
have done for the crash-testing; if so what hardware is needed ?

Is there a large area of code that is completely un-tested or
under-tested that you'd love us to invest in making test-able ?

Is there a test that currently only runs in an obscure setup /
corner-case that we can invest in standardizing and making more easy to
use ?

Constructive thoughts appreciated in reply here.

ATB,

Michael.

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

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


[Libreoffice-commits] core.git: config_host/config_extension_update.h.in config_host.mk.in configure.ac desktop/source scp2/source

2015-06-03 Thread Katarina Behrens
 config_host.mk.in|1 +
 config_host/config_extension_update.h.in |6 ++
 configure.ac |   22 ++
 desktop/source/deployment/gui/dp_gui_dialog2.cxx |   11 +--
 desktop/source/deployment/gui/dp_gui_dialog2.hxx |2 ++
 scp2/source/ooo/common_brand.scp |6 +-
 6 files changed, 45 insertions(+), 3 deletions(-)

New commits:
commit 793db97a7cd4ca93b7106deb95f55e451679b189
Author: Katarina Behrens 
Date:   Tue Jun 2 11:13:44 2015 +0200

Build time option --disable-extension-update

to disable the possibility to update installed extensions

Change-Id: Ifdee0f3b13ee3e2bcb288c8ded98cb9805a6e55a

diff --git a/config_host.mk.in b/config_host.mk.in
index ffb2deb..e0e01e3 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -156,6 +156,7 @@ export ENABLE_MEDIAWIKI=@ENABLE_MEDIAWIKI@
 export ENABLE_MARIADBC=@ENABLE_MARIADBC@
 export ENABLE_NPAPI_FROM_BROWSER=@ENABLE_NPAPI_FROM_BROWSER@
 export ENABLE_ONLINE_UPDATE=@ENABLE_ONLINE_UPDATE@
+export ENABLE_EXTENSION_UPDATE=@ENABLE_EXTENSION_UPDATE@
 export ENABLE_OOENV=@ENABLE_OOENV@
 export ENABLE_OPENGL=@ENABLE_OPENGL@
 export ENABLE_OPENGL_CANVAS=@ENABLE_OPENGL_CANVAS@
diff --git a/config_host/config_extension_update.h.in 
b/config_host/config_extension_update.h.in
new file mode 100644
index 000..5e12a78
--- /dev/null
+++ b/config_host/config_extension_update.h.in
@@ -0,0 +1,6 @@
+#ifndef CONFIG_EXTENSION_UPDATE
+#define CONFIG_EXTENSION_UPDATE
+
+#define ENABLE_EXTENSION_UPDATE 0
+
+#endif
diff --git a/configure.ac b/configure.ac
index ed3823e..85bbd22 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1318,6 +1318,11 @@ AC_ARG_ENABLE(online-update,
  LibreOffice. By default, it is enabled on Windows and Mac, disabled 
on Linux.]),
 ,)
 
+AC_ARG_ENABLE(extension-update,
+AS_HELP_STRING([--disable-extension-update],
+[Disable possibility to update installed extensions.]),
+,)
+
 AC_ARG_ENABLE(release-build,
 AS_HELP_STRING([--enable-release-build],
 [Enable release build.
@@ -11738,6 +11743,22 @@ fi
 AC_SUBST(ENABLE_ONLINE_UPDATE)
 
 dnl ===
+dnl Test whether to enable extension update
+dnl ===
+AC_MSG_CHECKING([whether to enable extension update])
+ENABLE_EXTENSION_UPDATE=
+if test "x$enable_extension_update" = "xno"; then
+AC_MSG_RESULT([no])
+else
+AC_MSG_RESULT([yes])
+ENABLE_EXTENSION_UPDATE="TRUE"
+AC_DEFINE(ENABLE_EXTENSION_UPDATE)
+SCPDEFS="$SCPDEFS -DENABLE_EXTENSION_UPDATE"
+fi
+AC_SUBST(ENABLE_EXTENSION_UPDATE)
+
+
+dnl ===
 dnl Test whether to create MSI with LIMITUI=1 (silent install)
 dnl ===
 AC_MSG_CHECKING([whether to create MSI with LIMITUI=1 (silent install)])
@@ -12983,6 +13004,7 @@ AC_CONFIG_FILES([config_host.mk
 AC_CONFIG_HEADERS([config_host/config_buildid.h])
 AC_CONFIG_HEADERS([config_host/config_clang.h])
 AC_CONFIG_HEADERS([config_host/config_eot.h])
+AC_CONFIG_HEADERS([config_host/config_extension_update.h])
 AC_CONFIG_HEADERS([config_host/config_cairo_canvas.h])
 AC_CONFIG_HEADERS([config_host/config_cups.h])
 AC_CONFIG_HEADERS([config_host/config_features.h])
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx 
b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 92b802f..fb98cdd 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -364,7 +364,9 @@ MENU_COMMAND ExtBoxWithBtns_Impl::ShowPopupMenu( const 
Point & rPos, const long
 
 PopupMenu aPopup;
 
+#if ENABLE_EXTENSION_UPDATE
 aPopup.InsertItem( CMD_UPDATE, DialogHelper::getResourceString( 
RID_CTX_ITEM_CHECK_UPDATE ) );
+#endif
 
 if ( ! GetEntryData( nPos )->m_bLocked )
 {
@@ -700,7 +702,6 @@ ExtMgrDialog::ExtMgrDialog(vcl::Window *pParent, 
TheExtensionManager *pManager,
 m_pAddBtn->SetClickHdl( LINK( this, ExtMgrDialog, HandleAddBtn ) );
 m_pCloseBtn->SetClickHdl( LINK( this, ExtMgrDialog, HandleCloseBtn ) );
 
-m_pUpdateBtn->SetClickHdl( LINK( this, ExtMgrDialog, HandleUpdateBtn ) );
 m_pGetExtensions->SetClickHdl( LINK( this, ExtMgrDialog, HandleHyperlink ) 
);
 m_pCancelBtn->SetClickHdl( LINK( this, ExtMgrDialog, HandleCancelBtn ) );
 
@@ -714,7 +715,12 @@ ExtMgrDialog::ExtMgrDialog(vcl::Window *pParent, 
TheExtensionManager *pManager,
 
 m_pProgressBar->Hide();
 
+#if ENABLE_EXTENSION_UPDATE
+m_pUpdateBtn->SetClickHdl( LINK( this, ExtMgrDialog, HandleUpdateBtn ) );
 m_pUpdateBtn->Enable(false);
+#else
+m_pUpdateBtn->Hide();
+#endif
 
 m_aIdle.SetPriority(SchedulerPriority::LOWEST);
 m_aIdle.SetIdleHdl( LINK( this, ExtMgrDialog, TimeOutHdl ) );
@@ -1075,8 +1081,9 @@ IMPL_LINK_NO

[Bug 91831] sharing gcc / UNO bridges code ...

2015-06-03 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=91831

Michael Stahl  changed:

   What|Removed |Added

 CC||libreoffice@lists.freedeskt
   ||op.org

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.4' - 34 commits - basic/inc basic/source drawinglayer/source editeng/source external/curl filter/source i18npool/source include/editeng in

2015-06-03 Thread Caolán McNamara
 basic/inc/pch/precompiled_sb.hxx  |2 
 basic/source/runtime/methods.cxx  |   46 
 drawinglayer/source/attribute/fillgradientattribute.cxx   |4 
 drawinglayer/source/attribute/fillgraphicattribute.cxx|4 
 drawinglayer/source/attribute/fillhatchattribute.cxx  |4 
 drawinglayer/source/attribute/lineattribute.cxx   |4 
 drawinglayer/source/attribute/linestartendattribute.cxx   |4 
 drawinglayer/source/attribute/sdrfillattribute.cxx|4 
 drawinglayer/source/attribute/sdrfillgraphicattribute.cxx |4 
 drawinglayer/source/attribute/sdrlightingattribute3d.cxx  |4 
 drawinglayer/source/attribute/sdrlineattribute.cxx|4 
 drawinglayer/source/attribute/sdrlinestartendattribute.cxx|4 
 drawinglayer/source/attribute/sdrsceneattribute3d.cxx |4 
 drawinglayer/source/attribute/sdrshadowattribute.cxx  |4 
 drawinglayer/source/attribute/strokeattribute.cxx |4 
 editeng/source/items/flditem.cxx  |2 
 editeng/source/uno/unofield.cxx   |9 
 external/curl/ExternalProject_curl.mk |5 
 filter/source/svg/svgwriter.cxx   |   31 
 i18npool/source/breakiterator/breakiterator_th.cxx|   10 
 include/editeng/flditem.hxx   |2 
 include/xmloff/txtimp.hxx |1 
 include/xmloff/xmltoken.hxx   |1 
 jvmfwk/distributions/OpenOfficeorg/javavendors_linux.xml  |3 
 jvmfwk/distributions/OpenOfficeorg/javavendors_macosx.xml |5 
 jvmfwk/distributions/OpenOfficeorg/javavendors_wnt.xml|3 
 jvmfwk/plugins/sunmajor/pluginlib/otherjre.cxx|6 
 jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx  |1 
 offapi/com/sun/star/text/textfield/Type.idl   |2 
 readlicense_oo/license/CREDITS.fodt   | 2784 +-
 sc/source/ui/view/gridwin4.cxx|   10 
 sd/source/ui/app/sdmod2.cxx   |6 
 sd/source/ui/app/strings.src  |   10 
 sd/source/ui/inc/strings.hrc  |2 
 sd/source/ui/unoidl/unomodel.cxx  |6 
 svl/source/numbers/zforfind.cxx   |8 
 sw/CppunitTest_sw_rtfexport.mk|   31 
 sw/inc/doc.hxx|5 
 sw/inc/frmfmt.hxx |   23 
 sw/inc/node.hxx   |9 
 sw/qa/extras/htmlexport/data/tdf90905.odt |binary
 sw/qa/extras/htmlexport/htmlexport.cxx|9 
 sw/qa/extras/inc/swmodeltestbase.hxx  |6 
 sw/qa/extras/ooxmlexport/data/hyperlink-field.odt |binary
 sw/qa/extras/ooxmlexport/data/tdf91261.docx   |binary
 sw/qa/extras/ooxmlexport/ooxmlexport.cxx  |   19 
 sw/qa/extras/ooxmlexport/ooxmlexport5.cxx |8 
 sw/qa/extras/rtfexport/data/tdf90421.fodt |8 
 sw/qa/extras/rtfexport/rtfexport.cxx  |   23 
 sw/qa/extras/rtfimport/data/copypaste-footnote-paste.rtf  |3 
 sw/qa/extras/rtfimport/data/tdf86814.rtf  |8 
 sw/qa/extras/rtfimport/data/tdf90260-nopar.rtf|2 
 sw/qa/extras/rtfimport/data/tdf90260-par.rtf  |2 
 sw/qa/extras/rtfimport/data/tdf91074.rtf  |7 
 sw/qa/extras/rtfimport/rtfimport.cxx  |   31 
 sw/source/core/doc/DocumentRedlineManager.cxx |2 
 sw/source/core/doc/doclay.cxx |   18 
 sw/source/core/doc/docnew.cxx |2 
 sw/source/core/docnode/node.cxx   |   47 
 sw/source/core/docnode/nodes.cxx  |   76 
 sw/source/core/layout/atrfrm.cxx  |   51 
 sw/source/core/layout/frmtool.cxx |9 
 sw/source/core/txtnode/ndtxt.cxx  |8 
 sw/source/core/txtnode/thints.cxx |   40 
 sw/source/core/undo/undoflystrattr.cxx|1 
 sw/source/core/unocore/unoflatpara.cxx|   10 
 sw/source/core/unocore/unoframe.cxx   |   14 
 sw/source/filter/html/wrthtml.cxx |8 
 sw/source/filter/rtf/swparrtf.cxx |   25 
 sw/source/filter/ww8/docxattributeoutput.cxx  |   10 
 sw/source/filter/w

Crash test update

2015-06-03 Thread Crashtest VM
New crashtest update available at 
http://dev-builds.libreoffice.org/crashtest/6d50c6ccdf85e7d01f16d3edb957eed2a4ad5e47/


exportCrashes.csv
Description: Binary data


importCrash.csv
Description: Binary data


validationErrors.csv
Description: Binary data
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: help needed: hsqldb shutdown race condition, how to fix without deadlock

2015-06-03 Thread Michael Stahl
On 03.06.2015 14:47, Lionel Elie Mamane wrote:
> On Wed, Jun 03, 2015 at 02:24:25PM +0200, Lionel Elie Mamane wrote:
>> On Wed, Jun 03, 2015 at 02:19:04PM +0200, Lionel Elie Mamane wrote:
> 
>>> But let's take it from the other side...
> 
>>> connectivity::hsqldb::ODriverDelegator::preCommit does:
> 
>>> 654 Reference xConnection(i->first,UNO_QUERY);
>>> 655 if ( xConnection.is() )
>>> 656 {
>>> 657   Reference< XStatement> xStmt = xConnection->createStatement();
> 
>>> Now, this goes through a whole rigmarole:
> 
>>> #6  0x2abc1b6e90d3 in AffineBridge::v_callInto_v (this=0x2d29b50, 
>>> pCallee=0x2abbf94eedbe , 
>>> pParam=0x2abc0fd9bdb0)
>>> at 
>>> /home/master/src/libreoffice/workdirs/libreoffice-5-1/cppu/source/AffineBridge/AffineBridge.cxx:250
>> (...)
>>> #18 0x2abc1b8f0ccc in Proxy::dispatch (this=this@entry=0x3577660, 
>>> pReturnTypeRef=pReturnTypeRef@entry=0x3023920, 
>>> pParams=pParams@entry=0x0, nParams=nParams@entry=0, 
>>> pMemberType=pMemberType@entry=0x3436a40, 
>>> pReturn=pReturn@entry=0x2abc0fd9c2f0, pArgs=0x2abc0fd9c2e0, 
>>> ppException=0x2abc0fd9c390)
>>> at 
>>> /home/master/src/libreoffice/workdirs/libreoffice-5-1/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx:445
>> (...)
>>> #21 0x2abc0f3f2a6a in cpp_vtable_call (nFunctionIndex=, 
>>> nVtableOffset=0, 
>>> gpreg=0x2abc0fd9c710, fpreg=0x2abc0fd9c740, ovrflw=0x2abc0fd9c790, 
>>> pRegisterReturn=0x2abc0fd9c6f0)
>>> at 
>>> /home/master/src/libreoffice/workdirs/libreoffice-5-1/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx:377
>>> #22 0x2abc0f409c12 in privateSnippetExecutor ()
>>>from 
>>> /home/master/src/libreoffice/workdirs/libreoffice-5-1/instdir/program/libgcc3_uno.so
>>> #23 0x2abc1b1a9fd8 in connectivity::hsqldb::ODriverDelegator::preCommit 
>>> (this=0x2d24ef0, aEvent=...)
>>> at 
>>> /home/master/src/libreoffice/workdirs/libreoffice-5-1/connectivity/source/drivers/hsqldb/HDriver.cxx:657
>>> #24 0x2abc18bb7081 in OStorage::BroadcastTransaction 
>>> (this=this@entry=0x3578030, 
>>
>>> The problem is essentially the serializing that happens at
>>> AffineBridge::v_callInto_v.
>>
>>> Now, I guess that the whole privateSnippetExecutor / cpp_vtable_call /
>>> cpp2uno_call / s_Proxy_dispatch / ... / AffineBridge::v_callInto_v for
>>> a C++-to-C++ call is somehow linked to the fact that the calling code
>>> does not know the object that implements the XConnection
>>> interface. Can I avoid it in some way? For example, I *know* that
>>> m_xConnection is a connectivity::java_sql_connection.
>>
>>> If I use that fact, can I avoid going through AffineBridge::v_callInto_v ?
>>
>> I tried to do that in the attached patch, but as I was explained on
>> IRC, because the jdbc driver is in an affine component, that does not
>> work.
> 
> Since the problem is essentially that the two threads take the same mutexes
> in different order, here is a dirty hack that forces the hsqldb thread
> to take the "affine bridge" mutex before taking the "HSQL driver"
> mutex.

i'm not entirely sure this is sensible...

a component is (in general) responsible for its own thread safety, and
should not make assumptions about how other components are implemented,
in particular wrt. locking.  this implies that if a component takes a
lock, it must release the lock before calling a method that could end up
calling into a different component, to avoid deadlock.

secondly, those components which run inside the ":affine" purpose
environment can only be called from a single thread, so they do not need
a mutex of their own.  there may be multiple re-entrant calls into the
apartment, where the affine component calls out into a different
component (which is bridged to a thread that is different from both the
original calling thread and the affine thread), which calls back agian
into the affine component, so a non-recursive mutex could deadlock but a
recursive mutex can not.

> It is somewhat of a pity, but . OTOH the fact that the jdbc
> library is thread-affine is itself an ugly "performance" hack :-|
> Here's the comment
> 
> 
> 
> The other solution would be that jdbc not be thread-affine. About
> that, could we, instead of confining it to one thread, just do
> something like that at each call to Attach/DetachCurrentThread:
> 
>  if(this_is_main_thread)
>  {
> create thread, do stuff there
>  }
>  else
>  {
> do stuff here
>  }
> 
> or maybe it would not be more expensive than the affine bridge to do
> "create thread, do stuff there" unconditionally?

that sounds like some custom overly complex work-around...

the affine bridge is at least a *generic* overly complex work-around :)

> Another, maybe ugly hack, idea: when the jdbc driver is loaded (or
> just always...), the event loop in the main thread forks itself into a
> new thread so that ... nothing at all is executed in the main thread?
> Too disruptive to the whole application just for the sake of the jdbc
> driver?

"on-demand"

Re: libreoffice-5-0 failure in [ CUT ] libreofficekit_tiledrendering

2015-06-03 Thread Lionel Elie Mamane
On Wed, Jun 03, 2015 at 10:11:55AM +0200, Miklos Vajna wrote:
> On Tue, Jun 02, 2015 at 03:23:27PM +0200, Lionel Elie Mamane 
>  wrote:

>> FWIW, the libreoffice-5-0 reproducibly fails the
>> libreofficekit_tiledrendering unittest with a segfault for me, while
>> master passes it. I use the same autogen.input for both.

> What are those autogen.input options? Can you follow the instructions of
> the failed test and get a backtrace?

Both are attached. To me the backtrace looks unrelated to "tile
rendering", but then this is the only failing thing in a
 make check -k

-- 
Lionel
--enable-hardlink-deliver
--prefix=/home/master/src/libreoffice/usr-master
--with-linked-git=/home/master/src/libreoffice/repos
--with-external-tar=/home/master/src/libreoffice/repos/src
--enable-debug
--enable-dbgutil
--enable-crashdump
--enable-dependency-tracking
--with-system-libs
--with-system-headers
--with-build-version=(LEM development build)
--with-lang=fr de nl en-GB
##--without-system-jars
# LibreOffice build system is b0rken wrt to the Debian system lpsolve.
# The Debian  LibreOffice package patches it, but just give up here.
--without-system-lpsolve
# system one conflicts with --enable-dbgutil
--without-system-libcmis
--without-system-cppunit
--without-system-orcus
--without-system-graphite
--without-system-mysql-cppconn
--without-system-libgltf
# end of: system one conflicts with --enable-dbgutil
--enable-ext-mariadb-connector
#--without-system-mariadb
--enable-extension-integration
# major headache; unused now on Unix anyway, I think
##--without-system-nss
--enable-evolution2
--enable-lockdown
--enable-tdeab
--enable-ext-watch-window
--enable-ext-wiki-publisher
--enable-ext-validator
--enable-ext-typo
--enable-ext-numbertext
--enable-ext-ct2n
--enable-ext-nlpsolver
--enable-ext-diagram
--enable-ext-google-docs
--enable-ext-hunart
--enable-ext-barcode
--enable-ext-languagetool
--enable-python=system
--with-help
--enable-gstreamer-1-0
--disable-gstreamer-0-10
## build fails. Too old/new in Debian?
--without-system-glm
--without-system-coinmp
# not packaged in Debian yet
# too old in Debian
--without-system-libwps
[ CUT ] libreofficekit_tiledrendering
Bootstrapping exception 'missing whitespace before attribute in 
file:///home/master/src/libreoffice/workdirs/libreoffice-5-0/workdir/unittest/user/extensions/bundled/registry/com.sun.star.comp.deployment.component.PackageRegistryBackend/common_.rdb'
Segmentation fault (core dumped)

It looks like 
/home/master/src/libreoffice/workdirs/libreoffice-5-0/workdir/LinkTarget/Executable/cppunittester
 generated a core file at 
/home/master/src/libreoffice/workdirs/libreoffice-5-0/workdir/CppunitTest/libreofficekit_tiledrendering.test.core/core
Backtraces:
[New LWP 20265]
[New LWP 20266]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by 
`/home/master/src/libreoffice/workdirs/libreoffice-5-0/workdir/LinkTarget/Execut'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x2afb97b7b0bd in Application::GetSolarMutex () at 
/home/master/src/libreoffice/workdirs/libreoffice-5-0/vcl/source/app/svapp.cxx:399
399 return *(pSVData->mpDefInst->GetYieldMutex());

Thread 2 (Thread 0x2afb919a0700 (LWP 20266)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at 
../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
No locals.
#1  0x2afb9031c261 in rtl_cache_wsupdate_wait (seconds=seconds@entry=10) at 
/home/master/src/libreoffice/workdirs/libreoffice-5-0/sal/rtl/alloc_cache.cxx:1361
now = {
  tv_sec = 145809, 
  tv_usec = 608181
}
wakeup = {
  tv_sec = 145819, 
  tv_nsec = 608181000
}
#2  0x2afb9031c45f in rtl_cache_wsupdate_all (arg=0xa) at 
/home/master/src/libreoffice/workdirs/libreoffice-5-0/sal/rtl/alloc_cache.cxx:1509
seconds = 10
#3  0x2afb913830a4 in start_thread (arg=0x2afb919a0700) at 
pthread_create.c:309
__res = 
pd = 0x2afb919a0700
now = 
unwind_buf = {
  cancel_jmp_buf = {{
  jmp_buf = {47259967948544, 2451338464716412314, 0, 
47259941044320, 0, 47259967948544, 8643468075639526810, 8643468889427432858}, 
  mask_was_saved = 0
}}, 
  priv = {
pad = {0x0, 0x0, 0x0, 0x0}, 
data = {
  prev = 0x0, 
  cleanup = 0x0, 
  canceltype = 0
}
  }
}
not_first_call = 
pagesize_m1 = 
sp = 
freesize = 
__PRETTY_FUNCTION__ = "start_thread"
#4  0x2afb90eb404d in clone () at 
../sysdeps/unix/sysv/linux/x86_64/clone.S:111
No locals.

Thread 1 (Thread 0x2afb8fe1eb80 (LWP 20265)):
#0  0x2afb97b7b0bd in Application::GetSolarMutex () at 
/home/master/src/libreoffice/workdirs/libreoffice-5-0/vcl/source/app/svapp.cxx:399
pSVData = 0x2afb984b3ac0 ::get()::instance>
#1  0

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

2015-06-03 Thread Miklos Vajna
 sw/source/ui/dbui/addresslistdialog.cxx |7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

New commits:
commit c61065b262051e510ab5229a8f10efc10962137f
Author: Miklos Vajna 
Date:   Wed Jun 3 14:38:32 2015 +0200

SwAddressListDialog::LoadHdl_Impl: simplify

Change-Id: If716a706f109145c8a6b7fda4b59d2fd7b820f20

diff --git a/sw/source/ui/dbui/addresslistdialog.cxx 
b/sw/source/ui/dbui/addresslistdialog.cxx
index 16a55a7..cda553a 100644
--- a/sw/source/ui/dbui/addresslistdialog.cxx
+++ b/sw/source/ui/dbui/addresslistdialog.cxx
@@ -346,12 +346,7 @@ IMPL_LINK_NOARG(SwAddressListDialog, FilterHdl_Impl)
 
 IMPL_LINK_NOARG(SwAddressListDialog, LoadHdl_Impl)
 {
-SwMailMergeWizard* pWizard = 0;
-if (GetParent() && GetParent()->GetParent())
-pWizard = dynamic_cast(GetParent()->GetParent());
-SwView* pView = 0;
-if (pWizard)
-pView = pWizard->GetSwView();
+SwView* pView = m_pAddressPage->GetWizard()->GetSwView();
 
 const OUString sNewSource = SwDBManager::LoadAndRegisterDataSource(pView ? 
pView->GetDocShell() : 0);
 if(!sNewSource.isEmpty())
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Bug reports on LibO 5 x86 or x64-64 version on 64-bit Windows

2015-06-03 Thread Robinson Tryon
On Wed, Jun 3, 2015 at 7:15 AM, Michael Stahl  wrote:
> On 03.06.2015 11:42, Takeshi Abe wrote:
>> Hi,
>>
>> Is there any simple, boilerplate way in bugzilla for reporters to tell
>> whether the observed behavior of LibO 5 on 64-bit Windows is actually
>> about x86 or x86-64 version (or both)?
>> Current combination of fields "Version"/"Hardware"/"OS" does not suffice
>> for the purpose.
>
> the "Hardware" field can be used for this purpose.
> ...
> but like many things in bugzilla, this is not obvious because the naming
> is awful...
>
> is it possible to rename the "Hardware" field to something better in our
> bugzilla installation?

Got a suggestion?

The tootip for the 'Hardware' field does say "The hardware platform
the bug was observed on." I'm not sure how many people are matching
that field to their chipset, their OS, or their build of LibreOffice,
but at least personally I do use the field for my actual hardware
(setting the field only when relevant). In general, the detail of
word-size is a minor distinction within all our bugs.

Cheers,
--R

-- 
Robinson Tryon
QA Engineer - The Document Foundation
LibreOffice Community Outreach Herald
qu...@libreoffice.org
802-379-9482 | IRC: colonelqubit on Freenode
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: help needed: hsqldb shutdown race condition, how to fix without deadlock

2015-06-03 Thread Lionel Elie Mamane
On Wed, Jun 03, 2015 at 02:24:25PM +0200, Lionel Elie Mamane wrote:
> On Wed, Jun 03, 2015 at 02:19:04PM +0200, Lionel Elie Mamane wrote:

>> But let's take it from the other side...

>> connectivity::hsqldb::ODriverDelegator::preCommit does:

> > 654 Reference xConnection(i->first,UNO_QUERY);
> > 655 if ( xConnection.is() )
> > 656 {
> > 657   Reference< XStatement> xStmt = xConnection->createStatement();

> > Now, this goes through a whole rigmarole:

> > #6  0x2abc1b6e90d3 in AffineBridge::v_callInto_v (this=0x2d29b50, 
> > pCallee=0x2abbf94eedbe , 
> > pParam=0x2abc0fd9bdb0)
> > at 
> > /home/master/src/libreoffice/workdirs/libreoffice-5-1/cppu/source/AffineBridge/AffineBridge.cxx:250
> (...)
> > #18 0x2abc1b8f0ccc in Proxy::dispatch (this=this@entry=0x3577660, 
> > pReturnTypeRef=pReturnTypeRef@entry=0x3023920, 
> > pParams=pParams@entry=0x0, nParams=nParams@entry=0, 
> > pMemberType=pMemberType@entry=0x3436a40, 
> > pReturn=pReturn@entry=0x2abc0fd9c2f0, pArgs=0x2abc0fd9c2e0, 
> > ppException=0x2abc0fd9c390)
> > at 
> > /home/master/src/libreoffice/workdirs/libreoffice-5-1/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx:445
> (...)
> > #21 0x2abc0f3f2a6a in cpp_vtable_call (nFunctionIndex=, 
> > nVtableOffset=0, 
> > gpreg=0x2abc0fd9c710, fpreg=0x2abc0fd9c740, ovrflw=0x2abc0fd9c790, 
> > pRegisterReturn=0x2abc0fd9c6f0)
> > at 
> > /home/master/src/libreoffice/workdirs/libreoffice-5-1/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx:377
> > #22 0x2abc0f409c12 in privateSnippetExecutor ()
> >from 
> > /home/master/src/libreoffice/workdirs/libreoffice-5-1/instdir/program/libgcc3_uno.so
> > #23 0x2abc1b1a9fd8 in connectivity::hsqldb::ODriverDelegator::preCommit 
> > (this=0x2d24ef0, aEvent=...)
> > at 
> > /home/master/src/libreoffice/workdirs/libreoffice-5-1/connectivity/source/drivers/hsqldb/HDriver.cxx:657
> > #24 0x2abc18bb7081 in OStorage::BroadcastTransaction 
> > (this=this@entry=0x3578030, 
> 
> > The problem is essentially the serializing that happens at
> > AffineBridge::v_callInto_v.
> 
> > Now, I guess that the whole privateSnippetExecutor / cpp_vtable_call /
> > cpp2uno_call / s_Proxy_dispatch / ... / AffineBridge::v_callInto_v for
> > a C++-to-C++ call is somehow linked to the fact that the calling code
> > does not know the object that implements the XConnection
> > interface. Can I avoid it in some way? For example, I *know* that
> > m_xConnection is a connectivity::java_sql_connection.
> 
> > If I use that fact, can I avoid going through AffineBridge::v_callInto_v ?
> 
> I tried to do that in the attached patch, but as I was explained on
> IRC, because the jdbc driver is in an affine component, that does not
> work.

Since the problem is essentially that the two threads take the same mutexes
in different order, here is a dirty hack that forces the hsqldb thread
to take the "affine bridge" mutex before taking the "HSQL driver"
mutex.

It is somewhat of a pity, but . OTOH the fact that the jdbc
library is thread-affine is itself an ugly "performance" hack :-|
Here's the comment



The other solution would be that jdbc not be thread-affine. About
that, could we, instead of confining it to one thread, just do
something like that at each call to Attach/DetachCurrentThread:

 if(this_is_main_thread)
 {
create thread, do stuff there
 }
 else
 {
do stuff here
 }

or maybe it would not be more expensive than the affine bridge to do
"create thread, do stuff there" unconditionally?

Another, maybe ugly hack, idea: when the jdbc driver is loaded (or
just always...), the event loop in the main thread forks itself into a
new thread so that ... nothing at all is executed in the main thread?
Too disruptive to the whole application just for the sake of the jdbc
driver?

-- 
Lionel
diff --git a/connectivity/source/drivers/hsqldb/hsqldb.component 
b/connectivity/source/drivers/hsqldb/hsqldb.component
index ab83188..332a053 100644
--- a/connectivity/source/drivers/hsqldb/hsqldb.component
+++ b/connectivity/source/drivers/hsqldb/hsqldb.component
@@ -17,7 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  -->
 
-http://openoffice.org/2010/uno-components";>
   
 
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'feature/gsoc-tiled-rendering' - libreofficekit/source

2015-06-03 Thread Pranav Kant
 libreofficekit/source/gtk/lokdocview.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit c729a529932564b1122f00200567015b421d6df2
Author: Pranav Kant 
Date:   Tue Jun 2 18:26:12 2015 +0530

lokdocview: add width and height to the visible rectangle

Change-Id: I64212113750893f33f8a859ba52ecd8815a820f4

diff --git a/libreofficekit/source/gtk/lokdocview.cxx 
b/libreofficekit/source/gtk/lokdocview.cxx
index 064e534..a766b8a 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -1323,8 +1323,10 @@ SAL_DLLPUBLIC_EXPORT void 
lok_docview_get_visarea(LOKDocView* pThis, GdkRectangl
 {
 GtkAdjustment* pHAdjustment = 
gtk_scrolled_window_get_hadjustment(GTK_SCROLLED_WINDOW(pThis));
 pArea->x = 
pThis->m_pImpl->pixelToTwip(gtk_adjustment_get_value(pHAdjustment));
+pArea->width = 
pThis->m_pImpl->pixelToTwip(gtk_adjustment_get_page_size(pHAdjustment));
 GtkAdjustment* pVAdjustment = 
gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(pThis));
 pArea->y = 
pThis->m_pImpl->pixelToTwip(gtk_adjustment_get_value(pVAdjustment));
+pArea->height = 
pThis->m_pImpl->pixelToTwip(gtk_adjustment_get_page_size(pVAdjustment));
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: help needed: hsqldb shutdown race condition, how to fix without deadlock

2015-06-03 Thread Lionel Elie Mamane
On Wed, Jun 03, 2015 at 02:19:04PM +0200, Lionel Elie Mamane wrote:
> It now probably becomes a question for Stephan. See below.
> 
> On Tue, Jun 02, 2015 at 03:17:16PM +0200, Lionel Elie Mamane wrote:
> > On Tue, Jun 02, 2015 at 03:12:51PM +0200, Noel Grandin wrote:
> 
> >> I would suggest something like this in 
> >> ODriverDelegator::flushConnections():
> 
> >> take_mutex();
> >> std::vector tmp = m_aConnections;
> >> release_mutex();
> >> for (Connection conn : tmp)
> >> conn.flush();
> 
> >> so that the mutex is not held during the problematic phase
> 
> > That makes sense. Will try that. Thanks!
> But let's take it from the other side...
> 
> connectivity::hsqldb::ODriverDelegator::preCommit does:
> 
> 
> 654   Reference xConnection(i->first,UNO_QUERY);
> 655   if ( xConnection.is() )
> 656   {
> 657 Reference< XStatement> xStmt = xConnection->createStatement();

> Now, this goes through a whole rigmarole:

> #6  0x2abc1b6e90d3 in AffineBridge::v_callInto_v (this=0x2d29b50, 
> pCallee=0x2abbf94eedbe , 
> pParam=0x2abc0fd9bdb0)
> at 
> /home/master/src/libreoffice/workdirs/libreoffice-5-1/cppu/source/AffineBridge/AffineBridge.cxx:250
(...)
> #18 0x2abc1b8f0ccc in Proxy::dispatch (this=this@entry=0x3577660, 
> pReturnTypeRef=pReturnTypeRef@entry=0x3023920, pParams=pParams@entry=0x0, 
> nParams=nParams@entry=0, 
> pMemberType=pMemberType@entry=0x3436a40, 
> pReturn=pReturn@entry=0x2abc0fd9c2f0, pArgs=0x2abc0fd9c2e0, 
> ppException=0x2abc0fd9c390)
> at 
> /home/master/src/libreoffice/workdirs/libreoffice-5-1/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx:445
(...)
> #21 0x2abc0f3f2a6a in cpp_vtable_call (nFunctionIndex=, 
> nVtableOffset=0, 
> gpreg=0x2abc0fd9c710, fpreg=0x2abc0fd9c740, ovrflw=0x2abc0fd9c790, 
> pRegisterReturn=0x2abc0fd9c6f0)
> at 
> /home/master/src/libreoffice/workdirs/libreoffice-5-1/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx:377
> #22 0x2abc0f409c12 in privateSnippetExecutor ()
>from 
> /home/master/src/libreoffice/workdirs/libreoffice-5-1/instdir/program/libgcc3_uno.so
> #23 0x2abc1b1a9fd8 in connectivity::hsqldb::ODriverDelegator::preCommit 
> (this=0x2d24ef0, aEvent=...)
> at 
> /home/master/src/libreoffice/workdirs/libreoffice-5-1/connectivity/source/drivers/hsqldb/HDriver.cxx:657
> #24 0x2abc18bb7081 in OStorage::BroadcastTransaction 
> (this=this@entry=0x3578030, 

> The problem is essentially the serializing that happens at
> AffineBridge::v_callInto_v.

> Now, I guess that the whole privateSnippetExecutor / cpp_vtable_call /
> cpp2uno_call / s_Proxy_dispatch / ... / AffineBridge::v_callInto_v for
> a C++-to-C++ call is somehow linked to the fact that the calling code
> does not know the object that implements the XConnection
> interface. Can I avoid it in some way? For example, I *know* that
> m_xConnection is a connectivity::java_sql_connection.

> If I use that fact, can I avoid going through AffineBridge::v_callInto_v ?

I tried to do that in the attached patch, but as I was explained on
IRC, because the jdbc driver is in an affine component, that does not
work.

-- 
Lionel
diff --git a/connectivity/Library_hsqldb.mk b/connectivity/Library_hsqldb.mk
index 5fd647c..b97590b 100644
--- a/connectivity/Library_hsqldb.mk
+++ b/connectivity/Library_hsqldb.mk
@@ -26,6 +26,7 @@ $(eval $(call gb_Library_use_libraries,hsqldb,\
cppu \
cppuhelper \
dbtools \
+   jdbc \
jvmfwk \
sal \
salhelper \
diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx 
b/connectivity/source/drivers/hsqldb/HDriver.cxx
index 87eb271..b533819 100644
--- a/connectivity/source/drivers/hsqldb/HDriver.cxx
+++ b/connectivity/source/drivers/hsqldb/HDriver.cxx
@@ -21,6 +21,7 @@
 
 #include "hsqldb/HDriver.hxx"
 #include "hsqldb/HConnection.hxx"
+#include "java/sql/Connection.hxx"
 #include 
 #include 
 #include 
@@ -613,8 +614,14 @@ namespace connectivity
 
 void ODriverDelegator::flushConnections()
 {
-TWeakPairVector::iterator aEnd = m_aConnections.end();
-for (TWeakPairVector::iterator i = m_aConnections.begin(); aEnd != i; 
++i)
+TWeakPairVector connections;
+{
+::osl::MutexGuard aGuard(m_aMutex);
+connections = m_aConnections;
+}
+
+TWeakPairVector::const_iterator aEnd = connections.end();
+for (TWeakPairVector::iterator i = connections.begin(); aEnd != i; ++i)
 {
 try
 {
@@ -648,15 +655,17 @@ namespace connectivity
 Reference xConnection(i->first,UNO_QUERY);
 if ( xConnection.is() )
 {
-Reference< XStatement> xStmt = 
xConnection->createStatement();
+rtl::Reference 
pConnection(dynamic_cast(xConnection.get()));
+assert(pConnection.is());
+Reference< XStatement> xStmt = 
p

Re: help needed: hsqldb shutdown race condition, how to fix without deadlock

2015-06-03 Thread Lionel Elie Mamane
It now probably becomes a question for Stephan. See below.

On Tue, Jun 02, 2015 at 03:17:16PM +0200, Lionel Elie Mamane wrote:
> On Tue, Jun 02, 2015 at 03:12:51PM +0200, Noel Grandin wrote:

>> I would suggest something like this in ODriverDelegator::flushConnections():

>> take_mutex();
>> std::vector tmp = m_aConnections;
>> release_mutex();
>> for (Connection conn : tmp)
>> conn.flush();

>> so that the mutex is not held during the problematic phase

> That makes sense. Will try that. Thanks!

It does not solve my problem, because the same mutex is taken deeper
in the stack:


#23 0x2abc1b1a9fd8 in connectivity::hsqldb::ODriverDelegator::preCommit 
(this=0x2d24ef0, aEvent=...)
at 
/home/master/src/libreoffice/workdirs/libreoffice-5-1/connectivity/source/drivers/hsqldb/HDriver.cxx:65
#24 0x2abc18bb7081 in OStorage::BroadcastTransaction 
(this=this@entry=0x3578030, 
nMessage=nMessage@entry=1 '\001')
at 
/home/master/src/libreoffice/workdirs/libreoffice-5-1/package/source/xstor/xstorage.cxx:2094
#25 0x2abc18bc66e3 in OStorage::commit (this=0x3578030)
at 
/home/master/src/libreoffice/workdirs/libreoffice-5-1/package/source/xstor/xstorage.cxx:3937
#26 0x2abc13f336ad in dbaccess::tools::stor::commitStorageIfWriteable (
_rxStorage=uno::Reference to (OStorage *) 0x3578038)
at 
/home/master/src/libreoffice/workdirs/libreoffice-5-1/dbaccess/source/core/misc/sdbcoretools.cxx:139
#27 0x2abc13ef82cd in 
dbaccess::DocumentStorageAccess::commitEmbeddedStorage (this=0x35ba790, 
_bPreventRootCommits=_bPreventRootCommits@entry=false)
at 
/home/master/src/libreoffice/workdirs/libreoffice-5-1/dbaccess/source/core/dataaccess/ModelImpl.cxx:290
#28 0x2abc13efc0b2 in dbaccess::ODatabaseModelImpl::commitEmbeddedStorage 
(this=0x35bbd20, 
_bPreventRootCommits=_bPreventRootCommits@entry=false)
at 
/home/master/src/libreoffice/workdirs/libreoffice-5-1/dbaccess/source/core/dataaccess/ModelImpl.cxx:887
#29 0x2abc13eb58c8 in dbaccess::ODatabaseSource::flushed (this=0x35b7c60)
at 
/home/master/src/libreoffice/workdirs/libreoffice-5-1/dbaccess/source/core/dataaccess/datasource.cxx:1306
#30 0x2abc13eae005 in dbaccess::FlushNotificationAdapter::flushed 
(this=0x318ec50, rEvent=...)
at 
/home/master/src/libreoffice/workdirs/libreoffice-5-1/dbaccess/source/core/dataaccess/datasource.cxx:172
(...)
#34 0x2abc1b1a07f1 in connectivity::hsqldb::OHsqlConnection::flush 
(this=0x3577db0)
at 
/home/master/src/libreoffice/workdirs/libreoffice-5-1/connectivity/source/drivers/hsqldb/HConnection.cxx:168
#35 0x2abc1b1a9ba3 in 
connectivity::hsqldb::ODriverDelegator::flushConnections (this=0x2d24ef0)
at 
/home/master/src/libreoffice/workdirs/libreoffice-5-1/connectivity/source/drivers/hsqldb/HDriver.cxx:629


But let's take it from the other side...

connectivity::hsqldb::ODriverDelegator::preCommit does:


654 Reference xConnection(i->first,UNO_QUERY);
655 if ( xConnection.is() )
656 {
657   Reference< XStatement> xStmt = xConnection->createStatement();

Now, this goes through a whole rigmarole:

#6  0x2abc1b6e90d3 in AffineBridge::v_callInto_v (this=0x2d29b50, 
pCallee=0x2abbf94eedbe , 
pParam=0x2abc0fd9bdb0)
at 
/home/master/src/libreoffice/workdirs/libreoffice-5-1/cppu/source/AffineBridge/AffineBridge.cxx:250
#7  0x2abc1b6e9b07 in cppu::Enterable_call_callInto_v (context=0x2d29b50, 
pCallee=0x2abbf94eedbe , pParam=0x2abc0fd9bdb0)
at 
/home/master/src/libreoffice/workdirs/libreoffice-5-1/include/cppu/Enterable.hxx:69
#8  0x2abc1b8eee97 in cppu::Enterable::callInto_v (this=0x2d29b50, 
pCallee=pCallee@entry=0x2abbf94eedbe , 
pParam=pParam@entry=0x2abc0fd9bdb0)
at 
/home/master/src/libreoffice/workdirs/libreoffice-5-1/include/cppu/Enterable.hxx:53
#9  0x2abc1b8eeccf in Base::v_callInto_v (this=0x2d29eb0, 
pCallee=0x2abbf94eedbe , 
pParam=0x2abc0fd9bdb0)
at 
/home/master/src/libreoffice/workdirs/libreoffice-5-1/cppu/source/helper/purpenv/helper_purpenv_Environment.cxx:508
#10 0x2abc1b8eef6f in cppu::Enterable_call_callInto_v (context=0x2d29eb0, 
pCallee=0x2abbf94eedbe , pParam=0x2abc0fd9bdb0)
at 
/home/master/src/libreoffice/workdirs/libreoffice-5-1/include/cppu/Enterable.hxx:69
#11 0x2abbf94ef997 in cppu::Enterable::callInto_v 
(this=this@entry=0x2d29eb0, 
pCallee=pCallee@entry=0x2abbf94eedbe , 
pParam=pParam@entry=0x2abc0fd9bdb0)
at 
/home/master/src/libreoffice/workdirs/libreoffice-5-1/include/cppu/Enterable.hxx:53
#12 0x2abbf94efaac in cppu::Enterable::callInto (this=this@entry=0x2d29eb0, 
pCallee=pCallee@entry=0x2abbf94eedbe )
at 
/home/master/src/libreoffice/workdirs/libreoffice-5-1/include/cppu/Enterable.hxx:90
#13 0x2abbf94eeeb4 in s_callInto_v (pEnv=pEnv@entry=0x2d29900, 
pCallee=pCallee@entry=0x2abbf94ef0b9 , 
pParam=pParam@entry=0x2abc0fd9bee0)
at 
/home/master/src/libreoffice/workdirs/libreoffice-5-1/cppu/sour

[Libreoffice-commits] core.git: 5 commits - include/svtools include/svx svtools/source svx/source vcl/source

2015-06-03 Thread Tomaž Vajngerl
 include/svtools/ruler.hxx |9 -
 include/svx/ruler.hxx |3 
 svtools/source/contnr/treelistbox.cxx |2 
 svtools/source/control/ruler.cxx  |  248 +++---
 svx/source/dialog/svxruler.cxx|   46 ++
 vcl/source/filter/graphicfilter.cxx   |   28 ++-
 vcl/source/window/window.cxx  |3 
 7 files changed, 157 insertions(+), 182 deletions(-)

New commits:
commit f16d82ea8f1d2815faa978a4481c6b3c9c8705f8
Author: Tomaž Vajngerl 
Date:   Wed Jun 3 20:21:05 2015 +0900

make it possible to force enable double buffering for all widgets

Change-Id: Ia0c8e9d8a22abaa2c06aea2a0f790dc34903ac37

diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 72433b0..8875195 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -743,7 +743,7 @@ WindowImpl::WindowImpl( WindowType nType )
 mbFill  = true;
 mbSecondary = false;
 mbNonHomogeneous= false;
-mbDoubleBuffering   = false; // when we are not sure, 
assume it cannot do double-buffering via RenderContext
+mbDoubleBuffering   = 
getenv("VCL_DOUBLEBUFFERING_FORCE_ENABLE"); // when we are not sure, assume it 
cannot do double-buffering via RenderContext
 }
 
 WindowImpl::~WindowImpl()
@@ -3098,7 +3098,6 @@ void Window::Scroll( long nHorzScroll, long nVertScroll, 
ScrollFlags nFlags )
 void Window::Scroll( long nHorzScroll, long nVertScroll,
  const Rectangle& rRect, ScrollFlags nFlags )
 {
-
 OutputDevice *pOutDev = GetOutDev();
 Rectangle aRect = pOutDev->ImplLogicToDevicePixel( rRect );
 aRect.Intersection( Rectangle( Point( mnOutOffX, mnOutOffY ), Size( 
mnOutWidth, mnOutHeight ) ) );
commit 2e4380a0773acb72c5ee30e976b8af6ece71396a
Author: Tomaž Vajngerl 
Date:   Wed Jun 3 20:18:31 2015 +0900

forgot to change the Invalidate to InvalidateEntry in treelistbox

Change-Id: Ifa70abbecb6899d0e665039cecc2d9036ffc4b92

diff --git a/svtools/source/contnr/treelistbox.cxx 
b/svtools/source/contnr/treelistbox.cxx
index f31f8c9..c698fe2 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -2675,7 +2675,7 @@ void SvTreeListBox::EditItemText(SvTreeListEntry* pEntry, 
SvLBoxString* pItem, c
 {
 pImp->ShowCursor( false );
 SelectListEntry( pEntry, false );
-Invalidate();
+pImp->InvalidateEntry(pEntry);
 SelectListEntry( pEntry, true );
 pImp->ShowCursor( true );
 }
commit 5ae10ae4df7180d4464f85586232cb7dc106ed5c
Author: Tomaž Vajngerl 
Date:   Wed Jun 3 20:11:33 2015 +0900

graphicfilter: store the funky animated GIF in a PNG as a GIF

MS had a really bad idea to store an animated GIF inside a PNG for
some reason. This situation was handled correctly in LO but we
still pretended that this was a PNG file, which was causing
confusion for some users that wanted to extract the image from
the document. With this change we extract the animated GIF from
the PNG and store just the GIF in the document.

Change-Id: I4c70d118e8decd7aa1b108b6b1d725301904a35b

diff --git a/vcl/source/filter/graphicfilter.cxx 
b/vcl/source/filter/graphicfilter.cxx
index 0a8afa2..0a2cd01 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -1455,21 +1455,28 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& 
rGraphic, const OUString& rPat
 else
 {
 // check if this PNG contains a GIF chunk!
-const std::vector< vcl::PNGReader::ChunkData >&rChunkData 
= aPNGReader.GetChunks();
-std::vector< vcl::PNGReader::ChunkData >::const_iterator 
aIter( rChunkData.begin() );
-std::vector< vcl::PNGReader::ChunkData >::const_iterator aEnd 
( rChunkData.end() );
-while( aIter != aEnd )
+const std::vector& rChunkData = 
aPNGReader.GetChunks();
+std::vector::const_iterator 
aIter(rChunkData.begin());
+std::vector::const_iterator 
aEnd(rChunkData.end());
+
+while (aIter != aEnd)
 {
 // Microsoft Office is storing Animated GIFs in following 
chunk
-if ( aIter->nType == PMGCHUNG_msOG )
+if (aIter->nType == PMGCHUNG_msOG)
 {
 sal_uInt32 nChunkSize = aIter->aData.size();
-if ( nChunkSize > 11 )
+
+if (nChunkSize > 11)
 {
-const std::vector< sal_uInt8 >& rData = 
aIter->aData;
-SvMemoryStream aIStrm( (void*)&rData[ 11 ], 
nChunkSize - 11, StreamMode::READ );
-ImportGIF( aIStrm, rGraphic );
-

[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - 2 commits - i18nlangtag/source i18npool/Library_localedata_euro.mk i18npool/source include/i18nlangtag svtools/source

2015-06-03 Thread Eike Rathke
 i18nlangtag/source/isolang/isolang.cxx |1 
 i18npool/Library_localedata_euro.mk|1 
 i18npool/source/localedata/data/vec_IT.xml |  362 +
 i18npool/source/localedata/localedata.cxx  |1 
 include/i18nlangtag/lang.h |1 
 svtools/source/misc/langtab.src|1 
 6 files changed, 367 insertions(+)

New commits:
commit 9f2ee2771658ed73cee0be053d76a27e4cdef4b9
Author: Eike Rathke 
Date:   Wed Jun 3 13:18:29 2015 +0200

tdf#91199 add Venetian [vec-IT] locale data

Corrected the usual pitfalls; added DateAcceptancePattern and
ScientificFormatskey3 engineering format.

Change-Id: Icecb2e84b6c454378fb5e6d478e1113317e9f3bc
(cherry picked from commit cd5d3c4054868c02fce12016edcf9584013b48bf)

diff --git a/i18npool/Library_localedata_euro.mk 
b/i18npool/Library_localedata_euro.mk
index 96059fa..9b5aaae 100644
--- a/i18npool/Library_localedata_euro.mk
+++ b/i18npool/Library_localedata_euro.mk
@@ -100,6 +100,7 @@ $(eval $(call 
gb_Library_add_generated_exception_objects,localedata_euro,\
CustomTarget/i18npool/localedata/localedata_tr_TR \
CustomTarget/i18npool/localedata/localedata_tt_RU \
CustomTarget/i18npool/localedata/localedata_uk_UA \
+   CustomTarget/i18npool/localedata/localedata_vec_IT \
CustomTarget/i18npool/localedata/localedata_wa_BE \
 ))
 
diff --git a/i18npool/source/localedata/data/vec_IT.xml 
b/i18npool/source/localedata/data/vec_IT.xml
new file mode 100644
index 000..ae63285
--- /dev/null
+++ b/i18npool/source/localedata/data/vec_IT.xml
@@ -0,0 +1,362 @@
+
+
+
+  
+
+  vec
+  Venetian
+
+
+  IT
+  Italy
+
+  
+  
+
+  /
+  ,
+  .
+  :
+  .
+  ;
+  , 
+  , 
+   
+   
+
+
+  ‘
+  ’
+  “
+  ”
+
+AM
+PM
+metric
+  
+  
+M/D
+
+  General
+
+
+  0
+
+
+  0.00
+
+
+  #,##0
+
+
+  #,##0.00
+
+
+  #,###.00
+
+
+  0.00E+00
+
+
+  0.00E+000
+
+
+  0%
+
+
+  0.00%
+
+
+  [CURRENCY] #,##0;-[CURRENCY] #,##0
+
+
+  [CURRENCY] #,##0.00;-[CURRENCY] #,##0.00
+
+
+  [CURRENCY] #,##0;[RED]-[CURRENCY] #,##0
+
+
+  [CURRENCY] #,##0.00;[RED]-[CURRENCY] #,##0.00
+
+
+  #,##0.00 CCC
+
+
+  [CURRENCY] #,##0.--;[RED]-[CURRENCY] #,##0.--
+
+
+  YY/MM/DD
+
+
+  DD,  
+
+
+  YY/MM/DD
+
+
+  /MM/DD
+
+
+  D, MMM YY
+
+
+  D, MMM 
+
+
+  D, MMM 
+
+
+  D,  
+
+
+  D,  
+
+
+  NN, DD/MMM/YY
+
+
+  NN, D, MMM YY
+
+
+  NN, D,  
+
+
+  D,  
+
+
+  MM/DD
+
+
+  YY-MM-DD
+  ISO 8601
+
+
+  -MM-DD
+  ISO 8601
+
+
+  YY/MM
+
+
+  MMM/DD
+
+
+  
+
+
+  QQ YY
+
+
+  WW
+
+
+  HH:MM
+
+
+  HH:MM:SS
+
+
+  HH:MM AM/PM
+
+
+  HH:MM:SS AM/PM
+
+
+  [HH]:MM:SS
+
+
+  MM:SS.00
+
+
+  [HH]:MM:SS.00
+
+
+  YY/MM/DD HH:MM
+
+
+  /MM/DD HH:MM:SS AM/PM
+
+
+  ##0.00E+00
+
+  
+  
+
+
+  IGNORE_CASE
+
+  
+  
+
+  IGNORE_CASE
+
+  
+  
+A-Z
+0
+1
+p.s.
+p.p.s
+  
+  
+
+  
+
+  sun
+  Dom
+  Doménega
+
+
+  mon
+  Lun
+  Luni
+
+
+  tue
+  Mar
+  Marti
+
+
+  wed
+  Mèr
+  Mèrcore
+
+
+  thu
+  Zob
+  Zoba
+
+
+  fri
+  Vèn
+  Vènare
+
+
+  sat
+  Sab
+  Sabo
+
+  
+  
+
+  jan
+  Zen
+  Zenaro
+
+
+  feb
+  Feb
+  Febraro
+
+
+  mar
+  Mar
+  Marso
+
+
+  apr
+  Apr
+  Apriłe
+
+
+  may
+  Maj
+  Majo
+
+
+  jun
+  Zun
+  Zunjo
+
+
+  jul
+  Luj
+  Lujo
+
+
+  aug
+  Ago
+  Agosto
+
+
+  sep
+  Set
+  Setenbre
+
+
+  oct
+  Oto
+  Otobre
+
+
+  nov
+  Nov
+  Novenbre
+
+
+  dec
+  Des
+  Desenbre
+
+  
+  
+
+  b

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

2015-06-03 Thread Caolán McNamara
 xmloff/source/text/txtparae.cxx |   13 -
 1 file changed, 8 insertions(+), 5 deletions(-)

New commits:
commit 923b867d9a1ebc4170c567c5836ed172d3cb7435
Author: Caolán McNamara 
Date:   Wed Apr 22 14:10:38 2015 +0100

fix assert on export of ooo63141-1.doc to odt

if bAutoStyles is true then the mbDoSomething of the SvXMLElementExport is
false, and the ctor/dtor doesn't do anything so any attributes added to the
exporter are not cleared by the SvXMLElementExport dtor

so only add the attribute if bAutoStyles if false and might as well extend 
the
block to cover the use of SvXMLElementExport and use the other ctor which
defaults mbDoSomething on

Change-Id: If35cd35e902372562fd7e78b3f970d91fcec3c16
(cherry picked from commit bd75327c8bc1157036ca11db8c808dc7ceb2109e)
Reviewed-on: https://gerrit.libreoffice.org/16053
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index cdc468c..5da84e0 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -2208,13 +2208,16 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
 }
 else if ( sType.equals( sAnnotationEnd ) )
 {
-Reference 
xBookmark(xPropSet->getPropertyValue(sBookmark), UNO_QUERY);
-const OUString& rName = xBookmark->getName();
-if ( rName.getLength() > 0 )
+if (!bAutoStyles)
 {
-GetExport().AddAttribute(XML_NAMESPACE_OFFICE, XML_NAME, 
rName);
+Reference 
xBookmark(xPropSet->getPropertyValue(sBookmark), UNO_QUERY);
+const OUString& rName = xBookmark->getName();
+if (!rName.isEmpty())
+{
+GetExport().AddAttribute(XML_NAMESPACE_OFFICE, 
XML_NAME, rName);
+}
+SvXMLElementExport aElem( GetExport(), 
XML_NAMESPACE_OFFICE, XML_ANNOTATION_END, false, false );
 }
-SvXMLElementExport aElem( GetExport(), !bAutoStyles, 
XML_NAMESPACE_OFFICE, XML_ANNOTATION_END, false, false );
 }
 else if( sType.equals( sFrame ) )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.0' - 5 commits - sd/source sd/uiconfig sw/qa sw/source

2015-06-03 Thread Jan Holesovsky
 sd/source/ui/app/sdstring.src  |4 
 sd/source/ui/app/strings.src   |8 -
 sd/source/ui/inc/sdstring.hrc  |1 
 sd/source/ui/inc/strings.hrc   |2 
 sd/source/ui/view/Outliner.cxx |  114 ++--
 sd/uiconfig/sdraw/toolbar/findbar.xml  |2 
 sd/uiconfig/simpress/toolbar/findbar.xml   |2 
 sw/qa/extras/tiledrendering/data/2-pages.odt   |binary
 sw/qa/extras/tiledrendering/data/search.odt|binary
 sw/qa/extras/tiledrendering/tiledrendering.cxx |  118 +
 sw/source/uibase/uiview/viewsrch.cxx   |   15 ++-
 11 files changed, 186 insertions(+), 80 deletions(-)

New commits:
commit 630b0303d33d2eca6530fdf46631fae17ba80313
Author: Jan Holesovsky 
Date:   Thu May 28 18:23:25 2015 +0200

fdo#74132: Do not interrupt search in Impress and Draw.

Apparently this was forgotten; Writer and Calc already support this.

Change-Id: I1a187b54294cb84a1b48ef8e855cc75df3f75dd7
Reviewed-on: https://gerrit.libreoffice.org/15953
Reviewed-by: Michael Meeks 
Reviewed-by: Adolfo Jayme Barrientos 
Tested-by: Adolfo Jayme Barrientos 

diff --git a/sd/source/ui/app/sdstring.src b/sd/source/ui/app/sdstring.src
index 2198a1a..6751765 100644
--- a/sd/source/ui/app/sdstring.src
+++ b/sd/source/ui/app/sdstring.src
@@ -18,10 +18,6 @@
  */
 
 #include "sdstring.hrc"
-String STR_SAR_NOT_FOUND
-{
-Text [ en-US ] = "Search key not found.";
-};
 
 String STR_SAR_WRAP_FORWARD
 {
diff --git a/sd/source/ui/app/strings.src b/sd/source/ui/app/strings.src
index ed790cf..6308c02 100644
--- a/sd/source/ui/app/strings.src
+++ b/sd/source/ui/app/strings.src
@@ -459,10 +459,6 @@ String STR_OBJECTS
 {
 Text [ en-US ] = "Objects" ;
 };
-String STR_END_SEARCHING
-{
-Text [ en-US ] = "The document search is finished." ;
-};
 String STR_END_SPELLING
 {
 Text [ en-US ] = "Spellcheck of entire document has been completed." ;
@@ -507,10 +503,6 @@ String STR_UNDO_SET_PRESLAYOUT
 {
 Text [ en-US ] = "Apply presentation layout" ;
 };
-String STR_STRING_NOTFOUND
-{
-Text [ en-US ] = "Search key not found." ;
-};
 String STR_PLAY
 {
 Text [ en-US ] = "~Play" ;
diff --git a/sd/source/ui/inc/sdstring.hrc b/sd/source/ui/inc/sdstring.hrc
index 9d11d16..abf2acf 100644
--- a/sd/source/ui/inc/sdstring.hrc
+++ b/sd/source/ui/inc/sdstring.hrc
@@ -20,7 +20,6 @@
 #define SID_SD_STRING_START RID_APP_START+300
 
 // Texts for search and replace info and question boxes.
-#define STR_SAR_NOT_FOUND   SID_SD_STRING_START+23
 #define STR_SAR_WRAP_FORWARDSID_SD_STRING_START+24
 #define STR_SAR_WRAP_BACKWARD   SID_SD_STRING_START+25
 #define STR_SAR_WRAP_FORWARD_DRAW   SID_SD_STRING_START+26
diff --git a/sd/source/ui/inc/strings.hrc b/sd/source/ui/inc/strings.hrc
index a5da566..ca3f496a 100644
--- a/sd/source/ui/inc/strings.hrc
+++ b/sd/source/ui/inc/strings.hrc
@@ -200,7 +200,6 @@
 #define STR_IMPORT_GRFILTER_TOOBIG  (RID_APP_START+340)
 
 #define STR_OBJECTS (RID_APP_START+341)
-#define STR_END_SEARCHING   (RID_APP_START+342)
 #define STR_END_SPELLING(RID_APP_START+343)
 #define STR_NOLANGUAGE  (RID_APP_START+344)
 #define STR_ASK_FOR_CONVERT_TO_BEZIER   (RID_APP_START+347)
@@ -210,7 +209,6 @@
 #define STR_UNDO_INSERT_FILE(RID_APP_START+352)
 #define STR_UNDO_INSERT_SPECCHAR(RID_APP_START+353)
 #define STR_UNDO_SET_PRESLAYOUT (RID_APP_START+354)
-#define STR_STRING_NOTFOUND (RID_APP_START+355)
 #define STR_PLAY(RID_APP_START+356)
 #define STR_STOP(RID_APP_START+357)
 #define STR_UNDO_ORIGINALSIZE   (RID_APP_START+359)
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index ba96512..e073118 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -439,6 +439,9 @@ bool Outliner::StartSearchAndReplace (const SvxSearchItem* 
pSearchItem)
 {
 bool bEndOfSearch = true;
 
+// clear the search toolbar entry
+SvxSearchDialogWrapper::SetSearchLabel(SL_Empty);
+
 mpDrawDocument->GetDocSh()->SetWaitCursor( true );
 if (mbPrepareSpellingPending)
 PrepareSpelling();
@@ -718,8 +721,7 @@ bool Outliner::SearchAndReplaceOnce()
 mpDrawDocument->GetDocSh()->SetWaitCursor( false );
 
 // notify LibreOfficeKit about changed page
-if (pViewShell && pViewShell->GetDoc()->isTiledRendering() &&
-mbStringFound && pViewShell->ISA(DrawViewShell))
+if (pViewShell && pViewShell->GetDoc()->isTiledRendering() && 
mbStringFound)
 {
 OString aPayload = OString::number(maCurrentPosition.mnPageIndex);
 pViewShell->GetDoc()->libreOfficeKitCallback(LOK_CALLBACK_SET_PART, 
aPayload.getStr());
@@ -1040,86 +1042,73 @@ void Outliner::EndOfSear

[Libreoffice-commits] core.git: 2 commits - i18nlangtag/source i18npool/Library_localedata_euro.mk i18npool/source include/i18nlangtag svtools/source

2015-06-03 Thread Eike Rathke
 i18nlangtag/source/isolang/isolang.cxx |1 
 i18npool/Library_localedata_euro.mk|1 
 i18npool/source/localedata/data/vec_IT.xml |  362 +
 i18npool/source/localedata/localedata.cxx  |1 
 include/i18nlangtag/lang.h |1 
 svtools/source/misc/langtab.src|1 
 6 files changed, 367 insertions(+)

New commits:
commit cd5d3c4054868c02fce12016edcf9584013b48bf
Author: Eike Rathke 
Date:   Wed Jun 3 13:18:29 2015 +0200

tdf#91199 add Venetian [vec-IT] locale data

Corrected the usual pitfalls; added DateAcceptancePattern and
ScientificFormatskey3 engineering format.

Change-Id: Icecb2e84b6c454378fb5e6d478e1113317e9f3bc

diff --git a/i18npool/Library_localedata_euro.mk 
b/i18npool/Library_localedata_euro.mk
index 96059fa..9b5aaae 100644
--- a/i18npool/Library_localedata_euro.mk
+++ b/i18npool/Library_localedata_euro.mk
@@ -100,6 +100,7 @@ $(eval $(call 
gb_Library_add_generated_exception_objects,localedata_euro,\
CustomTarget/i18npool/localedata/localedata_tr_TR \
CustomTarget/i18npool/localedata/localedata_tt_RU \
CustomTarget/i18npool/localedata/localedata_uk_UA \
+   CustomTarget/i18npool/localedata/localedata_vec_IT \
CustomTarget/i18npool/localedata/localedata_wa_BE \
 ))
 
diff --git a/i18npool/source/localedata/data/vec_IT.xml 
b/i18npool/source/localedata/data/vec_IT.xml
new file mode 100644
index 000..ae63285
--- /dev/null
+++ b/i18npool/source/localedata/data/vec_IT.xml
@@ -0,0 +1,362 @@
+
+
+
+  
+
+  vec
+  Venetian
+
+
+  IT
+  Italy
+
+  
+  
+
+  /
+  ,
+  .
+  :
+  .
+  ;
+  , 
+  , 
+   
+   
+
+
+  ‘
+  ’
+  “
+  ”
+
+AM
+PM
+metric
+  
+  
+M/D
+
+  General
+
+
+  0
+
+
+  0.00
+
+
+  #,##0
+
+
+  #,##0.00
+
+
+  #,###.00
+
+
+  0.00E+00
+
+
+  0.00E+000
+
+
+  0%
+
+
+  0.00%
+
+
+  [CURRENCY] #,##0;-[CURRENCY] #,##0
+
+
+  [CURRENCY] #,##0.00;-[CURRENCY] #,##0.00
+
+
+  [CURRENCY] #,##0;[RED]-[CURRENCY] #,##0
+
+
+  [CURRENCY] #,##0.00;[RED]-[CURRENCY] #,##0.00
+
+
+  #,##0.00 CCC
+
+
+  [CURRENCY] #,##0.--;[RED]-[CURRENCY] #,##0.--
+
+
+  YY/MM/DD
+
+
+  DD,  
+
+
+  YY/MM/DD
+
+
+  /MM/DD
+
+
+  D, MMM YY
+
+
+  D, MMM 
+
+
+  D, MMM 
+
+
+  D,  
+
+
+  D,  
+
+
+  NN, DD/MMM/YY
+
+
+  NN, D, MMM YY
+
+
+  NN, D,  
+
+
+  D,  
+
+
+  MM/DD
+
+
+  YY-MM-DD
+  ISO 8601
+
+
+  -MM-DD
+  ISO 8601
+
+
+  YY/MM
+
+
+  MMM/DD
+
+
+  
+
+
+  QQ YY
+
+
+  WW
+
+
+  HH:MM
+
+
+  HH:MM:SS
+
+
+  HH:MM AM/PM
+
+
+  HH:MM:SS AM/PM
+
+
+  [HH]:MM:SS
+
+
+  MM:SS.00
+
+
+  [HH]:MM:SS.00
+
+
+  YY/MM/DD HH:MM
+
+
+  /MM/DD HH:MM:SS AM/PM
+
+
+  ##0.00E+00
+
+  
+  
+
+
+  IGNORE_CASE
+
+  
+  
+
+  IGNORE_CASE
+
+  
+  
+A-Z
+0
+1
+p.s.
+p.p.s
+  
+  
+
+  
+
+  sun
+  Dom
+  Doménega
+
+
+  mon
+  Lun
+  Luni
+
+
+  tue
+  Mar
+  Marti
+
+
+  wed
+  Mèr
+  Mèrcore
+
+
+  thu
+  Zob
+  Zoba
+
+
+  fri
+  Vèn
+  Vènare
+
+
+  sat
+  Sab
+  Sabo
+
+  
+  
+
+  jan
+  Zen
+  Zenaro
+
+
+  feb
+  Feb
+  Febraro
+
+
+  mar
+  Mar
+  Marso
+
+
+  apr
+  Apr
+  Apriłe
+
+
+  may
+  Maj
+  Majo
+
+
+  jun
+  Zun
+  Zunjo
+
+
+  jul
+  Luj
+  Lujo
+
+
+  aug
+  Ago
+  Agosto
+
+
+  sep
+  Set
+  Setenbre
+
+
+  oct
+  Oto
+  Otobre
+
+
+  nov
+  Nov
+  Novenbre
+
+
+  dec
+  Des
+  Desenbre
+
+  
+  
+
+  bc
+  AC
+  Avanti Cristo
+
+
+  a

Re: Bug reports on LibO 5 x86 or x64-64 version on 64-bit Windows

2015-06-03 Thread Michael Stahl
On 03.06.2015 11:42, Takeshi Abe wrote:
> Hi,
> 
> Is there any simple, boilerplate way in bugzilla for reporters to tell
> whether the observed behavior of LibO 5 on 64-bit Windows is actually
> about x86 or x86-64 version (or both)?
> Current combination of fields "Version"/"Hardware"/"OS" does not suffice
> for the purpose.

the "Hardware" field can be used for this purpose.

"Hardware" allows for selecting a CPU architecture, but it does not
really matter what the CPU in the machine is, it's much more important
to know what architecture LO was compiled for.

(when it *does* matter what CPU is in the machine, "x86" is not
sufficiently granular anyway, see the recent bugs where LO crashed on
CPUs that do not support SSE2).

but like many things in bugzilla, this is not obvious because the naming
is awful...

is it possible to rename the "Hardware" field to something better in our
bugzilla installation?


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


Re: sourceforge hijack libreoffice page?

2015-06-03 Thread Simos Xenitellis
On Wed, Jun 3, 2015 at 12:58 PM, Sharuzzaman Ahmat Raslan <
sharuzza...@gmail.com> wrote:

> Hi Libreoffice developers,
>
> I was reading news about Sourceforge is hijacking nmap page in Sourceforge.
>
> When I listed the page owned by user sf-editor1, it looks like LibreOffice
> page and installer was also hijacked.
>
>
And Sourceforge staff actively add installation packages to the download
page at
http://sourceforge.net/projects/libreoffice.mirror/files/

According to
https://sourceforge.net/blog/third-party-offers-will-be-presented-with-opt-in-projects-only/
those third-party offers are now "opt-in".
Still, their actions do not justify confidence.

There are about 300-400 downloads for the latest version.

It makes sense to
1. Reclaim the LibreOffice project on SourceForge so that it no longer
belongs to "sf-editor1".
2. Properly decommission the SourceForge project page.

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


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.3' - xmloff/source

2015-06-03 Thread Caolán McNamara
 xmloff/source/text/txtparae.cxx |   13 -
 1 file changed, 8 insertions(+), 5 deletions(-)

New commits:
commit 2cfe661d435c53d3702533fc4838be6c16406d4b
Author: Caolán McNamara 
Date:   Wed Apr 22 14:10:38 2015 +0100

fix assert on export of ooo63141-1.doc to odt

if bAutoStyles is true then the mbDoSomething of the SvXMLElementExport is
false, and the ctor/dtor doesn't do anything so any attributes added to the
exporter are not cleared by the SvXMLElementExport dtor

so only add the attribute if bAutoStyles if false and might as well extend 
the
block to cover the use of SvXMLElementExport and use the other ctor which
defaults mbDoSomething on

Change-Id: If35cd35e902372562fd7e78b3f970d91fcec3c16
(cherry picked from commit bd75327c8bc1157036ca11db8c808dc7ceb2109e)

diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index 00954d6..ff5f71c 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -,13 +,16 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
 }
 else if ( sType.equals( sAnnotationEnd ) )
 {
-Reference 
xBookmark(xPropSet->getPropertyValue(sBookmark), UNO_QUERY);
-const OUString& rName = xBookmark->getName();
-if ( rName.getLength() > 0 )
+if (!bAutoStyles)
 {
-GetExport().AddAttribute(XML_NAMESPACE_OFFICE, XML_NAME, 
rName);
+Reference 
xBookmark(xPropSet->getPropertyValue(sBookmark), UNO_QUERY);
+const OUString& rName = xBookmark->getName();
+if (!rName.isEmpty())
+{
+GetExport().AddAttribute(XML_NAMESPACE_OFFICE, 
XML_NAME, rName);
+}
+SvXMLElementExport aElem( GetExport(), 
XML_NAMESPACE_OFFICE, XML_ANNOTATION_END, false, false );
 }
-SvXMLElementExport aElem( GetExport(), !bAutoStyles, 
XML_NAMESPACE_OFFICE, XML_ANNOTATION_END, false, false );
 }
 else if( sType.equals( sFrame ) )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-06-03 Thread Julien Nabet
 sc/source/ui/miscdlgs/scuiautofmt.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3807946b5515e943169da907866c93b52a2b3f19
Author: Julien Nabet 
Date:   Sun May 31 15:17:19 2015 +0200

tdf#91726: AutoFormat: Crash when using an existing name

Add a test to check if name already exists

Change-Id: Ie23de04c0b747f58ab61a6e498bf212bf38b346a
Reviewed-on: https://gerrit.libreoffice.org/16000
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sc/source/ui/miscdlgs/scuiautofmt.cxx 
b/sc/source/ui/miscdlgs/scuiautofmt.cxx
index 773169d..fb9a601 100644
--- a/sc/source/ui/miscdlgs/scuiautofmt.cxx
+++ b/sc/source/ui/miscdlgs/scuiautofmt.cxx
@@ -233,7 +233,7 @@ IMPL_LINK_NOARG(ScAutoFormatDlg, AddHdl)
 {
 aFormatName = pDlg->GetInputString();
 
-if ( !aFormatName.isEmpty() && 
!aFormatName.equals(aStrStandard) )
+if ( !aFormatName.isEmpty() && 
!aFormatName.equals(aStrStandard) && pFormat->find(aFormatName) == 
pFormat->end() )
 {
 ScAutoFormatData* pNewData
 = new ScAutoFormatData( *pSelFmtData );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - vcl/source

2015-06-03 Thread László Németh
 vcl/source/window/toolbox.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 103790cefe77c7aa46c9177b91997b1342a65d67
Author: László Németh 
Date:   Tue Jun 2 18:08:36 2015 +0200

fix rendercontext rendering of toolbox

(cherry-picked from 751d697db61341a481178b86c6b28efa7d3c7d64)

Change-Id: I927a7ffdac278384ef102e6619f217daf24879a2
Reviewed-on: https://gerrit.libreoffice.org/16042
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index e179501..f79fa80 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -3095,7 +3095,7 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& 
rRenderContext, sal_uInt16 nPos,
 mpData->m_pLayoutData->m_aLineItemIds.push_back( pItem->mnId );
 mpData->m_pLayoutData->m_aLineItemPositions.push_back( nPos );
 }
-DrawCtrlText( aPos, pItem->maText, 0, pItem->maText.getLength(), 
DrawTextFlags::Mnemonic, pVector, pDisplayText );
+rRenderContext.DrawCtrlText( aPos, pItem->maText, 0, 
pItem->maText.getLength(), DrawTextFlags::Mnemonic, pVector, pDisplayText );
 if (bClip)
 rRenderContext.SetClipRegion();
 rRenderContext.SetFont(aOldFont);
@@ -3258,7 +3258,7 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& 
rRenderContext, sal_uInt16 nPos,
 mpData->m_pLayoutData->m_aLineItemIds.push_back( pItem->mnId );
 mpData->m_pLayoutData->m_aLineItemPositions.push_back( nPos );
 }
-DrawCtrlText( Point( nTextOffX, nTextOffY ), pItem->maText,
+rRenderContext.DrawCtrlText( Point( nTextOffX, nTextOffY ), 
pItem->maText,
   0, pItem->maText.getLength(), nTextStyle, pVector, 
pDisplayText );
 if ( bRotate )
 SetFont( aOldFont );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-06-03 Thread Miklos Vajna
 sw/qa/extras/rtfimport/data/tdf86814.rtf   |8 +++
 sw/qa/extras/rtfimport/rtfimport.cxx   |6 ++
 writerfilter/source/rtftok/rtfdocumentimpl.cxx |   57 ++---
 3 files changed, 47 insertions(+), 24 deletions(-)

New commits:
commit 4c3afdb31382099005a16d2dd64a742c749f06ab
Author: Miklos Vajna 
Date:   Mon May 18 07:38:32 2015 +0200

tdf#86814 RTF import: fix sometimes lost bold style

The problem was that commit 76c0d0abc89cd8948706083c2660b71a2dad670c
(RTF import: adapt getProperties() to createStyleProperties(),
2014-09-07) only made the character style sprms/attributes a flat list,
but not the paragraph style ones. Fixing that inconsistency avoids the
tokenizer adding unwanted default sprms, which cause the bold sprms go
away in the bugdoc.

Change-Id: I86bd1b26af18cd968375c9b39be9c8e71d51271f
(cherry picked from commit cbe79789a0fc9b80b2fd14a5abfe0973a2cb69dc)
Reviewed-on: https://gerrit.libreoffice.org/16051
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/qa/extras/rtfimport/data/tdf86814.rtf 
b/sw/qa/extras/rtfimport/data/tdf86814.rtf
new file mode 100644
index 000..6fb394e
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/tdf86814.rtf
@@ -0,0 +1,8 @@
+{\rtf1
+{\stylesheet
+{\s0 Normal;}
+{\s23\sbasedon0\snext23\sl288\slmult1\ql\widctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb100\sa100\ltrpar\b\dbch\af10\langfe1049\dbch\af11\afs20\alang1025\ab\loch\f5\fs20\lang1049
 Style 23;}
+}
+\pard\plain 
\s23\sl288\slmult1\ql\widctlpar\faauto\li0\ri0\lin0\rin0\fi0\sb100\sa100\ltrpar\b\dbch\af10\langfe1049\dbch\af11\afs20\alang1025\ab\loch\f5\fs20\lang1049\ql\widctlpar\faauto\li0\ri0\lin0\rin0\fi0
+{\b\langfe1049\dbch\af11\afs20\alang1025\ab\rtlch \ltrch\loch\fs20\lang1049 
hello}
+\par}
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx 
b/sw/qa/extras/rtfimport/rtfimport.cxx
index 0a57d66..bfa13c5 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -2290,6 +2290,12 @@ DECLARE_RTFIMPORT_TEST(testTdf90260Par, "hello.rtf")
 CPPUNIT_ASSERT_EQUAL(2, getParagraphs());
 }
 
+DECLARE_RTFIMPORT_TEST(testTdf86814, "tdf86814.rtf")
+{
+// This was awt::FontWeight::NORMAL, i.e. the first run wasn't bold, when 
it should be bold (applied paragraph style with direct formatting).
+CPPUNIT_ASSERT_EQUAL(awt::FontWeight::BOLD, 
getProperty(getRun(getParagraph(1), 1), "CharWeight"));
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx 
b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 0941d85..75978e4 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -417,6 +417,32 @@ void RTFDocumentImpl::setNeedSect(bool bNeedSect)
 }
 }
 
+/// Copy rProps to rStyleAttributes and rStyleSprms, but in case of nested 
sprms, copy their children as toplevel sprms/attributes.
+static void lcl_copyFlatten(RTFReferenceProperties& rProps, RTFSprms& 
rStyleAttributes, RTFSprms& rStyleSprms)
+{
+for (RTFSprms::Iterator_t it = rProps.getSprms().begin(); it != 
rProps.getSprms().end(); ++it)
+{
+// createStyleProperties() puts properties to rPr, but here we need a 
flat list.
+if (it->first == NS_ooxml::LN_CT_Style_rPr)
+{
+// rPr can have both attributes and SPRMs, copy over both types.
+RTFSprms& rRPrSprms = it->second->getSprms();
+for (RTFSprms::Iterator_t itRPrSprm = rRPrSprms.begin(); itRPrSprm 
!= rRPrSprms.end(); ++itRPrSprm)
+rStyleSprms.set(itRPrSprm->first, itRPrSprm->second);
+
+RTFSprms& rRPrAttributes = it->second->getAttributes();
+for (RTFSprms::Iterator_t itRPrAttribute = rRPrAttributes.begin(); 
itRPrAttribute != rRPrAttributes.end(); ++itRPrAttribute)
+rStyleAttributes.set(itRPrAttribute->first, 
itRPrAttribute->second);
+}
+else
+rStyleSprms.set(it->first, it->second);
+}
+
+RTFSprms& rAttributes = rProps.getAttributes();
+for (RTFSprms::Iterator_t itAttr = rAttributes.begin(); itAttr != 
rAttributes.end(); ++itAttr)
+rStyleAttributes.set(itAttr->first, itAttr->second);
+}
+
 writerfilter::Reference::Pointer_t 
RTFDocumentImpl::getProperties(RTFSprms& rAttributes, RTFSprms& rSprms)
 {
 int nStyle = 0;
@@ -431,34 +457,17 @@ writerfilter::Reference::Pointer_t 
RTFDocumentImpl::getProperties(RT
 // let's merge paragraph and character style properties here.
 int nCharStyle = m_aStates.top().nCurrentCharacterStyleIndex;
 RTFReferenceTable::Entries_t::iterator itChar = 
m_aStyleTableEntries.find(nCharStyle);
-RTFSprms aStyleSprms = rProps.getSprms();
-RTFSprms aStyleAttributes = rProps.getAttributes();
+RTFSprms aStyleSprms;
+RTFSprms aStyleAttributes;
+
+// Ensure th

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.0' - 2 commits - sfx2/source svtools/source

2015-06-03 Thread Tor Lillqvist
 sfx2/source/control/dispatch.cxx|5 +++--
 svtools/source/config/slidesorterbaropt.cxx |5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

New commits:
commit 692b77f7855c44843359486a00b06b468a96c8f8
Author: Tor Lillqvist 
Date:   Wed Jun 3 12:14:52 2015 +0300

Avoid various desktop GUI elements when used from LibreOfficeKit

Change-Id: Id283d185ab38427ce6887ead4e414055522e655c

diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 5e6f9bc..0b9555a 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -30,6 +30,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -1168,7 +1169,7 @@ void SfxDispatcher::Update_Impl( bool bForce )
 return;
 
 SfxViewFrame* pTop = xImp->pFrame ? xImp->pFrame->GetTopViewFrame() : NULL;
-bool bUIActive = pTop && pTop->GetBindings().GetDispatcher() == this;
+bool bUIActive = pTop && pTop->GetBindings().GetDispatcher() == this && 
!comphelper::LibreOfficeKit::isActive();
 
 if ( !bUIActive && pTop && GetBindings() == &pTop->GetBindings() )
 // keep own tools internally for collecting
@@ -1232,7 +1233,7 @@ void SfxDispatcher::Update_Impl( bool bForce )
 }
 
 _Update_Impl( bUIActive, !bIsIPActive, bIsIPActive, pTaskWin );
-if ( bUIActive || bIsActive )
+if ( (bUIActive || bIsActive) && !comphelper::LibreOfficeKit::isActive() )
 pWorkWin->UpdateObjectBars_Impl();
 
 if ( pBindings )
commit c84de2c9e8092285e6ee630b36fece23937a1f74
Author: Jan Holesovsky 
Date:   Wed Jun 3 10:19:28 2015 +0200

lok: Avoid instantiation of the slide sorter bar

Change-Id: Ia21bea54d1d6bd34256cb45ed704c6f7785fc2fc

diff --git a/svtools/source/config/slidesorterbaropt.cxx 
b/svtools/source/config/slidesorterbaropt.cxx
index dd62de3..9c729c0 100644
--- a/svtools/source/config/slidesorterbaropt.cxx
+++ b/svtools/source/config/slidesorterbaropt.cxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 
+#include 
 #include 
 
 using namespace ::utl;
@@ -345,7 +346,7 @@ SvtSlideSorterBarOptions::~SvtSlideSorterBarOptions()
 
 bool SvtSlideSorterBarOptions::GetVisibleImpressView() const
 {
-return m_pDataContainer->m_bVisibleImpressView;
+return m_pDataContainer->m_bVisibleImpressView && 
!comphelper::LibreOfficeKit::isActive();
 }
 
 void SvtSlideSorterBarOptions::SetVisibleImpressView(bool bVisible)
@@ -385,7 +386,7 @@ void SvtSlideSorterBarOptions::SetVisibleHandoutView(bool 
bVisible)
 
 bool SvtSlideSorterBarOptions::GetVisibleSlideSorterView() const
 {
-return m_pDataContainer->m_bVisibleSlideSorterView;
+return m_pDataContainer->m_bVisibleSlideSorterView && 
!comphelper::LibreOfficeKit::isActive();
 }
 
 void SvtSlideSorterBarOptions::SetVisibleSlideSorterView(bool bVisible)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-06-03 Thread Tor Lillqvist
 sfx2/source/control/dispatch.cxx|5 +++--
 svtools/source/config/slidesorterbaropt.cxx |5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

New commits:
commit d62bf7e0a49dca2b05b3c25aa63a2087a490dcc3
Author: Tor Lillqvist 
Date:   Wed Jun 3 12:14:52 2015 +0300

Avoid various desktop GUI elements when used from LibreOfficeKit

Change-Id: Id283d185ab38427ce6887ead4e414055522e655c

diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 5e6f9bc..0b9555a 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -30,6 +30,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -1168,7 +1169,7 @@ void SfxDispatcher::Update_Impl( bool bForce )
 return;
 
 SfxViewFrame* pTop = xImp->pFrame ? xImp->pFrame->GetTopViewFrame() : NULL;
-bool bUIActive = pTop && pTop->GetBindings().GetDispatcher() == this;
+bool bUIActive = pTop && pTop->GetBindings().GetDispatcher() == this && 
!comphelper::LibreOfficeKit::isActive();
 
 if ( !bUIActive && pTop && GetBindings() == &pTop->GetBindings() )
 // keep own tools internally for collecting
@@ -1232,7 +1233,7 @@ void SfxDispatcher::Update_Impl( bool bForce )
 }
 
 _Update_Impl( bUIActive, !bIsIPActive, bIsIPActive, pTaskWin );
-if ( bUIActive || bIsActive )
+if ( (bUIActive || bIsActive) && !comphelper::LibreOfficeKit::isActive() )
 pWorkWin->UpdateObjectBars_Impl();
 
 if ( pBindings )
commit 561fd3a1156623f84ae48462b1e508909f254e9e
Author: Jan Holesovsky 
Date:   Wed Jun 3 10:19:28 2015 +0200

lok: Avoid instantiation of the slide sorter bar

Change-Id: Ia21bea54d1d6bd34256cb45ed704c6f7785fc2fc

diff --git a/svtools/source/config/slidesorterbaropt.cxx 
b/svtools/source/config/slidesorterbaropt.cxx
index dd62de3..9c729c0 100644
--- a/svtools/source/config/slidesorterbaropt.cxx
+++ b/svtools/source/config/slidesorterbaropt.cxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 
+#include 
 #include 
 
 using namespace ::utl;
@@ -345,7 +346,7 @@ SvtSlideSorterBarOptions::~SvtSlideSorterBarOptions()
 
 bool SvtSlideSorterBarOptions::GetVisibleImpressView() const
 {
-return m_pDataContainer->m_bVisibleImpressView;
+return m_pDataContainer->m_bVisibleImpressView && 
!comphelper::LibreOfficeKit::isActive();
 }
 
 void SvtSlideSorterBarOptions::SetVisibleImpressView(bool bVisible)
@@ -385,7 +386,7 @@ void SvtSlideSorterBarOptions::SetVisibleHandoutView(bool 
bVisible)
 
 bool SvtSlideSorterBarOptions::GetVisibleSlideSorterView() const
 {
-return m_pDataContainer->m_bVisibleSlideSorterView;
+return m_pDataContainer->m_bVisibleSlideSorterView && 
!comphelper::LibreOfficeKit::isActive();
 }
 
 void SvtSlideSorterBarOptions::SetVisibleSlideSorterView(bool bVisible)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Bug reports on LibO 5 x86 or x64-64 version on 64-bit Windows

2015-06-03 Thread Takeshi Abe
Hi,

Is there any simple, boilerplate way in bugzilla for reporters to tell
whether the observed behavior of LibO 5 on 64-bit Windows is actually
about x86 or x86-64 version (or both)?
Current combination of fields "Version"/"Hardware"/"OS" does not suffice
for the purpose.

For example, the reporter of [1] said that the crash happens with x86-64
version but not with x86 one on 64-bit Windows [2].
So I suppose that it is due to loading 32-bit TWAIN library, and that
it would be helpful to clarify which one of the two version is described
in some other issues on 64-bit Windows.

[1] https://bugs.documentfoundation.org/show_bug.cgi?id=91615
[2] http://listarchives.libreoffice.org/ja/discuss/msg03607.html (in Japanese)

Cheers,
-- Takeshi Abe
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[GSoC] More and Better Tests - Weekly Report #1 ( Varun Dhall)

2015-06-03 Thread Varun Dhall
Hi all!

First week of GSoC was passed in reading the existing code-base and going 
through some bugs (which are now resolved but lack tests)

These are the changes made so far :

https://gerrit.libreoffice.org/#/c/15924/
written a shell script to remove the thumbnail from test documents (saving 
space), it has been pushed to the dev-tools repository, as
"scripts/remove-thumbnail.sh".

I am currently working on other tests and very soon I will commit the on-going 
changes.

Future Goals - Adding more tests for bugs that are fixed recently, writing a 
regression test for them so that anomalies can be detected at early stages of 
development.

Regards,
Varun Dhall



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


Re: URP: queryInterface request message with unknown OID received

2015-06-03 Thread Stephan Bergmann

On 06/02/2015 02:32 PM, Lionel Elie Mamane wrote:

So, if you would like to work on that (which would make me happier),
then apply the attached patch, then:
  make JunitTest_dbaccess_complex
several times in a row, and you should get the problem. If not, try
uncommenting more "@Test" instances.


Thanks for the reproducer.  Looking into it a bit, it smells like a 
reincarnation of an ages-old phenomenon where the JVM garbage-collects 
objects "too aggressively" (i.e., with the object still nominally on the 
call stack, but optimized away) and we thus send a release call from 
Java URP to binary URP too soon.  I'll look into it further.


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


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

2015-06-03 Thread Caolán McNamara
 sc/source/ui/vba/vbaeventshelper.cxx |9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 5f36b1954438caef95053c2c0b7d0417e1aa5b31
Author: Caolán McNamara 
Date:   Wed Jun 3 10:57:18 2015 +0100

intermittent CppunitTest_sc_macros_test failure

void OutputDevice::acquire() const: Assertion `mnRefCnt>0' failed"

Window gets destroyed between postWindowResizeEvent and 
processWindowResizeEvent

Change-Id: I3452a23ad8c3b6d863a56b73166520ef103dad1b

diff --git a/sc/source/ui/vba/vbaeventshelper.cxx 
b/sc/source/ui/vba/vbaeventshelper.cxx
index d35e885..e787031 100644
--- a/sc/source/ui/vba/vbaeventshelper.cxx
+++ b/sc/source/ui/vba/vbaeventshelper.cxx
@@ -169,7 +169,8 @@ private:
 uno::Reference< frame::XModel > mxModel;
 ScDocShell* mpDocShell;
 WindowControllerMap maControllers;  /// Maps VCL top windows to 
their controllers.
-VclPtrmpActiveWindow; /// Currently 
activated window, to prevent multiple (de)activation.
+std::set< VclPtr > maPostedWindows; /// Keeps 
processWindowResizeEvent windows from being deleted between 
postWindowResizeEvent and processWindowResizeEvent
+VclPtrmpActiveWindow; /// Currently activated 
window, to prevent multiple (de)activation.
 boolmbWindowResized;/// True = window resize 
system event processed.
 boolmbBorderChanged;/// True = borders changed 
system event processed.
 boolmbDisposed;
@@ -219,7 +220,9 @@ void ScVbaEventListener::startControllerListening( const 
uno::Reference< frame::
 try { xControllerBorder->addBorderResizeListener( this ); } catch( 
uno::Exception& ) {}
 
 if( vcl::Window* pWindow = VCLUnoHelper::GetWindow( xWindow ) )
+{
 maControllers[ pWindow ] = rxController;
+}
 }
 
 void ScVbaEventListener::stopControllerListening( const uno::Reference< 
frame::XController >& rxController )
@@ -468,6 +471,7 @@ void ScVbaEventListener::postWindowResizeEvent( 
vcl::Window* pWindow )
 {
 mbWindowResized = mbBorderChanged = false;
 acquire();  // ensure we don't get deleted before the timer fires
+maPostedWindows.insert(pWindow);
 Application::PostUserEvent( LINK( this, ScVbaEventListener, 
processWindowResizeEvent ), pWindow );
 }
 }
@@ -484,7 +488,7 @@ IMPL_LINK( ScVbaEventListener, processWindowResizeEvent, 
vcl::Window*, pWindow )
 This is handled via the disposing() function which removes the window
 pointer from the member maControllers. Thus, checking whether
 maControllers contains pWindow ensures that the window is still alive. 
*/
-if( !mbDisposed && pWindow && (maControllers.count( pWindow ) > 0) )
+if( !mbDisposed && pWindow && !pWindow->IsDisposed() && 
(maControllers.count(pWindow) > 0) )
 {
 // do not fire event unless all mouse buttons have been released
 vcl::Window::PointerState aPointerState = pWindow->GetPointerState();
@@ -500,6 +504,7 @@ IMPL_LINK( ScVbaEventListener, processWindowResizeEvent, 
vcl::Window*, pWindow )
 }
 }
 }
+maPostedWindows.erase(pWindow);
 release();
 return 0;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


sourceforge hijack libreoffice page?

2015-06-03 Thread Sharuzzaman Ahmat Raslan
Hi Libreoffice developers,

I was reading news about Sourceforge is hijacking nmap page in Sourceforge.

When I listed the page owned by user sf-editor1, it looks like LibreOffice
page and installer was also hijacked.

Are you aware of this?

Thanks


http://seclists.org/nmap-dev/2015/q2/194
http://sourceforge.net/projects/libreoffice.mirror/
http://sourceforge.net/u/sf-editor1/profile/

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


Re: About skip SkipImages unit test on MacOs

2015-06-03 Thread Robert Antoni Buj i Gelonch
I attach the bt, if someone is interested I can print the variables of a
specific frame.

make CppunitTest_sw_globalfilter

(lldb) breakpoint set --file
/Volumes/Master/lo/core/sw/qa/extras/globalfilter/globalfilter.cxx --line
663

(lldb) run

(lldb) breakpoint set --file
/Volumes/Master/lo/core/vcl/source/outdev/map.cxx --line 382 --condition
"n==9223372036854755805"

(lldb) c

(lldb) list
   386n64 *= nMapNum;
   387n64 *= nDPI;
   388if( nMapDenom == 1 )
   389   n = (long)n64;
   390else
   391{
   392   n = (long)(2 * n64 / nMapDenom);

(lldb) bt
* thread #1: tid = 0x2e6349, 0x000105d3354a
libvcllo.dylib`ImplLogicToPixel(n=9223372036854755805, nDPI=72, nMapNum=1,
nMapDenom=1600, nThres=64051194700380381) + 170 at map.cxx:382, queue =
'com.apple.main-thread', stop reason = breakpoint 2.1
  * frame #0: 0x000105d3354a
libvcllo.dylib`ImplLogicToPixel(n=9223372036854755805, nDPI=72, nMapNum=1,
nMapDenom=1600, nThres=64051194700380381) + 170 at map.cxx:382
frame #1: 0x000105d37338
libvcllo.dylib`OutputDevice::LogicToPixel(this=0x0001029947f0,
rLogicRect=0x7fff5fbecd58) const + 184 at map.cxx:998
frame #2: 0x00010cc8cf27
libswlo.dylib`SwAlignRect(rRect=0x7fff5fbed2d8, pSh=0x000121f06300)
+ 231 at paintfrm.cxx:1254
frame #3: 0x00010cca874d
libswlo.dylib`lcl_CalcBorderRect(rRect=0x7fff5fbed2d8,
pFrm=0x000121f085f0, rAttrs=0x00011a10bf18, bShadow=false,
properties=0x00010dca4e10) + 3005 at paintfrm.cxx:1512
frame #4: 0x00010cca3d18
libswlo.dylib`SwFrm::GetBackgroundBrush(this=0x000121f085f0,
rFillAttributes=0x7fff5fbed2c8, rpBrush=0x7fff5fbed300,
rpCol=0x7fff5fbed2f8, rOrigRect=0x7fff5fbed2d8, bLowerMode=false)
const + 1736 at paintfrm.cxx:7596
frame #5: 0x00010cca333e
libswlo.dylib`SwFlyFrm::IsBackgroundTransparent(this=0x000121f085f0)
const + 238 at paintfrm.cxx:3973
frame #6: 0x00010ccb6c65
libswlo.dylib`lcl_RefreshLine(pLay=0x000121f07040,
pPage=0x00011a10a000, rP1=0x7fff5fbed838, rP2=0x7fff5fbed808,
nSubColor='\x10', pSubsLines=0x00011ebcb7a0) + 1221 at paintfrm.cxx:6858
frame #7: 0x00010ccb620f
libswlo.dylib`SwLayoutFrm::PaintSubsidiaryLines(this=0x000121f07040,
pPage=0x00011a10a000, rRect=0x7fff5fbede90) const + 1391 at
paintfrm.cxx:7175
frame #8: 0x00010cca750d
libswlo.dylib`SwLayoutFrm::RefreshLaySubsidiary(this=0x000121f07040,
pPage=0x00011a10a000, rRect=0x7fff5fbede90) const + 205 at
paintfrm.cxx:6750
frame #9: 0x00010cca572a
libswlo.dylib`SwFlyFrm::Paint(this=0x000121f07040,
rRect=0x000121f070a0, (null)=0x) const + 5018 at
paintfrm.cxx:4333
frame #10: 0x00010ca7be6e
libswlo.dylib`SwVirtFlyDrawObj::wrap_DoPaintObject(this=0x000121f07250,
rViewInformation=0x0001251e4be8) const + 366 at dflyobj.cxx:486
frame #11: 0x00010ca7bcd7
libswlo.dylib`drawinglayer::primitive2d::SwVirtFlyDrawObjPrimitive::get2DDecomposition(this=0x000102a251f0,
rViewInformation=0x0001251e4be8) const + 55 at dflyobj.cxx:240
frame #12: 0x000111ff0e1f
libdrawinglayerlo.dylib`drawinglayer::processor2d::VclPixelProcessor2D::processBasePrimitive2D(this=0x0001251e4be0,
rCandidate=0x000102a251f0) + 14383 at vclpixelprocessor2d.cxx:1242
frame #13: 0x000111fc4506
libdrawinglayerlo.dylib`drawinglayer::processor2d::BaseProcessor2D::process(this=0x0001251e4be0,
rSource=0x7fff5fbef088) + 310 at baseprocessor2d.cxx:64
frame #14: 0x000114a50982
libsvxcorelo.dylib`sdr::contact::ObjectContactOfPageView::DoProcessDisplay(this=0x00010289ade0,
rDisplayInfo=0x7fff5fbef2d0) + 2322 at objectcontactofpageview.cxx:301
frame #15: 0x000114a50015
libsvxcorelo.dylib`sdr::contact::ObjectContactOfPageView::ProcessDisplay(this=0x00010289ade0,
rDisplayInfo=0x7fff5fbef2d0) + 133 at objectcontactofpageview.cxx:122
frame #16: 0x000114ab1e4a
libsvxcorelo.dylib`SdrPageWindow::RedrawLayer(this=0x00012051b1f0,
pId=0x7fff5fbef587, pRedirector=0x7fff5fbefeb0) + 618 at
sdrpagewindow.cxx:403
frame #17: 0x000114cb693b
libsvxcorelo.dylib`SdrPageView::DrawLayer(this=0x000121f10f70,
nID='\x01', pGivenTarget=0x0001029947f0,
pRedirector=0x7fff5fbefeb0, rRect=0x7fff5fbef678) + 715 at
svdpagv.cxx:367
frame #18: 0x00010d302d80
libswlo.dylib`SwViewShellImp::PaintLayer(this=0x000121f06640,
_nLayerID='\x01', pPrintData=0x,
aPaintRect=0x00011a10a060, _pPageBackgrdColor=0x7fff5fbefd98,
_bIsPageRightToLeft=false, pRedirector=0x7fff5fbefeb0) + 1072 at
vdraw.cxx:140
frame #19: 0x00010cc98b2c
libswlo.dylib`SwRootFrm::Paint(this=0x000121f06700,
rRect=0x7fff5fbf0370, pPrintData=0x) const + 6508 at
paintfrm.cxx:3417
frame #20: 0x00010d3118ce
libswlo.dylib`SwViewShell::Paint(this=0x000121f06300,
rRenderContext=0x0001

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

2015-06-03 Thread Caolán McNamara
 sw/qa/extras/ooxmlexport/data/ooo34469-1.odt  |binary
 sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx |6 ++
 sw/source/filter/ww8/docxattributeoutput.cxx  |8 ++--
 3 files changed, 12 insertions(+), 2 deletions(-)

New commits:
commit 9d0c6308be5fb086e51cb8b4b0652f3d6184fd3c
Author: Caolán McNamara 
Date:   Wed Jun 3 10:20:01 2015 +0100

fix crash on export of ooo34469-1.sxw to docx

Change-Id: I94a11bd24ccbc550c9fa555b1a0b5493ccd9f904

diff --git a/sw/qa/extras/ooxmlexport/data/ooo34469-1.odt 
b/sw/qa/extras/ooxmlexport/data/ooo34469-1.odt
new file mode 100644
index 000..7cf031f
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/ooo34469-1.odt differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
index 9121588..5e18937 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
@@ -671,6 +671,12 @@ DECLARE_OOXMLEXPORT_TEST(testFixedDateFields, 
"fixed-date-field.docx")
 }
 }
 
+DECLARE_OOXMLEXPORT_TEST(testOO34469, "ooo34469-1.odt")
+{
+if (xmlDocPtr pXmlDoc = parseExport())
+assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:hyperlink[1]", 
"anchor", "2.9.2.Creating New files|outline");
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 16068b0..25eec02 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1051,7 +1051,7 @@ void DocxAttributeOutput::EndRun()
 }
 
 // Write field starts
-for ( std::vector::iterator pIt = m_Fields.begin(); pIt != 
m_Fields.end(); )
+for ( std::vector::iterator pIt = m_Fields.begin() + 
nFieldsInPrevHyperlink; pIt != m_Fields.end(); )
 {
 // Add the fields starts for all but hyperlinks and TOCs
 if ( pIt->bOpen && pIt->pField )
@@ -1265,6 +1265,7 @@ void DocxAttributeOutput::EndRun()
 EndField_Impl( m_Fields.back( ) );
 m_Fields.pop_back();
 }
+m_nFieldsInHyperlink = 0;
 
 m_pSerializer->endElementNS( XML_w, XML_hyperlink );
 m_startedHyperlink = false;
@@ -1273,12 +1274,15 @@ void DocxAttributeOutput::EndRun()
 m_closeHyperlinkInThisRun = false;
 }
 
-if(!m_startedHyperlink)
+if (!m_startedHyperlink)
+{
 while ( m_Fields.begin() != m_Fields.end() )
 {
 EndField_Impl( m_Fields.front( ) );
 m_Fields.erase( m_Fields.begin( ) );
 }
+m_nFieldsInHyperlink = 0;
+}
 }
 
 void DocxAttributeOutput::DoWriteBookmarks()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Bug 75025] LibreOffice 4.3 most annoying bugs

2015-06-03 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=75025

Michael Stahl  changed:

   What|Removed |Added

   Keywords|have-backtrace  |
  Component|Calc|LibreOffice
   Hardware|x86-64 (AMD64)  |All
Version|4.4.3.2 rc  |unspecified
 OS|Linux (All) |All

--- Comment #114 from Michael Stahl  ---
undo damage from last edit

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2015-06-03 Thread Tor Lillqvist
 sfx2/source/control/dispatch.cxx|5 +++--
 svtools/source/config/slidesorterbaropt.cxx |5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

New commits:
commit c0b70ec34d5e056bb92a66cbf83838923cb41fee
Author: Tor Lillqvist 
Date:   Wed Jun 3 12:14:52 2015 +0300

Avoid various desktop GUI elements when used from LibreOfficeKit

Change-Id: Id283d185ab38427ce6887ead4e414055522e655c

diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index f9f2ef8..274db68 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -30,6 +30,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -1168,7 +1169,7 @@ void SfxDispatcher::Update_Impl( bool bForce )
 return;
 
 SfxViewFrame* pTop = xImp->pFrame ? xImp->pFrame->GetTopViewFrame() : NULL;
-bool bUIActive = pTop && pTop->GetBindings().GetDispatcher() == this;
+bool bUIActive = pTop && pTop->GetBindings().GetDispatcher() == this && 
!comphelper::LibreOfficeKit::isActive();
 
 if ( !bUIActive && pTop && GetBindings() == &pTop->GetBindings() )
 // keep own tools internally for collecting
@@ -1232,7 +1233,7 @@ void SfxDispatcher::Update_Impl( bool bForce )
 }
 
 _Update_Impl( bUIActive, !bIsIPActive, bIsIPActive, pTaskWin );
-if ( bUIActive || bIsActive )
+if ( (bUIActive || bIsActive) && !comphelper::LibreOfficeKit::isActive() )
 pWorkWin->UpdateObjectBars_Impl();
 
 if ( pBindings )
commit 5f39d1078f01e440e719acca34688b2768d66807
Author: Jan Holesovsky 
Date:   Wed Jun 3 10:19:28 2015 +0200

lok: Avoid instantiation of the slide sorter bar

Change-Id: Ia21bea54d1d6bd34256cb45ed704c6f7785fc2fc

diff --git a/svtools/source/config/slidesorterbaropt.cxx 
b/svtools/source/config/slidesorterbaropt.cxx
index dd62de3..9c729c0 100644
--- a/svtools/source/config/slidesorterbaropt.cxx
+++ b/svtools/source/config/slidesorterbaropt.cxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 
+#include 
 #include 
 
 using namespace ::utl;
@@ -345,7 +346,7 @@ SvtSlideSorterBarOptions::~SvtSlideSorterBarOptions()
 
 bool SvtSlideSorterBarOptions::GetVisibleImpressView() const
 {
-return m_pDataContainer->m_bVisibleImpressView;
+return m_pDataContainer->m_bVisibleImpressView && 
!comphelper::LibreOfficeKit::isActive();
 }
 
 void SvtSlideSorterBarOptions::SetVisibleImpressView(bool bVisible)
@@ -385,7 +386,7 @@ void SvtSlideSorterBarOptions::SetVisibleHandoutView(bool 
bVisible)
 
 bool SvtSlideSorterBarOptions::GetVisibleSlideSorterView() const
 {
-return m_pDataContainer->m_bVisibleSlideSorterView;
+return m_pDataContainer->m_bVisibleSlideSorterView && 
!comphelper::LibreOfficeKit::isActive();
 }
 
 void SvtSlideSorterBarOptions::SetVisibleSlideSorterView(bool bVisible)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-06-03 Thread Stephan Bergmann
 sfx2/qa/cppunit/test_controlleritem.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6ce92bc266785b5347c0757e1245187e2c00cfaf
Author: Stephan Bergmann 
Date:   Wed Jun 3 11:09:54 2015 +0200

loplugin:saloverride

Change-Id: I1d3cd2ff9a2c579d23b97a6ab8e9cf2baadf0439

diff --git a/sfx2/qa/cppunit/test_controlleritem.cxx 
b/sfx2/qa/cppunit/test_controlleritem.cxx
index ee48f46..fe9637f 100644
--- a/sfx2/qa/cppunit/test_controlleritem.cxx
+++ b/sfx2/qa/cppunit/test_controlleritem.cxx
@@ -39,7 +39,7 @@ static bool bDeleted = false;
 class FooController : public SfxControllerItem {
 public:
 FooController() : SfxControllerItem() {}
-~FooController() { bDeleted = true; }
+virtual ~FooController() { bDeleted = true; }
 };
 
 void ControllerItemTest::test()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-06-03 Thread Stephan Bergmann
 sfx2/CppunitTest_sfx2_controlleritem.mk |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit a69d89435d12529c1af818bc72192588d8abea18
Author: Stephan Bergmann 
Date:   Wed Jun 3 11:09:01 2015 +0200

Missing boost_headers

Change-Id: Ic85b888ee89d0b49410d26be55333e31ffc07c0b

diff --git a/sfx2/CppunitTest_sfx2_controlleritem.mk 
b/sfx2/CppunitTest_sfx2_controlleritem.mk
index ce0227a..926719b 100644
--- a/sfx2/CppunitTest_sfx2_controlleritem.mk
+++ b/sfx2/CppunitTest_sfx2_controlleritem.mk
@@ -12,6 +12,9 @@ $(eval $(call gb_CppunitTest_use_sdk_api,sfx2_controlleritem))
 $(eval $(call gb_CppunitTest_add_exception_objects,sfx2_controlleritem, \
 sfx2/qa/cppunit/test_controlleritem \
 ))
+$(eval $(call gb_CppunitTest_use_externals,sfx2_controlleritem, \
+boost_headers \
+))
 $(eval $(call gb_CppunitTest_use_libraries,sfx2_controlleritem, \
cppu \
cppuhelper \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - external/neon tools/source

2015-06-03 Thread Stephan Bergmann
 external/neon/UnpackedTarball_neon.mk |1 +
 external/neon/ubsan.patch |   11 +++
 tools/source/stream/stream.cxx|2 +-
 3 files changed, 13 insertions(+), 1 deletion(-)

New commits:
commit e0308504b20e0ce8f3964e34104e7d700465980b
Author: Stephan Bergmann 
Date:   Wed Jun 3 10:51:13 2015 +0200

-fsanitize=nonnull-attribute in memcpy call

Change-Id: Ifbba19693ce0182a5d367b1621ade4780f152add

diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index b96da82..79c3717 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -1908,7 +1908,7 @@ bool SvMemoryStream::ReAllocateMemory( long nDiff )
 if( nEndOfData >= nNewSize )
 nEndOfData = nNewSize-1L;
 }
-else
+else if (nSize != 0)
 {
 memcpy( pNewBuf, pBuf, (size_t)nSize );
 }
commit 9ec9ef471d23ae40a955b3b105d397544b938915
Author: Stephan Bergmann 
Date:   Wed Jun 3 10:50:53 2015 +0200

external/neon: -fsanitize=shift

Change-Id: I82255efc3a4fbcb07b6f747af6ef81124a5fb96f

diff --git a/external/neon/UnpackedTarball_neon.mk 
b/external/neon/UnpackedTarball_neon.mk
index 1b922df..3a4b58a 100644
--- a/external/neon/UnpackedTarball_neon.mk
+++ b/external/neon/UnpackedTarball_neon.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,neon,\
external/neon/neon.patch \
external/neon/neon_ne_set_request_flag.patch \
external/neon/neon_with_gnutls.patch \
+   external/neon/ubsan.patch \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/neon/ubsan.patch b/external/neon/ubsan.patch
new file mode 100644
index 000..56445fc
--- /dev/null
+++ b/external/neon/ubsan.patch
@@ -0,0 +1,11 @@
+--- src/ne_compress.c
 src/ne_compress.c
+@@ -81,7 +81,7 @@
+ };
+ 
+ /* Convert 'buf' to unsigned int; 'buf' must be 'unsigned char *' */
+-#define BUF2UINT(buf) (((buf)[3]<<24) + ((buf)[2]<<16) + ((buf)[1]<<8) + 
(buf)[0])
++#define BUF2UINT(buf) (((unsigned)((buf)[3])<<24) + ((buf)[2]<<16) + 
((buf)[1]<<8) + (buf)[0])
+ 
+ #define ID1 0x1f
+ #define ID2 0x8b
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sfx2/CppunitTest_sfx2_controlleritem.mk sfx2/Module_sfx2.mk sfx2/qa

2015-06-03 Thread Michael Meeks
 sfx2/CppunitTest_sfx2_controlleritem.mk |   23 +++
 sfx2/Module_sfx2.mk |1 
 sfx2/qa/cppunit/test_controlleritem.cxx |   62 
 3 files changed, 86 insertions(+)

New commits:
commit 5ccc46b0fe2df55d4f4794978bd62dbd02fc7fec
Author: Michael Meeks 
Date:   Tue Jun 2 16:05:33 2015 +0100

Skeletal SfxControllerItem / bindings unit test.

Change-Id: I0fdda736243c3e4a74f2faedf6fa5ea49453fe8c
Reviewed-on: https://gerrit.libreoffice.org/16040
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 

diff --git a/sfx2/CppunitTest_sfx2_controlleritem.mk 
b/sfx2/CppunitTest_sfx2_controlleritem.mk
new file mode 100644
index 000..ce0227a
--- /dev/null
+++ b/sfx2/CppunitTest_sfx2_controlleritem.mk
@@ -0,0 +1,23 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_CppunitTest_CppunitTest,sfx2_controlleritem))
+$(eval $(call gb_CppunitTest_use_sdk_api,sfx2_controlleritem))
+$(eval $(call gb_CppunitTest_add_exception_objects,sfx2_controlleritem, \
+sfx2/qa/cppunit/test_controlleritem \
+))
+$(eval $(call gb_CppunitTest_use_libraries,sfx2_controlleritem, \
+   cppu \
+   cppuhelper \
+sal \
+sfx \
+   $(gb_UWINAPI) \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sfx2/Module_sfx2.mk b/sfx2/Module_sfx2.mk
index be82c7c..3ebdfa1 100644
--- a/sfx2/Module_sfx2.mk
+++ b/sfx2/Module_sfx2.mk
@@ -30,6 +30,7 @@ $(eval $(call gb_Module_add_l10n_targets,sfx2,\
 
 $(eval $(call gb_Module_add_check_targets,sfx2,\
 CppunitTest_sfx2_metadatable \
+CppunitTest_sfx2_controlleritem \
 ))
 
 ifneq ($(ENABLE_JAVA),)
diff --git a/sfx2/qa/cppunit/test_controlleritem.cxx 
b/sfx2/qa/cppunit/test_controlleritem.cxx
new file mode 100644
index 000..ee48f46
--- /dev/null
+++ b/sfx2/qa/cppunit/test_controlleritem.cxx
@@ -0,0 +1,62 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+namespace {
+
+class ControllerItemTest
+: public ::CppUnit::TestFixture
+{
+public:
+virtual void setUp() SAL_OVERRIDE {}
+virtual void tearDown() SAL_OVERRIDE {}
+
+void test();
+
+CPPUNIT_TEST_SUITE(ControllerItemTest);
+CPPUNIT_TEST(test);
+CPPUNIT_TEST_SUITE_END();
+
+private:
+};
+
+static bool bDeleted = false;
+
+class FooController : public SfxControllerItem {
+public:
+FooController() : SfxControllerItem() {}
+~FooController() { bDeleted = true; }
+};
+
+void ControllerItemTest::test()
+{
+FooController *pController(new FooController());
+
+// TESTME: binding, un-binding, re-binding, IsBound, SetId etc.
+
+pController->dispose();
+delete pController;
+CPPUNIT_ASSERT( bDeleted );
+}
+
+CPPUNIT_TEST_SUITE_REGISTRATION(ControllerItemTest);
+
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-06-03 Thread Stephan Bergmann
 include/sfx2/msg.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d60719015e1a82873b39565b77c24e6ae28edd24
Author: Stephan Bergmann 
Date:   Wed Jun 3 10:14:20 2015 +0200

Use variable-length array idiom for SfxType::aAttrib

...to avoid false -fsanitize=array-bounds warnings.  All instances of 
SfxType
are created (in idl) as instances of SfxTypeN with properly sized nAttrib
arrays.

Change-Id: Iad9faa467affed656750df6bb8579d85829e97ca

diff --git a/include/sfx2/msg.hxx b/include/sfx2/msg.hxx
index 89faffd..611156a 100644
--- a/include/sfx2/msg.hxx
+++ b/include/sfx2/msg.hxx
@@ -112,7 +112,7 @@ struct SfxType
 {
 TypeId  aTypeId;
 sal_uInt16  nAttribs;
-SfxTypeAttrib   aAttrib[16];
+SfxTypeAttrib   aAttrib[1]; // variable length
 
 const TypeId&   Type() const
 { return aTypeId; }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - external/curl

2015-06-03 Thread Michael Stahl
 external/curl/ExternalProject_curl.mk |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit f4207428ea76157219a20a2d27ae5f52c713f199
Author: Michael Stahl 
Date:   Tue Jun 2 15:30:28 2015 +0200

curl: disable rtmp support

configure will add a dependency on librtmp.so.0 if the development
package happens to be installed.

(cherry picked from commit f4844a9abebcb0451161625c42a1e2b48796102d)

curl: sigh... *actually* disable rtmp support

(cherry picked from commit 805f12dd51ea72deda8f5be5839a205640ba968d)

curl: disable loads more random stuff we don't need

(cherry picked from commit 0b8b96ed515eec0a560812be73d4c9742f26e23b)
Change-Id: I0f4bcd73f9e0e7307ca0556a5f6990631eb9f2c5
(cherry picked from commit df2e19ffa8840bc2fef5d56de5d6058f2b3c5ffb)
Reviewed-on: https://gerrit.libreoffice.org/16036
Reviewed-by: Miklos Vajna 
Tested-by: Miklos Vajna 

diff --git a/external/curl/ExternalProject_curl.mk 
b/external/curl/ExternalProject_curl.mk
index 1a0a0a3..9a4a045 100644
--- a/external/curl/ExternalProject_curl.mk
+++ b/external/curl/ExternalProject_curl.mk
@@ -46,9 +46,12 @@ $(call gb_ExternalProject_get_state_target,curl,build):
$(if $(filter IOS,$(OS)),--with-darwinssl) \
$(if $(filter MACOSX,$(OS)),\
--with-darwinssl) \
-   --without-ssl \
+   --without-ssl --without-gnutls --without-polarssl 
--without-cyassl --without-axtls \
--without-libidn --enable-ftp --enable-ipv6 
--enable-http --disable-gopher \
--disable-file --disable-ldap --disable-telnet 
--disable-dict --without-libssh2 \
+   --without-librtmp --disable-ldaps --disable-tftp 
--disable-pop3 \
+   --disable-imap --disable-smtp --disable-manual 
--without-metalink \
+   --without-nghttp2 \
$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) 
--host=$(HOST_PLATFORM)) \
$(if $(filter 
TRUE,$(DISABLE_DYNLOADING)),--disable-shared,--disable-static) \
$(if $(ENABLE_DEBUG),--enable-debug) \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: libreoffice-5-0 failure in [ CUT ] libreofficekit_tiledrendering

2015-06-03 Thread Miklos Vajna
Hi Lionel,

On Tue, Jun 02, 2015 at 03:23:27PM +0200, Lionel Elie Mamane  
wrote:
> FWIW, the libreoffice-5-0 reproducibly fails the
> libreofficekit_tiledrendering unittest with a segfault for me, while
> master passes it. I use the same autogen.input for both.

What are those autogen.input options? Can you follow the instructions of
the failed test and get a backtrace?

I build libreoffice-5-0 with empty autogen.input, and the test passes
for me as of commit 45d26bfe091e00a1a897c6944dbeb2be9b6a5c92. On master
I build with --enable-dbgutil, that passes, too as of commit
9f01951b858453684f2622541af0eb85d4544fc6.

Regards,

Miklos


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


[Libreoffice-commits] core.git: Branch 'feature/gsoc15-open-remote-files-dialog' - 2 commits - include/svtools svtools/source svtools/uiconfig

2015-06-03 Thread Szymon Kłos
 include/svtools/PlaceEditDialog.hxx  |2 
 include/svtools/RemoteFilesDialog.hxx|   10 ++
 svtools/source/dialogs/PlaceEditDialog.cxx   |4 
 svtools/source/dialogs/RemoteFilesDialog.cxx |  109 +--
 svtools/uiconfig/ui/remotefilesdialog.ui |   27 ++
 5 files changed, 111 insertions(+), 41 deletions(-)

New commits:
commit 0daa944fd0ddb81f14a640b96d91296a2cc22ec6
Author: Szymon Kłos 
Date:   Wed Jun 3 10:03:07 2015 +0200

added SvtFileView, basic loading of the root directory

Change-Id: I54a4aa3a2c68b4dbbc54a68469ea6fe41e361864

diff --git a/include/svtools/RemoteFilesDialog.hxx 
b/include/svtools/RemoteFilesDialog.hxx
index 4087188..ac96658 100644
--- a/include/svtools/RemoteFilesDialog.hxx
+++ b/include/svtools/RemoteFilesDialog.hxx
@@ -20,6 +20,8 @@
 #include 
 #include 
 
+#include 
+
 #include 
 #include 
 
@@ -32,6 +34,7 @@ enum SvtRemoteDlgMode
 };
 
 typedef std::shared_ptr ServicePtr;
+typedef ::com::sun::star::uno::Sequence  OUStringList;
 
 class SVT_DLLPUBLIC RemoteFilesDialog : public ModalDialog
 {
@@ -51,13 +54,18 @@ private:
 VclPtr m_pCancel_btn;
 VclPtr m_pAddService_btn;
 VclPtr m_pServices_lb;
+VclPtr m_pPath_ed;
+VclPtr m_pView;
 
 std::vector m_aServices;
 
 void FillServicesListbox();
-unsigned int GetSelectedServicePos();
+
+/* If failure returns < 0 */
+int GetSelectedServicePos();
 
 DECL_LINK ( AddServiceHdl, void * );
+DECL_LINK ( SelectServiceHdl, void * );
 DECL_LINK_TYPED ( EditServiceMenuHdl, MenuButton *, void );
 };
 
diff --git a/svtools/source/dialogs/RemoteFilesDialog.cxx 
b/svtools/source/dialogs/RemoteFilesDialog.cxx
index 60063d9..db3ab1a 100644
--- a/svtools/source/dialogs/RemoteFilesDialog.cxx
+++ b/svtools/source/dialogs/RemoteFilesDialog.cxx
@@ -11,6 +11,8 @@
 
 using namespace ::com::sun::star::uno;
 
+#define NO_FILTER "*.*"
+
 RemoteFilesDialog::RemoteFilesDialog(vcl::Window* pParent, WinBits nBits)
 : ModalDialog(pParent, "RemoteFilesDialog", "svt/ui/remotefilesdialog.ui")
 , m_context(comphelper::getProcessComponentContext())
@@ -20,6 +22,8 @@ RemoteFilesDialog::RemoteFilesDialog(vcl::Window* pParent, 
WinBits nBits)
 get(m_pCancel_btn, "cancel");
 get(m_pAddService_btn, "add_service_btn");
 get(m_pServices_lb, "services_lb");
+get(m_pPath_ed, "path");
+get(m_pView, "files");
 
 m_eMode = (nBits & WB_SAVEAS) ? REMOTEDLG_MODE_SAVE : REMOTEDLG_MODE_OPEN;
 m_bIsUpdated = false;
@@ -40,6 +44,8 @@ RemoteFilesDialog::RemoteFilesDialog(vcl::Window* pParent, 
WinBits nBits)
 m_pAddService_btn->SetSelectHdl( LINK( this, RemoteFilesDialog, 
EditServiceMenuHdl ) );
 
 FillServicesListbox();
+
+m_pServices_lb->SetSelectHdl( LINK( this, RemoteFilesDialog, 
SelectServiceHdl ) );
 }
 
 void RemoteFilesDialog::dispose()
@@ -93,13 +99,16 @@ void RemoteFilesDialog::FillServicesListbox()
 m_pServices_lb->Enable(false);
 }
 
-unsigned int RemoteFilesDialog::GetSelectedServicePos()
+int RemoteFilesDialog::GetSelectedServicePos()
 {
 int nSelected = m_pServices_lb->GetSelectEntryPos();
-unsigned int nPos = 0;
+int nPos = 0;
 int i = -1;
 
-while(nPos < m_aServices.size())
+if(m_aServices.size() == 0)
+return -1;
+
+while(nPos < (int)m_aServices.size())
 {
 while(m_aServices[nPos]->IsLocal())
 nPos++;
@@ -139,58 +148,82 @@ IMPL_LINK_NOARG ( RemoteFilesDialog, AddServiceHdl )
 return 1;
 }
 
+IMPL_LINK_NOARG ( RemoteFilesDialog, SelectServiceHdl )
+{
+int nPos = GetSelectedServicePos();
+
+if(nPos > 0)
+{
+OUStringList BlackList;
+OUString sURL = m_aServices[nPos]->GetUrl();
+FileViewResult eResult = eFailure;
+
+m_pPath_ed->SetText(sURL);
+
+eResult = m_pView->Initialize( sURL, NO_FILTER, NULL, BlackList );
+}
+
+return 1;
+}
+
 IMPL_LINK_TYPED ( RemoteFilesDialog, EditServiceMenuHdl, MenuButton *, 
pButton, void )
 {
 OString sIdent(pButton->GetCurItemIdent());
 if(sIdent == "edit_service"  && m_pServices_lb->GetEntryCount() > 0)
 {
 unsigned int nSelected = m_pServices_lb->GetSelectEntryPos();
-unsigned int nPos = GetSelectedServicePos();
-
-ScopedVclPtrInstance< PlaceEditDialog > aDlg(this, m_aServices[nPos]);
-short aRetCode = aDlg->Execute();
+int nPos = GetSelectedServicePos();
 
-switch(aRetCode)
+if(nPos > 0)
 {
-case RET_OK :
-{
-ServicePtr pEditedService = aDlg->GetPlace();
+ScopedVclPtrInstance< PlaceEditDialog > aDlg(this, 
m_aServices[nPos]);
+short aRetCode = aDlg->Execute();
 
-m_aServices[nPos] = pEditedService;
-m_pServices_lb->RemoveEntry(nSelected);
-m_pServices_lb->InsertEntry(pEditedService->GetName(), 
nSelected);
-m_pServices_lb->SelectEntryPos(nSelected);
-
-

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

2015-06-03 Thread Miklos Vajna
 sw/qa/extras/tiledrendering/data/2-pages.odt   |binary
 sw/qa/extras/tiledrendering/data/search.odt|binary
 sw/qa/extras/tiledrendering/tiledrendering.cxx |  118 +
 sw/source/uibase/uiview/viewsrch.cxx   |   15 ++-
 4 files changed, 131 insertions(+), 2 deletions(-)

New commits:
commit 45d26bfe091e00a1a897c6944dbeb2be9b6a5c92
Author: Miklos Vajna 
Date:   Wed Jun 3 09:03:48 2015 +0200

SwView::SearchAndWrap: fix WrapAround search in fly frames

First, SttDoc() / EndDoc() is the implementation of Ctrl-Home, i.e. it
goes to the start of the current text (like a fly frame), not to the
start of the whole document. When wrapping around, we want the later.

Second, if the normal search have two passes, first searching in the
body text, then searching in the special sections, then the wrap-around
search should do the same.

Change-Id: I0b7466c80476f6fb45174be19215a5d68374d047
(cherry picked from commit c88802829832a315550cb7e19e17030dc4c2bd77)

diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx 
b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index ba8237e..b139b16 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -26,6 +26,7 @@ static const char* DATA_DIRECTORY = 
"/sw/qa/extras/tiledrendering/data/";
 class SwTiledRenderingTest : public SwModelTestBase
 {
 public:
+SwTiledRenderingTest();
 void testRegisterCallback();
 void testPostKeyEvent();
 void testPostMouseEvent();
@@ -35,6 +36,7 @@ public:
 void testSearch();
 void testSearchViewArea();
 void testSearchTextFrame();
+void testSearchTextFrameWrapAround();
 void testDocumentSizeChanged();
 
 CPPUNIT_TEST_SUITE(SwTiledRenderingTest);
@@ -47,6 +49,7 @@ public:
 CPPUNIT_TEST(testSearch);
 CPPUNIT_TEST(testSearchViewArea);
 CPPUNIT_TEST(testSearchTextFrame);
+CPPUNIT_TEST(testSearchTextFrameWrapAround);
 CPPUNIT_TEST(testDocumentSizeChanged);
 CPPUNIT_TEST_SUITE_END();
 
@@ -57,8 +60,14 @@ private:
 Rectangle m_aInvalidation;
 Size m_aDocumentSize;
 OString m_aTextSelection;
+bool m_bFound;
 };
 
+SwTiledRenderingTest::SwTiledRenderingTest()
+: m_bFound(true)
+{
+}
+
 SwXTextDocument* SwTiledRenderingTest::createDoc(const char* pName)
 {
 load(DATA_DIRECTORY, pName);
@@ -106,6 +115,11 @@ void SwTiledRenderingTest::callbackImpl(int nType, const 
char* pPayload)
 m_aTextSelection = pPayload;
 }
 break;
+case LOK_CALLBACK_SEARCH_NOT_FOUND:
+{
+m_bFound = false;
+}
+break;
 }
 }
 
@@ -342,6 +356,24 @@ void SwTiledRenderingTest::testSearchTextFrame()
 #endif
 }
 
+void SwTiledRenderingTest::testSearchTextFrameWrapAround()
+{
+#if !defined(WNT) && !defined(MACOSX)
+SwXTextDocument* pXTextDocument = createDoc("search.odt");
+pXTextDocument->registerCallback(&SwTiledRenderingTest::callback, this);
+uno::Sequence 
aPropertyValues(comphelper::InitPropertySequence(
+{
+{"SearchItem.SearchString", uno::makeAny(OUString("TextFrame"))},
+{"SearchItem.Backward", uno::makeAny(false)},
+}));
+comphelper::dispatchCommand(".uno:ExecuteSearch", aPropertyValues);
+CPPUNIT_ASSERT(m_bFound);
+comphelper::dispatchCommand(".uno:ExecuteSearch", aPropertyValues);
+// This failed, i.e. the second time 'not found' was reported, instead of 
wrapping around.
+CPPUNIT_ASSERT(m_bFound);
+#endif
+}
+
 void SwTiledRenderingTest::testDocumentSizeChanged()
 {
 #if !defined(WNT) && !defined(MACOSX)
diff --git a/sw/source/uibase/uiview/viewsrch.cxx 
b/sw/source/uibase/uiview/viewsrch.cxx
index dbd792b..94b987a 100644
--- a/sw/source/uibase/uiview/viewsrch.cxx
+++ b/sw/source/uibase/uiview/viewsrch.cxx
@@ -554,13 +554,24 @@ bool SwView::SearchAndWrap(bool bApi)
 if (bHasSrchInOther)
 {
 m_pWrtShell->ClearMark();
+// Select the start or the end of the entire document
 if (bSrchBkwrd)
-m_pWrtShell->EndDoc();
+m_pWrtShell->SttEndDoc(false);
 else
-m_pWrtShell->SttDoc();
+m_pWrtShell->SttEndDoc(true);
 }
 
 m_bFound = bool(FUNC_Search( aOpts ));
+
+// If WrapAround found no matches in the body text, search in the special
+// sections, too.
+if (!m_bFound && !m_pSrchItem->GetSelection() && !m_bExtra)
+{
+m_bExtra = true;
+if (FUNC_Search(aOpts))
+m_bFound = true;
+}
+
 m_pWrtShell->EndAllAction();
 pWait.reset();
 #if HAVE_FEATURE_DESKTOP
commit fae7413e13e204ce0bd43a124a62ca48d94fdf48
Author: Miklos Vajna 
Date:   Tue Jun 2 15:26:56 2015 +0200

CppunitTest_sw_tiledrendering: add TextFrame search testcase

Fails without commit 2d17cd6b03a214393755ddfed5ba50a18f0cd774 (sw:
LOK_CALLBACK_TEXT_SELECTION should be the union of all selections,
2015-06-02).

Change-Id: I1d45eabf53dadd24051ff4

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

2015-06-03 Thread Miklos Vajna
 sw/qa/extras/tiledrendering/tiledrendering.cxx |   32 +
 sw/source/uibase/uiview/viewsrch.cxx   |   15 ++-
 2 files changed, 45 insertions(+), 2 deletions(-)

New commits:
commit 8d2fe8d7e5f374f3a106a4fc58ef597a52815ad0
Author: Miklos Vajna 
Date:   Wed Jun 3 09:03:48 2015 +0200

SwView::SearchAndWrap: fix WrapAround search in fly frames

First, SttDoc() / EndDoc() is the implementation of Ctrl-Home, i.e. it
goes to the start of the current text (like a fly frame), not to the
start of the whole document. When wrapping around, we want the later.

Second, if the normal search have two passes, first searching in the
body text, then searching in the special sections, then the wrap-around
search should do the same.

Change-Id: I0b7466c80476f6fb45174be19215a5d68374d047

diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx 
b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index ba8237e..b139b16 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -26,6 +26,7 @@ static const char* DATA_DIRECTORY = 
"/sw/qa/extras/tiledrendering/data/";
 class SwTiledRenderingTest : public SwModelTestBase
 {
 public:
+SwTiledRenderingTest();
 void testRegisterCallback();
 void testPostKeyEvent();
 void testPostMouseEvent();
@@ -35,6 +36,7 @@ public:
 void testSearch();
 void testSearchViewArea();
 void testSearchTextFrame();
+void testSearchTextFrameWrapAround();
 void testDocumentSizeChanged();
 
 CPPUNIT_TEST_SUITE(SwTiledRenderingTest);
@@ -47,6 +49,7 @@ public:
 CPPUNIT_TEST(testSearch);
 CPPUNIT_TEST(testSearchViewArea);
 CPPUNIT_TEST(testSearchTextFrame);
+CPPUNIT_TEST(testSearchTextFrameWrapAround);
 CPPUNIT_TEST(testDocumentSizeChanged);
 CPPUNIT_TEST_SUITE_END();
 
@@ -57,8 +60,14 @@ private:
 Rectangle m_aInvalidation;
 Size m_aDocumentSize;
 OString m_aTextSelection;
+bool m_bFound;
 };
 
+SwTiledRenderingTest::SwTiledRenderingTest()
+: m_bFound(true)
+{
+}
+
 SwXTextDocument* SwTiledRenderingTest::createDoc(const char* pName)
 {
 load(DATA_DIRECTORY, pName);
@@ -106,6 +115,11 @@ void SwTiledRenderingTest::callbackImpl(int nType, const 
char* pPayload)
 m_aTextSelection = pPayload;
 }
 break;
+case LOK_CALLBACK_SEARCH_NOT_FOUND:
+{
+m_bFound = false;
+}
+break;
 }
 }
 
@@ -342,6 +356,24 @@ void SwTiledRenderingTest::testSearchTextFrame()
 #endif
 }
 
+void SwTiledRenderingTest::testSearchTextFrameWrapAround()
+{
+#if !defined(WNT) && !defined(MACOSX)
+SwXTextDocument* pXTextDocument = createDoc("search.odt");
+pXTextDocument->registerCallback(&SwTiledRenderingTest::callback, this);
+uno::Sequence 
aPropertyValues(comphelper::InitPropertySequence(
+{
+{"SearchItem.SearchString", uno::makeAny(OUString("TextFrame"))},
+{"SearchItem.Backward", uno::makeAny(false)},
+}));
+comphelper::dispatchCommand(".uno:ExecuteSearch", aPropertyValues);
+CPPUNIT_ASSERT(m_bFound);
+comphelper::dispatchCommand(".uno:ExecuteSearch", aPropertyValues);
+// This failed, i.e. the second time 'not found' was reported, instead of 
wrapping around.
+CPPUNIT_ASSERT(m_bFound);
+#endif
+}
+
 void SwTiledRenderingTest::testDocumentSizeChanged()
 {
 #if !defined(WNT) && !defined(MACOSX)
diff --git a/sw/source/uibase/uiview/viewsrch.cxx 
b/sw/source/uibase/uiview/viewsrch.cxx
index a4951ef..28fc2c9 100644
--- a/sw/source/uibase/uiview/viewsrch.cxx
+++ b/sw/source/uibase/uiview/viewsrch.cxx
@@ -554,13 +554,24 @@ bool SwView::SearchAndWrap(bool bApi)
 if (bHasSrchInOther)
 {
 m_pWrtShell->ClearMark();
+// Select the start or the end of the entire document
 if (bSrchBkwrd)
-m_pWrtShell->EndDoc();
+m_pWrtShell->SttEndDoc(false);
 else
-m_pWrtShell->SttDoc();
+m_pWrtShell->SttEndDoc(true);
 }
 
 m_bFound = bool(FUNC_Search( aOpts ));
+
+// If WrapAround found no matches in the body text, search in the special
+// sections, too.
+if (!m_bFound && !m_pSrchItem->GetSelection() && !m_bExtra)
+{
+m_bExtra = true;
+if (FUNC_Search(aOpts))
+m_bFound = true;
+}
+
 m_pWrtShell->EndAllAction();
 pWait.reset();
 #if HAVE_FEATURE_DESKTOP
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits