[Libreoffice-commits] core.git: sc/CppunitTest_sc_spreadsheetsettings.mk sc/CppunitTest_sc_spreadsheetsettingsobj.mk sc/Module_sc.mk sc/qa

2018-03-21 Thread Jens Carl
 sc/CppunitTest_sc_spreadsheetsettings.mk |   22 +++---
 sc/Module_sc.mk  |2 +-
 sc/qa/extras/scspreadsheetsettings.cxx   |   16 
 3 files changed, 20 insertions(+), 20 deletions(-)

New commits:
commit fd911a32505331174787403e6260202e29ea82b8
Author: Jens Carl 
Date:   Thu Mar 22 05:46:16 2018 +

tdf#45904 Rename test object for GlobalSheetSettings

Rename test object ScSpreadsheetSettingsObj to ScSpreadsheetSettings.

Change-Id: Ia70cc82e0ee20571ad029590db735f932e5c7958
Reviewed-on: https://gerrit.libreoffice.org/51723
Tested-by: Jenkins 
Reviewed-by: Jens Carl 

diff --git a/sc/CppunitTest_sc_spreadsheetsettingsobj.mk 
b/sc/CppunitTest_sc_spreadsheetsettings.mk
similarity index 73%
rename from sc/CppunitTest_sc_spreadsheetsettingsobj.mk
rename to sc/CppunitTest_sc_spreadsheetsettings.mk
index f39201002bb3..908f2a530c2e 100644
--- a/sc/CppunitTest_sc_spreadsheetsettingsobj.mk
+++ b/sc/CppunitTest_sc_spreadsheetsettings.mk
@@ -9,15 +9,15 @@
 #
 #*
 
-$(eval $(call gb_CppunitTest_CppunitTest,sc_spreadsheetsettingsobj))
+$(eval $(call gb_CppunitTest_CppunitTest,sc_spreadsheetsettings))
 
-$(eval $(call 
gb_CppunitTest_use_external,sc_spreadsheetsettingsobj,boost_headers))
+$(eval $(call 
gb_CppunitTest_use_external,sc_spreadsheetsettings,boost_headers))
 
-$(eval $(call gb_CppunitTest_add_exception_objects,sc_spreadsheetsettingsobj, \
-   sc/qa/extras/scspreadsheetsettingsobj \
+$(eval $(call gb_CppunitTest_add_exception_objects,sc_spreadsheetsettings, \
+   sc/qa/extras/scspreadsheetsettings \
 ))
 
-$(eval $(call gb_CppunitTest_use_libraries,sc_spreadsheetsettingsobj, \
+$(eval $(call gb_CppunitTest_use_libraries,sc_spreadsheetsettings, \
basegfx \
comphelper \
cppu \
@@ -52,21 +52,21 @@ $(eval $(call 
gb_CppunitTest_use_libraries,sc_spreadsheetsettingsobj, \
xo \
 ))
 
-$(eval $(call gb_CppunitTest_set_include,sc_spreadsheetsettingsobj,\
+$(eval $(call gb_CppunitTest_set_include,sc_spreadsheetsettings,\
-I$(SRCDIR)/sc/source/ui/inc \
-I$(SRCDIR)/sc/inc \
$$(INCLUDE) \
 ))
 
-$(eval $(call gb_CppunitTest_use_sdk_api,sc_spreadsheetsettingsobj))
+$(eval $(call gb_CppunitTest_use_sdk_api,sc_spreadsheetsettings))
 
-$(eval $(call gb_CppunitTest_use_ure,sc_spreadsheetsettingsobj))
-$(eval $(call gb_CppunitTest_use_vcl,sc_spreadsheetsettingsobj))
+$(eval $(call gb_CppunitTest_use_ure,sc_spreadsheetsettings))
+$(eval $(call gb_CppunitTest_use_vcl,sc_spreadsheetsettings))
 
-$(eval $(call gb_CppunitTest_use_components,sc_spreadsheetsettingsobj,\
+$(eval $(call gb_CppunitTest_use_components,sc_spreadsheetsettings,\
 $(sc_unoapi_common_components) \
 ))
 
-$(eval $(call gb_CppunitTest_use_configuration,sc_spreadsheetsettingsobj))
+$(eval $(call gb_CppunitTest_use_configuration,sc_spreadsheetsettings))
 
 # vim: set noet sw=4 ts=4:
diff --git a/sc/Module_sc.mk b/sc/Module_sc.mk
index eaecad60104e..6e3a5090d71b 100644
--- a/sc/Module_sc.mk
+++ b/sc/Module_sc.mk
@@ -153,7 +153,7 @@ $(eval $(call gb_Module_add_subsequentcheck_targets,sc,\
CppunitTest_sc_autoformatobj \
CppunitTest_sc_importdescriptorbaseobj \
CppunitTest_sc_documentconfigurationobj \
-   CppunitTest_sc_spreadsheetsettingsobj \
+   CppunitTest_sc_spreadsheetsettings \
CppunitTest_sc_shapeobj \
CppunitTest_sc_sheetlinkobj \
 ))
diff --git a/sc/qa/extras/scspreadsheetsettingsobj.cxx 
b/sc/qa/extras/scspreadsheetsettings.cxx
similarity index 80%
rename from sc/qa/extras/scspreadsheetsettingsobj.cxx
rename to sc/qa/extras/scspreadsheetsettings.cxx
index 34edd4cc916f..48dfb48beb16 100644
--- a/sc/qa/extras/scspreadsheetsettingsobj.cxx
+++ b/sc/qa/extras/scspreadsheetsettings.cxx
@@ -23,16 +23,16 @@ using namespace com::sun::star;
 
 namespace sc_apitest
 {
-class ScSpreadsheetSettingsObj : public CalcUnoApiTest, public 
apitest::GlobalSheetSettings
+class ScSpreadsheetSettings : public CalcUnoApiTest, public 
apitest::GlobalSheetSettings
 {
 public:
-ScSpreadsheetSettingsObj();
+ScSpreadsheetSettings();
 
 virtual uno::Reference init() override;
 virtual void setUp() override;
 virtual void tearDown() override;
 
-CPPUNIT_TEST_SUITE(ScSpreadsheetSettingsObj);
+CPPUNIT_TEST_SUITE(ScSpreadsheetSettings);
 
 // GlobalSheetSettings
 CPPUNIT_TEST(testGlobalSheetSettingsProperties);
@@ -43,12 +43,12 @@ private:
 uno::Reference mxComponent;
 };
 
-ScSpreadsheetSettingsObj::ScSpreadsheetSettingsObj()
+ScSpreadsheetSettings::ScSpreadsheetSettings()
 : CalcUnoApiTest("/sc/qa/extras/testdocuments")
 {
 }
 
-uno::Reference ScSpreadsheetSettingsObj::init()
+uno::Reference ScSpreadsheetSettings::init()
 {
 uno::Reference xDoc(mxComponent, 
UNO_QUERY_THROW);
 CPPUNIT_ASSERT_MESSAGE("no calc document", xDoc.is());
@@ -57,20 +57,20 @@ uno::Refer

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

2018-03-21 Thread Noel Grandin
 sd/source/ui/docshell/docshel4.cxx |6 +++---
 sd/source/ui/docshell/docshell.cxx |   14 +++---
 sd/source/ui/inc/DrawDocShell.hxx  |4 ++--
 starmath/inc/document.hxx  |2 +-
 starmath/source/document.cxx   |4 ++--
 5 files changed, 15 insertions(+), 15 deletions(-)

New commits:
commit fa28a491f56a63b2ca28f611fcce3fa437cdad38
Author: Noel Grandin 
Date:   Tue Mar 20 15:15:17 2018 +0200

loplugin:useuniqueptr in DrawDocShell

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

diff --git a/sd/source/ui/docshell/docshel4.cxx 
b/sd/source/ui/docshell/docshel4.cxx
index 426b09b7e2d7..e4e1a6fa6b6f 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -161,14 +161,14 @@ void DrawDocShell::SetPrinter(SfxPrinter *pNewPrinter)
 
 void DrawDocShell::UpdateFontList()
 {
-delete mpFontList;
+mpFontList.reset();
 OutputDevice* pRefDevice = nullptr;
 if ( mpDoc->GetPrinterIndependentLayout() == 
css::document::PrinterIndependentLayout::DISABLED )
 pRefDevice = GetPrinter(true);
 else
 pRefDevice = SD_MOD()->GetVirtualRefDevice();
-mpFontList = new FontList(pRefDevice, nullptr);
-SvxFontListItem aFontListItem( mpFontList, SID_ATTR_CHAR_FONTLIST );
+mpFontList.reset( new FontList(pRefDevice, nullptr) );
+SvxFontListItem aFontListItem( mpFontList.get(), SID_ATTR_CHAR_FONTLIST );
 PutItem( aFontListItem );
 }
 
diff --git a/sd/source/ui/docshell/docshell.cxx 
b/sd/source/ui/docshell/docshell.cxx
index 42d01a87db2b..a1f79300d539 100644
--- a/sd/source/ui/docshell/docshell.cxx
+++ b/sd/source/ui/docshell/docshell.cxx
@@ -116,16 +116,16 @@ void DrawDocShell::Construct( bool bClipboard )
 
 SetBaseModel( new SdXImpressDocument( this, bClipboard ) );
 SetPool( &mpDoc->GetItemPool() );
-sd::UndoManager* pUndoManager = new sd::UndoManager;
+std::unique_ptr pUndoManager(new sd::UndoManager);
 pUndoManager->SetDocShell(this);
-mpUndoManager = pUndoManager;
+mpUndoManager = std::move(pUndoManager);
 
 if (!utl::ConfigManager::IsFuzzing()
 && officecfg::Office::Common::Undo::Steps::get() < 1)
 {
 mpUndoManager->EnableUndo(false); // tdf#108863 disable if 0 steps
 }
-mpDoc->SetSdrUndoManager( mpUndoManager );
+mpDoc->SetSdrUndoManager( mpUndoManager.get() );
 mpDoc->SetSdrUndoFactory( new sd::UndoFactory );
 UpdateTablePointers();
 SetStyleFamily(SfxStyleFamily::Pseudo);
@@ -189,11 +189,11 @@ DrawDocShell::~DrawDocShell()
 
 SetDocShellFunction(nullptr);
 
-delete mpFontList;
+mpFontList.reset();
 
 if( mpDoc )
 mpDoc->SetSdrUndoManager( nullptr );
-delete mpUndoManager;
+mpUndoManager.reset();
 
 if (mbOwnPrinter)
 mpPrinter.disposeAndClear();
@@ -231,7 +231,7 @@ void DrawDocShell::GetState(SfxItemSet &rSet)
 switch ( nSlotId )
 {
 case SID_ATTR_CHAR_FONTLIST:
-rSet.Put( SvxFontListItem( mpFontList, nSlotId ) );
+rSet.Put( SvxFontListItem( mpFontList.get(), nSlotId ) );
 break;
 
 case SID_SEARCH_ITEM:
@@ -401,7 +401,7 @@ void DrawDocShell::Deactivate( bool )
 
 ::svl::IUndoManager* DrawDocShell::GetUndoManager()
 {
-return mpUndoManager;
+return mpUndoManager.get();
 }
 
 void DrawDocShell::UpdateTablePointers()
diff --git a/sd/source/ui/inc/DrawDocShell.hxx 
b/sd/source/ui/inc/DrawDocShell.hxx
index 3645b27f22d4..3860e025508a 100644
--- a/sd/source/ui/inc/DrawDocShell.hxx
+++ b/sd/source/ui/inc/DrawDocShell.hxx
@@ -209,10 +209,10 @@ public:
 protected:
 
 SdDrawDocument* mpDoc;
-SfxUndoManager* mpUndoManager;
+std::unique_ptr mpUndoManager;
 VclPtr  mpPrinter;
 ::sd::ViewShell*mpViewShell;
-FontList*   mpFontList;
+std::unique_ptr mpFontList;
 rtl::Reference mxDocShellFunction;
 DocumentTypemeDocType;
 SfxStyleFamily  mnStyleFamily;
commit ca787ba7c81c142e03126ea0c648540b3b3bdc0b
Author: Noel Grandin 
Date:   Tue Mar 20 13:52:54 2018 +0200

loplugin:useuniqueptr in SmDocShell

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

diff --git a/starmath/inc/document.hxx b/starmath/inc/document.hxx
index af2ce9475fc3..00be9e454248 100644
--- a/starmath/inc/document.hxx
+++ b/starmath/inc/document.hxx
@@ -91,7 +91,7 @@ class SM_DLLPUBLIC SmDocShell : public SfxObjectShell, public 
SfxListener
 SvtLinguOptions maLinguOptions;
 std::unique_ptr mpTree;
 SfxItemPool*mpEditEngineItemPool;
-EditEngine *mpEditEngine;
+std::unique_ptr mpEditEngine;
 VclPtr  mpPrinter;   //q.v. comment to SmPrinter Access!
 VclPtr mpT

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

2018-03-21 Thread Noel Grandin
 sd/source/ui/app/sdxfer.cxx  |   41 ---
 sd/source/ui/dlg/sdtreelb.cxx|   14 +++---
 sd/source/ui/inc/sdxfer.hxx  |   12 ++---
 sd/source/ui/slidesorter/controller/SlsClipboard.cxx |8 +--
 sd/source/ui/view/sdview2.cxx|   34 +++
 5 files changed, 52 insertions(+), 57 deletions(-)

New commits:
commit bf1daa9f4b0bd2ac706133def18c4af4cad9f216
Author: Noel Grandin 
Date:   Tue Mar 20 13:49:04 2018 +0200

loplugin:useuniqueptr in SdTransferable

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

diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx
index 7b3783d79b9b..8183825d2ec2 100644
--- a/sd/source/ui/app/sdxfer.cxx
+++ b/sd/source/ui/app/sdxfer.cxx
@@ -121,7 +121,7 @@ SdTransferable::~SdTransferable()
 if( mbOwnView )
 delete mpSdViewIntern;
 
-delete mpOLEDataHelper;
+mpOLEDataHelper.reset();
 
 if( maDocShellRef.is() )
 {
@@ -135,12 +135,12 @@ SdTransferable::~SdTransferable()
 if( mbOwnDocument )
 delete mpSdDrawDocumentIntern;
 
-delete mpGraphic;
-delete mpBookmark;
-delete mpImageMap;
+mpGraphic.reset();
+mpBookmark.reset();
+mpImageMap.reset();
 
 mpVDev.disposeAndClear();
-delete mpObjDesc;
+mpObjDesc.reset();
 
 //call explicitly at end of dtor to be covered by above SolarMutex
 maUserData.clear();
@@ -150,14 +150,10 @@ void SdTransferable::CreateObjectReplacement( SdrObject* 
pObj )
 {
 if( pObj )
 {
-delete mpOLEDataHelper;
-mpOLEDataHelper = nullptr;
-delete mpGraphic;
-mpGraphic = nullptr;
-delete mpBookmark;
-mpBookmark = nullptr;
-delete mpImageMap;
-mpImageMap = nullptr;
+mpOLEDataHelper.reset();
+mpGraphic.reset();
+mpBookmark.reset();
+mpImageMap.reset();
 
 if( nullptr!= dynamic_cast< const SdrOle2Obj* >( pObj ) )
 {
@@ -167,13 +163,13 @@ void SdTransferable::CreateObjectReplacement( SdrObject* 
pObj )
 uno::Reference < embed::XEmbedPersist > xPersist( xObj, 
uno::UNO_QUERY );
 if( xObj.is() && xPersist.is() && xPersist->hasEntry() )
 {
-mpOLEDataHelper = new TransferableDataHelper( new 
SvEmbedTransferHelper( xObj, static_cast< SdrOle2Obj* >( pObj )->GetGraphic(), 
static_cast< SdrOle2Obj* >( pObj )->GetAspect() ) );
+mpOLEDataHelper.reset( new TransferableDataHelper( new 
SvEmbedTransferHelper( xObj, static_cast< SdrOle2Obj* >( pObj )->GetGraphic(), 
static_cast< SdrOle2Obj* >( pObj )->GetAspect() ) ) );
 
 // TODO/LATER: the standalone handling of the graphic 
should not be used any more in future
 // The EmbedDataHelper should bring the graphic in future
 const Graphic* pObjGr = static_cast< SdrOle2Obj* >( pObj 
)->GetGraphic();
 if ( pObjGr )
-mpGraphic = new Graphic( *pObjGr );
+mpGraphic.reset( new Graphic( *pObjGr ) );
 }
 }
 catch( uno::Exception& )
@@ -181,7 +177,7 @@ void SdTransferable::CreateObjectReplacement( SdrObject* 
pObj )
 }
 else if( dynamic_cast< const SdrGrafObj *>( pObj ) !=  nullptr && 
(mpSourceDoc && !SdDrawDocument::GetAnimationInfo( pObj )) )
 {
-mpGraphic = new Graphic( static_cast< SdrGrafObj* >( pObj 
)->GetTransformedGraphic() );
+mpGraphic.reset( new Graphic( static_cast< SdrGrafObj* >( pObj 
)->GetTransformedGraphic() ) );
 }
 else if( pObj->IsUnoObj() && SdrInventor::FmForm == 
pObj->GetObjInventor() && ( pObj->GetObjIdentifier() == 
sal_uInt16(OBJ_FM_BUTTON) ) )
 {
@@ -209,7 +205,7 @@ void SdTransferable::CreateObjectReplacement( SdrObject* 
pObj )
 xPropSet->getPropertyValue( "Label" ) >>= aLabel;
 xPropSet->getPropertyValue( "TargetURL" ) >>= aURL;
 
-mpBookmark = new INetBookmark( aURL, aLabel );
+mpBookmark.reset( new INetBookmark( aURL, aLabel ) );
 }
 }
 }
@@ -237,7 +233,7 @@ void SdTransferable::CreateObjectReplacement( SdrObject* 
pObj )
 // when both are unused
 if(!pObj->HasFillStyle() && !pObj->HasLineStyle())
 {
-mpBookmark = new INetBookmark( pURL->GetURL(), 
pURL->GetRepresentation() );
+mpBookmark.reset( new INetBookmark( 
pURL->GetURL(), pURL->GetRepresentation() ) );
 }
 }
 }
@@ -247,7 +243,7 @@ void SdTransferable::CreateObjectReplacement( SdrObje

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

2018-03-21 Thread Noel Grandin
 sc/inc/column.hxx|2 +-
 sc/source/core/data/column.cxx   |   23 ++-
 sc/source/core/data/column2.cxx  |2 +-
 sc/source/core/data/column3.cxx  |4 ++--
 sc/source/core/data/dociter.cxx  |8 
 sc/source/core/data/document.cxx |2 +-
 sc/source/core/data/fillinfo.cxx |2 +-
 7 files changed, 20 insertions(+), 23 deletions(-)

New commits:
commit c0a76a9460a4a7db1575bc87744985150462a334
Author: Noel Grandin 
Date:   Tue Mar 20 09:35:45 2018 +0200

loplugin:useuniqueptr in ScColumn

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

diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index 9957b05225fd..4a93f21ed381 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -141,7 +141,7 @@ class ScColumn
 // Cell values.
 sc::CellStoreType maCells;
 
-ScAttrArray* pAttrArray;
+std::unique_ptr pAttrArray;
 
 size_t mnBlkCountFormula;
 
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index 2dad0de39037..3a1ab1803de3 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -100,7 +100,6 @@ ScColumn::ScColumn() :
 ScColumn::~ScColumn() COVERITY_NOEXCEPT_FALSE
 {
 FreeAll();
-delete pAttrArray;
 }
 
 void ScColumn::Init(SCCOL nNewCol, SCTAB nNewTab, ScDocument* pDoc, bool 
bEmptyAttrArray)
@@ -108,9 +107,9 @@ void ScColumn::Init(SCCOL nNewCol, SCTAB nNewTab, 
ScDocument* pDoc, bool bEmptyA
 nCol = nNewCol;
 nTab = nNewTab;
 if ( bEmptyAttrArray )
-pAttrArray = new ScAttrArray( nCol, nTab, pDoc, nullptr );
+pAttrArray.reset(new ScAttrArray( nCol, nTab, pDoc, nullptr ));
 else
-pAttrArray = new ScAttrArray( nCol, nTab, pDoc, 
&pDoc->maTabs[nTab]->aDefaultColAttrArray );
+pAttrArray.reset(new ScAttrArray( nCol, nTab, pDoc, 
&pDoc->maTabs[nTab]->aDefaultColAttrArray ));
 }
 
 SCROW ScColumn::GetNextUnprotected( SCROW nRow, bool bUp ) const
@@ -384,7 +383,7 @@ const ScPatternAttr* ScColumn::GetMostUsedPattern( SCROW 
nStartRow, SCROW nEndRo
 const ScPatternAttr* pMaxPattern = nullptr;
 size_t nMaxCount = 0;
 
-ScAttrIterator aAttrIter( pAttrArray, nStartRow, nEndRow, 
GetDoc()->GetDefPattern() );
+ScAttrIterator aAttrIter( pAttrArray.get(), nStartRow, nEndRow, 
GetDoc()->GetDefPattern() );
 const ScPatternAttr* pPattern;
 SCROW nAttrRow1 = 0, nAttrRow2 = 0;
 
@@ -626,7 +625,7 @@ const ScStyleSheet* ScColumn::GetSelectionStyle( const 
ScMarkData& rMark, bool&
 SCROW nBottom;
 while (bEqual && aMultiIter.Next( nTop, nBottom ))
 {
-ScAttrIterator aAttrIter( pAttrArray, nTop, nBottom, 
pDocument->GetDefPattern() );
+ScAttrIterator aAttrIter( pAttrArray.get(), nTop, nBottom, 
pDocument->GetDefPattern() );
 SCROW nRow;
 SCROW nDummy;
 const ScPatternAttr* pPattern;
@@ -652,7 +651,7 @@ const ScStyleSheet* ScColumn::GetAreaStyle( bool& rFound, 
SCROW nRow1, SCROW nRo
 const ScStyleSheet* pStyle = nullptr;
 const ScStyleSheet* pNewStyle;
 
-ScAttrIterator aAttrIter( pAttrArray, nRow1, nRow2, 
GetDoc()->GetDefPattern() );
+ScAttrIterator aAttrIter( pAttrArray.get(), nRow1, nRow2, 
GetDoc()->GetDefPattern() );
 SCROW nRow;
 SCROW nDummy;
 const ScPatternAttr* pPattern;
@@ -1765,7 +1764,7 @@ void ScColumn::CopyScenarioFrom( const ScColumn& rSrcCol )
 {
 //  This is the scenario table, the data is copied into it
 ScDocument* pDocument = GetDoc();
-ScAttrIterator aAttrIter( pAttrArray, 0, MAXROW, 
pDocument->GetDefPattern() );
+ScAttrIterator aAttrIter( pAttrArray.get(), 0, MAXROW, 
pDocument->GetDefPattern() );
 SCROW nStart = -1, nEnd = -1;
 const ScPatternAttr* pPattern = aAttrIter.Next( nStart, nEnd );
 while (pPattern)
@@ -1794,7 +1793,7 @@ void ScColumn::CopyScenarioTo( ScColumn& rDestCol ) const
 {
 //  This is the scenario table, the data is copied to the other
 ScDocument* pDocument = GetDoc();
-ScAttrIterator aAttrIter( pAttrArray, 0, MAXROW, 
pDocument->GetDefPattern() );
+ScAttrIterator aAttrIter( pAttrArray.get(), 0, MAXROW, 
pDocument->GetDefPattern() );
 SCROW nStart = -1, nEnd = -1;
 const ScPatternAttr* pPattern = aAttrIter.Next( nStart, nEnd );
 while (pPattern)
@@ -1819,7 +1818,7 @@ void ScColumn::CopyScenarioTo( ScColumn& rDestCol ) const
 bool ScColumn::TestCopyScenarioTo( const ScColumn& rDestCol ) const
 {
 bool bOk = true;
-ScAttrIterator aAttrIter( pAttrArray, 0, MAXROW, GetDoc()->GetDefPattern() 
);
+ScAttrIterator aAttrIter( pAttrArray.get(), 0, MAXROW, 
GetDoc()->GetDefPattern() );
 SCROW nStart = 0, nEnd = 0;
 const ScPatternAttr* pPattern = aAttrIter.Next( nStart, nEnd );
 while (pPattern && bOk)
@@ -1837,7 +1836,7 @@ void ScColumn::MarkScenarioIn( ScMarkData& rDestMark ) 
const
 {
 ScRange aRange( nCol, 0,

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

2018-03-21 Thread Noel Grandin
 sw/source/core/doc/doctxm.cxx |   11 +--
 sw/source/core/inc/doctxm.hxx |   40 ++--
 2 files changed, 15 insertions(+), 36 deletions(-)

New commits:
commit 2074a7a42d5865ce2915a0e3c16535d5105c6e71
Author: Noel Grandin 
Date:   Tue Mar 20 09:26:34 2018 +0200

loplugin:useuniqueptr in SwDefTOXBase_Impl

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

diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index 621f540c0e00..64310da59d4c 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -449,7 +449,7 @@ const SwAttrSet& SwDoc::GetTOXBaseAttrSet(const SwTOXBase& 
rTOXBase)
 
 const SwTOXBase* SwDoc::GetDefaultTOXBase( TOXTypes eTyp, bool bCreate )
 {
-SwTOXBase** prBase = nullptr;
+std::unique_ptr* prBase = nullptr;
 switch(eTyp)
 {
 case  TOX_CONTENT:  prBase = &mpDefTOXBases->pContBase; break;
@@ -468,14 +468,14 @@ const SwTOXBase* SwDoc::GetDefaultTOXBase( TOXTypes eTyp, 
bool bCreate )
 {
 SwForm aForm(eTyp);
 const SwTOXType* pType = GetTOXType(eTyp, 0);
-(*prBase) = new SwTOXBase(pType, aForm, SwTOXElement::NONE, 
pType->GetTypeName());
+prBase->reset(new SwTOXBase(pType, aForm, SwTOXElement::NONE, 
pType->GetTypeName()));
 }
-return (*prBase);
+return prBase->get();
 }
 
 voidSwDoc::SetDefaultTOXBase(const SwTOXBase& rBase)
 {
-SwTOXBase** prBase = nullptr;
+std::unique_ptr* prBase = nullptr;
 switch(rBase.GetType())
 {
 case  TOX_CONTENT:  prBase = &mpDefTOXBases->pContBase; break;
@@ -490,8 +490,7 @@ voidSwDoc::SetDefaultTOXBase(const SwTOXBase& rBase)
 }
 if (!prBase)
 return;
-delete *prBase;
-(*prBase) = new SwTOXBase(rBase);
+prBase->reset(new SwTOXBase(rBase));
 }
 
 /// Delete table of contents
diff --git a/sw/source/core/inc/doctxm.hxx b/sw/source/core/inc/doctxm.hxx
index 1e7fc131fbae..39826f2eb8ec 100644
--- a/sw/source/core/inc/doctxm.hxx
+++ b/sw/source/core/inc/doctxm.hxx
@@ -85,38 +85,18 @@ public:
 
 struct SwDefTOXBase_Impl
 {
-SwTOXBase* pContBase;
-SwTOXBase* pIdxBase;
-SwTOXBase* pUserBase;
-SwTOXBase* pTableBase;
-SwTOXBase* pObjBase;
-SwTOXBase* pIllBase;
-SwTOXBase* pAuthBase;
-SwTOXBase* pBiblioBase;
-
-SwDefTOXBase_Impl() :
-pContBase(nullptr),
-pIdxBase(nullptr),
-pUserBase(nullptr),
-pTableBase(nullptr),
-pObjBase(nullptr),
-pIllBase(nullptr),
-pAuthBase(nullptr),
-pBiblioBase(nullptr)
+std::unique_ptr pContBase;
+std::unique_ptr pIdxBase;
+std::unique_ptr pUserBase;
+std::unique_ptr pTableBase;
+std::unique_ptr pObjBase;
+std::unique_ptr pIllBase;
+std::unique_ptr pAuthBase;
+std::unique_ptr pBiblioBase;
+
+SwDefTOXBase_Impl()
 {
 }
-~SwDefTOXBase_Impl()
-{
-delete pContBase;
-delete pIdxBase;
-delete pUserBase;
-delete pTableBase;
-delete pObjBase;
-delete pIllBase;
-delete pAuthBase;
-delete pBiblioBase;
-}
-
 };
 
 #endif
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-03-21 Thread Noel Grandin
 sw/source/core/access/accpara.cxx |   20 
 sw/source/core/access/accpara.hxx |6 +++---
 2 files changed, 11 insertions(+), 15 deletions(-)

New commits:
commit a9c78d7849b62fde34ec79c50063fba550c05e70
Author: Noel Grandin 
Date:   Tue Mar 20 09:17:57 2018 +0200

loplugin:useuniqueptr in SwAccessibleParagraph

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

diff --git a/sw/source/core/access/accpara.cxx 
b/sw/source/core/access/accpara.cxx
index beb170862692..ecc08ddac942 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -557,9 +557,9 @@ SwAccessibleParagraph::~SwAccessibleParagraph()
 {
 SolarMutexGuard aGuard;
 
-delete m_pPortionData;
-delete m_pHyperTextData;
-delete mpParaChangeTrackInfo; // #i108125#
+m_pPortionData.reset();
+m_pHyperTextData.reset();
+mpParaChangeTrackInfo.reset(); // #i108125#
 EndListeningAll();
 }
 
@@ -577,9 +577,8 @@ void SwAccessibleParagraph::UpdatePortionData()
 const SwTextFrame* pFrame = static_cast( GetFrame() );
 
 // build new portion data
-delete m_pPortionData;
-m_pPortionData = new SwAccessiblePortionData(
-pFrame->GetTextNode(), GetMap()->GetShell()->GetViewOptions() );
+m_pPortionData.reset( new SwAccessiblePortionData(
+pFrame->GetTextNode(), GetMap()->GetShell()->GetViewOptions() ) );
 pFrame->VisitPortions( *m_pPortionData );
 
 OSL_ENSURE( m_pPortionData != nullptr, "UpdatePortionData() failed" );
@@ -587,11 +586,8 @@ void SwAccessibleParagraph::UpdatePortionData()
 
 void SwAccessibleParagraph::ClearPortionData()
 {
-delete m_pPortionData;
-m_pPortionData = nullptr;
-
-delete m_pHyperTextData;
-m_pHyperTextData = nullptr;
+m_pPortionData.reset();
+m_pHyperTextData.reset();
 }
 
 void SwAccessibleParagraph::ExecuteAtViewShell( sal_uInt16 nSlot )
@@ -3057,7 +3053,7 @@ uno::Reference< XAccessibleHyperlink > SAL_CALL
 if( pHt )
 {
 if( !m_pHyperTextData )
-m_pHyperTextData = new SwAccessibleHyperTextData;
+m_pHyperTextData.reset( new SwAccessibleHyperTextData 
);
 SwAccessibleHyperTextData::iterator aIter =
 m_pHyperTextData ->find( pHt );
 if( aIter != m_pHyperTextData->end() )
diff --git a/sw/source/core/access/accpara.hxx 
b/sw/source/core/access/accpara.hxx
index c96001afb2b8..3179edacd458 100644
--- a/sw/source/core/access/accpara.hxx
+++ b/sw/source/core/access/accpara.hxx
@@ -73,8 +73,8 @@ class SwAccessibleParagraph :
 // string.
 // pPortionData may be NULL; it should only be accessed through the
 // Get/Clear/Has/UpdatePortionData() methods
-SwAccessiblePortionData* m_pPortionData;
-SwAccessibleHyperTextData *m_pHyperTextData;
+std::unique_ptr m_pPortionData;
+std::unique_ptr m_pHyperTextData;
 
 sal_Int32 m_nOldCaretPos; // The 'old' caret pos. It's only valid as long
 // as the cursor is inside this object (protected 
by
@@ -86,7 +86,7 @@ class SwAccessibleParagraph :
 // implementation for XAccessibleSelection
 SwAccessibleSelectionHelper m_aSelectionHelper;
 
-SwParaChangeTrackingInfo* mpParaChangeTrackInfo; // #i108125#
+std::unique_ptr mpParaChangeTrackInfo; // 
#i108125#
 
 /// get the SwTextNode (requires frame; check before)
 const SwTextNode* GetTextNode() const;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-03-21 Thread Noel Grandin
 sc/inc/dptabres.hxx  |   10 +-
 sc/source/core/data/dptabres.cxx |   14 ++
 2 files changed, 11 insertions(+), 13 deletions(-)

New commits:
commit cc2c1d9525baa5746ee58bb4cb6b0b62eca20a51
Author: Noel Grandin 
Date:   Tue Mar 20 09:04:13 2018 +0200

loplugin:useuniqueptr in ScDPResultMember

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

diff --git a/sc/inc/dptabres.hxx b/sc/inc/dptabres.hxx
index 97274c1d659b..3f2400cc9ed8 100644
--- a/sc/inc/dptabres.hxx
+++ b/sc/inc/dptabres.hxx
@@ -341,8 +341,8 @@ class ScDPResultMember
 private:
 const ScDPResultData*   pResultData;
 ScDPParentDimDataaParentDimData;
-ScDPResultDimension*pChildDimension;
-ScDPDataMember* pDataRoot;
+std::unique_ptr  pChildDimension;
+std::unique_ptr   pDataRoot;
 boolbHasElements:1;
 boolbForceSubTotal:1;
 boolbHasHiddenDetails:1;
@@ -418,10 +418,10 @@ public:
 #endif
 
 //! this will be removed!
-const ScDPResultDimension*  GetChildDimension() const   { return 
pChildDimension; }
-ScDPResultDimension*GetChildDimension() { return 
pChildDimension; }
+const ScDPResultDimension*  GetChildDimension() const   { return 
pChildDimension.get(); }
+ScDPResultDimension*GetChildDimension() { return 
pChildDimension.get(); }
 
-ScDPDataMember* GetDataRoot() const { return 
pDataRoot; }
+ScDPDataMember* GetDataRoot() const { return 
pDataRoot.get(); }
 
 const ScDPDimension*  GetParentDim() const   { return 
aParentDimData.mpParentDim; } //! Ref
 const ScDPLevel* GetParentLevel() const { return 
aParentDimData.mpParentLevel; }   //! Ref
diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx
index 2ceb4f70f91b..48f3c95f0156 100644
--- a/sc/source/core/data/dptabres.cxx
+++ b/sc/source/core/data/dptabres.cxx
@@ -968,8 +968,6 @@ ScDPResultMember::ScDPResultMember(
 }
 ScDPResultMember::~ScDPResultMember()
 {
-delete pChildDimension;
-delete pDataRoot;
 }
 
 OUString ScDPResultMember::GetName() const
@@ -1056,7 +1054,7 @@ void ScDPResultMember::InitFrom( const 
vector& ppDim, const vect
 if (  ppDim[nPos]->getIsDataLayoutDimension() )
 {
  if ( !pChildDimension )
-pChildDimension = new ScDPResultDimension( pResultData 
);
+pChildDimension.reset( new ScDPResultDimension( 
pResultData ) );
 pChildDimension->InitFrom( ppDim, ppLev, nPos, rInitState 
, false );
 return;
 }
@@ -1072,7 +1070,7 @@ void ScDPResultMember::InitFrom( const 
vector& ppDim, const vect
 
 if ( bInitChild )
 {
-pChildDimension = new ScDPResultDimension( pResultData );
+pChildDimension.reset( new ScDPResultDimension( pResultData ) );
 pChildDimension->InitFrom(ppDim, ppLev, nPos, rInitState);
 }
 }
@@ -1100,7 +1098,7 @@ void ScDPResultMember::LateInitFrom(
 if (  rParams.GetDim( nPos )->getIsDataLayoutDimension() )
 {
 if ( !pChildDimension )
-pChildDimension = new ScDPResultDimension( pResultData );
+pChildDimension.reset( new ScDPResultDimension( 
pResultData ) );
 
 // #i111462# reset InitChild flag only for this child 
dimension's LateInitFrom call,
 // not for following members of parent dimensions
@@ -1124,7 +1122,7 @@ void ScDPResultMember::LateInitFrom(
 if ( rParams.GetInitChild() )
 {
 if ( !pChildDimension )
-pChildDimension = new ScDPResultDimension( pResultData );
+pChildDimension.reset( new ScDPResultDimension( pResultData ) );
 pChildDimension->LateInitFrom( rParams, pItemData, nPos, rInitState );
 }
 }
@@ -1261,7 +1259,7 @@ void ScDPResultMember::ProcessData( const vector< SCROW 
>& aChildMembers, const
 
 if ( !pDataRoot )
 {
-pDataRoot = new ScDPDataMember( pResultData, nullptr );
+pDataRoot.reset( new ScDPDataMember( pResultData, nullptr ) );
 if ( pDataDim )
 pDataRoot->InitFrom( pDataDim );// recursive
 }
@@ -1511,7 +1509,7 @@ void ScDPResultMember::FillMemberResults(
 uno::Sequence* pLayoutSeq = 
pSequences;
 if (!bRoot)
 ++pLayoutSeq;
-ScDPResultDimension* pLayoutDim = pChildDimension;
+ScDPResultDimension* pLayoutDim = pChildDimension.get();
 while ( pLayoutDim && !pLayoutDim->IsDataLayout() )
 {
 pLayoutDim = pLayoutDim->GetFirstChildD

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

2018-03-21 Thread Noel Grandin
 sw/inc/accmap.hxx|4 ++--
 sw/source/core/access/accmap.cxx |8 +++-
 2 files changed, 5 insertions(+), 7 deletions(-)

New commits:
commit e1315724322e0bcacb9c8fe25e3385ebd94ed505
Author: Noel Grandin 
Date:   Tue Mar 20 09:04:30 2018 +0200

loplugin:useuniqueptr in SwAccessibleMap

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

diff --git a/sw/inc/accmap.hxx b/sw/inc/accmap.hxx
index 975c01f559b9..5ed3fcfae7e3 100644
--- a/sw/inc/accmap.hxx
+++ b/sw/inc/accmap.hxx
@@ -104,7 +104,7 @@ class SwAccessibleMap : public 
::accessibility::IAccessibleViewForwarder,
 SwViewShell *mpVSh;
 /// for page preview: store preview data, VisArea, and mapping of
 /// preview-to-display coordinates
-SwAccPreviewData* mpPreview;
+std::unique_ptr mpPreview;
 
 css::uno::WeakReference < css::accessibility::XAccessible > 
mxCursorContext;
 
@@ -120,7 +120,7 @@ class SwAccessibleMap : public 
::accessibility::IAccessibleViewForwarder,
 void InvalidateShapeSelection();
 
 //mpSelectedFrameMap contains the old selected objects.
-SwAccessibleContextMap_Impl *mpSeletedFrameMap;
+std::unique_ptr mpSeletedFrameMap;
 
 OUString maDocName;
 
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index 215985502de2..dbfa3a76f9a3 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -1361,7 +1361,7 @@ void SwAccessibleMap::InvalidateShapeInParaSelection()
 }
 }
 if( !mpSeletedFrameMap )
-mpSeletedFrameMap = new SwAccessibleContextMap_Impl;
+mpSeletedFrameMap.reset( new SwAccessibleContextMap_Impl );
 if( !mpSeletedFrameMap->empty() )
 {
 SwAccessibleContextMap_Impl::iterator aIter = 
mpSeletedFrameMap->begin();
@@ -1705,8 +1705,7 @@ SwAccessibleMap::~SwAccessibleMap()
 mpSelectedParas = nullptr;
 }
 
-delete mpPreview;
-mpPreview = nullptr;
+mpPreview.reset();
 
 {
 osl::MutexGuard aGuard( maEventMutex );
@@ -1718,7 +1717,6 @@ SwAccessibleMap::~SwAccessibleMap()
 mpEvents = nullptr;
 }
 mpVSh->GetLayout()->RemoveAccessibleShell();
-delete mpSeletedFrameMap;
 }
 
 uno::Reference< XAccessible > SwAccessibleMap::GetDocumentView_(
@@ -1796,7 +1794,7 @@ uno::Reference 
SwAccessibleMap::GetDocumentPreview(
 {
 // create & update preview data object
 if( mpPreview == nullptr )
-mpPreview = new SwAccPreviewData();
+mpPreview.reset( new SwAccPreviewData() );
 mpPreview->Update( *this, _rPreviewPages, _rScale, _pSelectedPageFrame, 
_rPreviewWinSize );
 
 uno::Reference xAcc = GetDocumentView_( true );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-03-21 Thread Noel Grandin
 sd/source/ui/inc/DrawViewShell.hxx   |4 
 sd/source/ui/presenter/PresenterTextView.cxx |  132 ---
 sd/source/ui/view/drviews2.cxx   |   74 +++
 sd/source/ui/view/drviews7.cxx   |4 
 sd/source/ui/view/drviewsa.cxx   |   16 +--
 sd/source/ui/view/drviewse.cxx   |   24 ++--
 6 files changed, 120 insertions(+), 134 deletions(-)

New commits:
commit 00635fb32c09ab90bff713eb5de045e301a6
Author: Noel Grandin 
Date:   Mon Mar 19 15:11:25 2018 +0200

loplugin:useuniqueptr in DrawViewShell

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

diff --git a/sd/source/ui/inc/DrawViewShell.hxx 
b/sd/source/ui/inc/DrawViewShell.hxx
index 494f96cf5588..1db285351c1b 100644
--- a/sd/source/ui/inc/DrawViewShell.hxx
+++ b/sd/source/ui/inc/DrawViewShell.hxx
@@ -355,7 +355,7 @@ public:
 
 virtual css::uno::Reference 
CreateSubController() override;
 
-DrawView*   GetDrawView() const { return mpDrawView; }
+DrawView*   GetDrawView() const { return mpDrawView.get(); }
 
 /** Relocation to a new parent window is not supported for DrawViewShell
 objects so this method always returns .
@@ -369,7 +369,7 @@ public:
 //move this method to ViewShell.
 //void  NotifyAccUpdate();
 protected:
-DrawView*   mpDrawView;
+std::unique_ptr mpDrawView;
 SdPage* mpActualPage;
 ::tools::Rectangle   maMarkRect;
 Point   maMousePos;
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 6ba5d833ee9b..35d290692da6 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -938,7 +938,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
 else
 {
 // open zoom dialog
-SetCurrentFunction( FuScale::Create( this, GetActiveWindow(), 
mpDrawView, GetDoc(), rReq ) );
+SetCurrentFunction( FuScale::Create( this, GetActiveWindow(), 
mpDrawView.get(), GetDoc(), rReq ) );
 }
 Cancel();
 }
@@ -970,7 +970,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
 {
 if( mpDrawView->IsVectorizeAllowed() )
 {
-SetCurrentFunction( FuVectorize::Create( this, 
GetActiveWindow(), mpDrawView, GetDoc(), rReq ) );
+SetCurrentFunction( FuVectorize::Create( this, 
GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq ) );
 }
 else
 {
@@ -1329,7 +1329,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
 GraphicObject aGraphicObject( 
static_cast(pObj)->GetGraphicObject() );
 m_ExternalEdits.push_back(
 o3tl::make_unique(
-mpDrawView, pObj));
+mpDrawView.get(), pObj));
 m_ExternalEdits.back()->Edit( &aGraphicObject );
 }
 }
@@ -1368,7 +1368,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
 
 case SID_ATTRIBUTES_LINE:  // BASIC
 {
-SetCurrentFunction( FuLine::Create( this, GetActiveWindow(), 
mpDrawView, GetDoc(), rReq ) );
+SetCurrentFunction( FuLine::Create( this, GetActiveWindow(), 
mpDrawView.get(), GetDoc(), rReq ) );
 if (rReq.GetArgs())
 Cancel();
 }
@@ -1376,7 +1376,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
 
 case SID_ATTRIBUTES_AREA:  // BASIC
 {
-SetCurrentFunction( FuArea::Create( this, GetActiveWindow(), 
mpDrawView, GetDoc(), rReq ) );
+SetCurrentFunction( FuArea::Create( this, GetActiveWindow(), 
mpDrawView.get(), GetDoc(), rReq ) );
 if (rReq.GetArgs())
 Cancel();
 }
@@ -1384,7 +1384,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
 
 case SID_ATTR_TRANSFORM:
 {
-SetCurrentFunction( FuTransform::Create( this, GetActiveWindow(), 
mpDrawView, GetDoc(), rReq ) );
+SetCurrentFunction( FuTransform::Create( this, GetActiveWindow(), 
mpDrawView.get(), GetDoc(), rReq ) );
 if (rReq.GetArgs())
 {
 Invalidate(SID_RULER_OBJECT);
@@ -1396,14 +1396,14 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
 case SID_CHAR_DLG_EFFECT:
 case SID_CHAR_DLG:  // BASIC
 {
-SetCurrentFunction( FuChar::Create( this, GetActiveWindow(), 
mpDrawView, GetDoc(), rReq ) );
+SetCurrentFunction( FuChar::Create( this, GetActiveWindow(), 
mpDrawView.get(), GetDoc(), rReq ) );
 Cancel();
 }
 break;
 
 case SID_PARA_DLG:
 {
-SetCurrentFunction( FuParagra

Re: Resources on writing import/export file filters for Writer

2018-03-21 Thread Jens Tröger
Thank you David. That's a start but still assumes a lot of implicit knowledge
about the surrounding infrastructure. Is there a minimal export plugin to
start from? I do have quite some experience with the object model from the
Python/UNO view.

Also, it appears that LO6+ imports (x)html files to some extend. Where do I
ask questions/file bugs around that? Or, in the context of this thread,
where do I find the source on https://github.com/LibreOffice ?

I assume this one is a good way to settle in:
https://wiki.documentfoundation.org/Development/BuildingOnLinux  ?

Thanks!
Jens



--
Sent from: http://nabble.documentfoundation.org/Dev-f1639786.html
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: include/vcl solenv/clang-format toolkit/inc toolkit/Library_tk.mk toolkit/source vcl/Library_vcl.mk vcl/source

2018-03-21 Thread Caolán McNamara
 solenv/clang-format/blacklist|4 ++--
 toolkit/Library_tk.mk|1 +
 toolkit/inc/helper/btndlg.hxx|   13 ++---
 toolkit/inc/helper/msgbox.hxx|2 +-
 toolkit/source/helper/btndlg.cxx |3 +--
 vcl/Library_vcl.mk   |1 -
 6 files changed, 11 insertions(+), 13 deletions(-)

New commits:
commit 751191ed2d7d6af6eddc3d738e8c45b0a2ab2572
Author: Caolán McNamara 
Date:   Wed Mar 21 16:12:56 2018 +

move btndlg from vcl to toolkit

Change-Id: Iecc528bce1df9a67af43f9d9dd3ed41af24b0fad
Reviewed-on: https://gerrit.libreoffice.org/51713
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist
index 29b995cbdc69..5e1551bdcc14 100644
--- a/solenv/clang-format/blacklist
+++ b/solenv/clang-format/blacklist
@@ -7976,7 +7976,6 @@ include/vcl/animate.hxx
 include/vcl/bitmap.hxx
 include/vcl/bitmapaccess.hxx
 include/vcl/bitmapex.hxx
-include/vcl/btndlg.hxx
 include/vcl/builder.hxx
 include/vcl/builderfactory.hxx
 include/vcl/button.hxx
@@ -16739,6 +16738,7 @@ testtools/source/performance/ubtest.cxx
 toolkit/inc/helper/accessibilityclient.hxx
 toolkit/inc/helper/imagealign.hxx
 toolkit/inc/helper/tkresmgr.hxx
+toolkit/inc/helper/btndlg.hxx
 toolkit/inc/helper/unopropertyarrayhelper.hxx
 toolkit/inc/helper/unowrapper.hxx
 toolkit/source/awt/animatedimagespeer.cxx
@@ -16801,6 +16801,7 @@ toolkit/source/controls/unocontrolcontainermodel.cxx
 toolkit/source/controls/unocontrolmodel.cxx
 toolkit/source/controls/unocontrols.cxx
 toolkit/source/helper/accessibilityclient.cxx
+toolkit/source/helper/btndlg.cxx
 toolkit/source/helper/formpdfexport.cxx
 toolkit/source/helper/imagealign.cxx
 toolkit/source/helper/listenermultiplexer.cxx
@@ -18267,7 +18268,6 @@ vcl/source/window/accel.cxx
 vcl/source/window/accessibility.cxx
 vcl/source/window/accmgr.cxx
 vcl/source/window/brdwin.cxx
-vcl/source/window/btndlg.cxx
 vcl/source/window/builder.cxx
 vcl/source/window/clipping.cxx
 vcl/source/window/commandevent.cxx
diff --git a/toolkit/Library_tk.mk b/toolkit/Library_tk.mk
index 94e08a8dee74..29dc182bbc4f 100644
--- a/toolkit/Library_tk.mk
+++ b/toolkit/Library_tk.mk
@@ -109,6 +109,7 @@ $(eval $(call gb_Library_add_exception_objects,tk,\
 toolkit/source/controls/unocontrolmodel \
 toolkit/source/controls/unocontrols \
 toolkit/source/helper/accessibilityclient \
+toolkit/source/helper/btndlg \
 toolkit/source/helper/formpdfexport \
 toolkit/source/helper/imagealign \
 toolkit/source/helper/listenermultiplexer \
diff --git a/include/vcl/btndlg.hxx b/toolkit/inc/helper/btndlg.hxx
similarity index 88%
rename from include/vcl/btndlg.hxx
rename to toolkit/inc/helper/btndlg.hxx
index 86122f979d8a..eb278846d5f1 100644
--- a/include/vcl/btndlg.hxx
+++ b/toolkit/inc/helper/btndlg.hxx
@@ -20,7 +20,6 @@
 #ifndef INCLUDED_VCL_BTNDLG_HXX
 #define INCLUDED_VCL_BTNDLG_HXX
 
-#include 
 #include 
 #include 
 
@@ -47,7 +46,7 @@ namespace o3tl
 template<> struct typed_flags : 
is_typed_flags {};
 }
 
-class VCL_DLLPUBLIC ButtonDialog : public Dialog
+class ButtonDialog : public Dialog
 {
 public:
 ButtonDialog( vcl::Window* pParent, WinBits nStyle );
@@ -83,11 +82,11 @@ private:
 sal_uInt16  mnFocusButtonId;
 boolmbFormat;
 
-SAL_DLLPRIVATE void ImplInitButtonDialogData();
-SAL_DLLPRIVATE VclPtr ImplCreatePushButton( ButtonDialogFlags 
nBtnFlags );
-SAL_DLLPRIVATE ImplBtnDlgItem*  ImplGetItem( sal_uInt16 nId ) const;
-DECL_DLLPRIVATE_LINK( ImplClickHdl, Button* pBtn, void );
-SAL_DLLPRIVATE void ImplPosControls();
+void ImplInitButtonDialogData();
+VclPtr ImplCreatePushButton( ButtonDialogFlags nBtnFlags );
+ImplBtnDlgItem*  ImplGetItem( sal_uInt16 nId ) const;
+DECL_LINK( ImplClickHdl, Button* pBtn, void );
+void ImplPosControls();
 
 };
 
diff --git a/toolkit/inc/helper/msgbox.hxx b/toolkit/inc/helper/msgbox.hxx
index 40c7aa5514b3..0fc7631d93de 100644
--- a/toolkit/inc/helper/msgbox.hxx
+++ b/toolkit/inc/helper/msgbox.hxx
@@ -18,7 +18,7 @@
  */
 
 #include 
-#include 
+#include 
 
 // Window-Bits for MessageBoxen
 enum class MessBoxStyle
diff --git a/vcl/source/window/btndlg.cxx b/toolkit/source/helper/btndlg.cxx
similarity index 99%
rename from vcl/source/window/btndlg.cxx
rename to toolkit/source/helper/btndlg.cxx
index ba1b1d77e697..28d63b2c3f3e 100644
--- a/vcl/source/window/btndlg.cxx
+++ b/toolkit/source/helper/btndlg.cxx
@@ -18,10 +18,9 @@
  */
 
 #include 
-#include 
 
 #include 
-#include 
+#include 
 
 
 struct ImplBtnDlgItem
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index a777f238a070..82971a424eb3 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -142,7 +142,6 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
 vcl/source/window/stacking \
 vcl/source/wind

[Libreoffice-commits] core.git: dbaccess/inc include/vcl toolkit/inc

2018-03-21 Thread Caolán McNamara
 dbaccess/inc/pch/precompiled_dbu.hxx |1 -
 include/vcl/msgbox.hxx   |   28 
 toolkit/inc/helper/msgbox.hxx|   25 +
 3 files changed, 25 insertions(+), 29 deletions(-)

New commits:
commit bcb1392505ee3a19d8062402ff66888f1631b264
Author: Caolán McNamara 
Date:   Wed Mar 21 16:05:52 2018 +

move MessBoxStyle to last consumer

Change-Id: I1edbf247999cd59cee4d268ed686e8ed9b61d99f
Reviewed-on: https://gerrit.libreoffice.org/51712
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/dbaccess/inc/pch/precompiled_dbu.hxx 
b/dbaccess/inc/pch/precompiled_dbu.hxx
index 1a7661b30ce4..76a71af8ed9c 100644
--- a/dbaccess/inc/pch/precompiled_dbu.hxx
+++ b/dbaccess/inc/pch/precompiled_dbu.hxx
@@ -79,7 +79,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/include/vcl/msgbox.hxx b/include/vcl/msgbox.hxx
index 57d34a41afd1..ccdcf3aec7ff 100644
--- a/include/vcl/msgbox.hxx
+++ b/include/vcl/msgbox.hxx
@@ -21,34 +21,6 @@
 #define INCLUDED_VCL_MSGBOX_HXX
 
 #include 
-#include 
-#include 
-#include 
-#include 
-
-class VclMultiLineEdit;
-class FixedImage;
-class CheckBox;
-
-// Window-Bits for MessageBoxen
-enum class MessBoxStyle {
-NONE  = 0x,
-Ok= 0x0001,
-OkCancel  = 0x0002,
-YesNo = 0x0004,
-YesNoCancel   = 0x0008,
-RetryCancel   = 0x0010,
-DefaultOk = 0x0020,
-DefaultCancel = 0x0040,
-DefaultRetry  = 0x0080,
-DefaultYes= 0x0100,
-DefaultNo = 0x0200,
-AbortRetryIgnore  = 0x1000,
-DefaultIgnore = 0x2000,
-};
-namespace o3tl {
-template<> struct typed_flags : is_typed_flags {};
-}
 
 VCL_DLLPUBLIC Image const & GetStandardInfoBoxImage();
 VCL_DLLPUBLIC OUString GetStandardInfoBoxText();
diff --git a/toolkit/inc/helper/msgbox.hxx b/toolkit/inc/helper/msgbox.hxx
index 327c87e971b9..40c7aa5514b3 100644
--- a/toolkit/inc/helper/msgbox.hxx
+++ b/toolkit/inc/helper/msgbox.hxx
@@ -17,8 +17,33 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include 
 #include 
 
+// Window-Bits for MessageBoxen
+enum class MessBoxStyle
+{
+NONE = 0x,
+Ok = 0x0001,
+OkCancel = 0x0002,
+YesNo = 0x0004,
+YesNoCancel = 0x0008,
+RetryCancel = 0x0010,
+DefaultOk = 0x0020,
+DefaultCancel = 0x0040,
+DefaultRetry = 0x0080,
+DefaultYes = 0x0100,
+DefaultNo = 0x0200,
+AbortRetryIgnore = 0x1000,
+DefaultIgnore = 0x2000,
+};
+namespace o3tl
+{
+template <> struct typed_flags : is_typed_flags
+{
+};
+}
+
 class MessBox : public ButtonDialog
 {
 VclPtr mpVCLMultiLineEdit;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-03-21 Thread Caolán McNamara
 dbaccess/source/ui/app/AppControllerDnD.cxx  |2 
 dbaccess/source/ui/browser/brwctrlr.cxx  |4 
 dbaccess/source/ui/dlg/ConnectionHelper.cxx  |3 
 dbaccess/source/ui/dlg/ConnectionPage.cxx|6 
 dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx|   10 
 dbaccess/source/ui/dlg/adminpages.cxx|8 
 dbaccess/source/ui/dlg/detailpages.cxx   |7 
 dbaccess/source/ui/dlg/sqlmessage.cxx|  240 +--
 dbaccess/source/ui/dlg/tablespage.cxx|5 
 dbaccess/source/ui/inc/UITools.hxx   |   24 -
 dbaccess/source/ui/inc/sqlmessage.hxx|   83 +++--
 dbaccess/source/ui/misc/DExport.cxx  |4 
 dbaccess/source/ui/misc/RowSetDrop.cxx   |4 
 dbaccess/source/ui/misc/UITools.cxx  |   18 -
 dbaccess/source/ui/misc/WCopyTable.cxx   |2 
 dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx|   15 
 dbaccess/source/ui/querydesign/querycontroller.cxx   |   18 -
 dbaccess/source/ui/relationdesign/RelationController.cxx |7 
 dbaccess/source/ui/relationdesign/RelationTableView.cxx  |   20 -
 dbaccess/source/ui/tabledesign/TableController.cxx   |   32 +-
 dbaccess/source/ui/uno/dbinteraction.cxx |4 
 dbaccess/source/ui/uno/unosqlmessage.cxx |6 
 22 files changed, 243 insertions(+), 279 deletions(-)

New commits:
commit a084d003a927440fb56b11a0b7175360a1af41ab
Author: Caolán McNamara 
Date:   Tue Mar 20 17:17:10 2018 +

weld OSQLMessageBox

Change-Id: Idbdb07bc342a91695d15ea1a87d1863798ca34b0
Reviewed-on: https://gerrit.libreoffice.org/51676
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/dbaccess/source/ui/app/AppControllerDnD.cxx 
b/dbaccess/source/ui/app/AppControllerDnD.cxx
index 7012171dd72c..342de47f7ec5 100644
--- a/dbaccess/source/ui/app/AppControllerDnD.cxx
+++ b/dbaccess/source/ui/app/AppControllerDnD.cxx
@@ -120,7 +120,7 @@ void OApplicationController::deleteTables(const 
std::vector< OUString>& _rList)
 
 sal_Int32 nResult = RET_YES;
 if ( bConfirm )
-nResult = 
::dbaui::askForUserAction(getView(),STR_TITLE_CONFIRM_DELETION 
,STR_QUERY_DELETE_TABLE,_rList.size() > 1 && (aIter+1) != 
_rList.end(),sTableName);
+nResult = ::dbaui::askForUserAction(getFrameWeld(), 
STR_TITLE_CONFIRM_DELETION, STR_QUERY_DELETE_TABLE, _rList.size() > 1 && 
(aIter+1) != _rList.end(), sTableName);
 
 bool bUserConfirmedDelete =
 ( RET_YES == nResult )
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx 
b/dbaccess/source/ui/browser/brwctrlr.cxx
index 65fded7d83a4..d6c6415ebec5 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -1259,8 +1259,8 @@ IMPL_LINK_NOARG( SbaXDataBrowserController, 
OnAsyncDisplayError, void*, void )
 {
 if ( m_aCurrentError.isValid() )
 {
-ScopedVclPtrInstance< OSQLMessageBox > aDlg( getBrowserView(), 
m_aCurrentError );
-aDlg->Execute();
+OSQLMessageBox aDlg(getFrameWeld(), m_aCurrentError);
+aDlg.run();
 }
 }
 
diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx 
b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
index 50c3c9d3bf28..e2c0f4c47903 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
@@ -694,7 +694,8 @@ namespace dbaui
 {
 OUString sFile = DBA_RES( STR_FILE_DOES_NOT_EXIST );
 sFile = sFile.replaceFirst("$file$", 
aTransformer.get(OFileNotation::N_SYSTEM));
-ScopedVclPtrInstance(this, 
sFile)->Execute();
+OSQLWarningBox aWarning(GetFrameWeld(), sFile);
+aWarning.run();
 setURLNoPrefix(sOldPath);
 SetRoadmapStateValue(false);
 callModifiedHdl();
diff --git a/dbaccess/source/ui/dlg/ConnectionPage.cxx 
b/dbaccess/source/ui/dlg/ConnectionPage.cxx
index d0e72c72d289..670c399fa149 100644
--- a/dbaccess/source/ui/dlg/ConnectionPage.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionPage.cxx
@@ -306,9 +306,9 @@ namespace dbaui
 #endif
 
 const char* pMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : 
STR_JDBCDRIVER_NO_SUCCESS;
-const OSQLMessageBox::MessageType mt = bSuccess ? OSQLMessageBox::Info 
: OSQLMessageBox::Error;
-ScopedVclPtrInstance< OSQLMessageBox > aMsg( this, DBA_RES(pMessage), 
OUString(), MessBoxStyle::Ok | MessBoxStyle::DefaultOk, mt );
-aMsg->Execute();
+const MessageType mt = bSuccess ? MessageType::Info : 
MessageType::Error;
+OSQLMessageBox aMsg(GetFrameWeld(), DBA_RES(pMessage),

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

2018-03-21 Thread Ashod Nakashian
 libreofficekit/qa/tilebench/tilebench.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 519293447189f75e842065f7ff211d395d0da4b6
Author: Ashod Nakashian 
Date:   Fri Mar 16 20:29:27 2018 -0400

lok: be informative and exit when tilebench fails to initialize

Change-Id: I11078e36aafc715b7103998a17e0cb01926b8e97
Reviewed-on: https://gerrit.libreoffice.org/51618
Tested-by: Jenkins 
Reviewed-by: Ashod Nakashian 

diff --git a/libreofficekit/qa/tilebench/tilebench.cxx 
b/libreofficekit/qa/tilebench/tilebench.cxx
index 751fb179169f..ed3d57d05b3f 100644
--- a/libreofficekit/qa/tilebench/tilebench.cxx
+++ b/libreofficekit/qa/tilebench/tilebench.cxx
@@ -113,6 +113,12 @@ int main( int argc, char* argv[] )
 aTimes.emplace_back("initialization");
 // coverity[tainted_string] - build time test tool
 Office *pOffice = lok_cpp_init(argv[1]);
+if (pOffice == nullptr)
+{
+fprintf(stderr, "Failed to initialize Office from %s\n", argv[1]);
+return 1;
+}
+
 aTimes.emplace_back();
 
 const int max_parts = (argc > 3 ? atoi(argv[3]) : -1);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Paragraph style in writer

2018-03-21 Thread serdar tunc
Hello everyone.

I am working on Bug 82175
 and I could not
find the paragraph style properties in code. I've tried to debug on
oox/source/drawingml/textparagraph.cxx but the program does not go in
there. I could not find it in opengrok and writerfilter. Can somebody help
me please?

Best Regards...
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Changes to 'refs/tags/libreoffice-6.0.3.1-buildfix2'

2018-03-21 Thread Christian Lohmaier
Tag 'libreoffice-6.0.3.1-buildfix2' created by Christian Lohmaier 
 at 2018-03-21 21:06 +

Tag libreoffice-6.0.3.1-buildfix2
-BEGIN PGP SIGNATURE-

iQIcBAABAgAGBQJassk8AAoJEPQ0oe+v7q6jClEQAL6QpMpXhzAL0GBhbfTIU9sm
UE67+V5EWodxcDmrL6kCqhHoTavMZUuZmoSbPGVAKIG7ncpcRDiaxfSqozJOTKx/
JaWGxX2R0viGiUblOaQ/NxPWbPhXIgylmXTsMQjo+d1o/9T8owV6hhNJEI9npoZC
gP4uhGNPmuoKW6nh77foQfsPx6PoGwsZeH0ZAEjLJbe99Rdn7Vd+s/PmJ5NBNIib
A69SkKC2SN51ljARYj1NU/+bgOY7LurdFphPuUJT5aWPSsUpWyjtCpYeBW6MpvcO
OoFwPtgM2OYwEo9mZ56IOaGJGES3yKXTaL2Zydw89HZBh2CGaaqviQNvMmhTW+of
KEomHrO1XQXGHyXHsiCfMCWqWjZqt2hnKn5Z3+RdDXkwHm0vxFXI/ApsKGYaCK7z
KXkOF0RNTFZWTowPQzb626TGZaSa7ztqQmVODWXQfiUIhr4G7iHksDgbKGvNHWjv
iqTVJw+PHokXZPrMDrHPde9TrnzJ2Xa/EybbD1NJlxj7lEkjtEE1YXV+k73Lh2D9
zXL00a8G++j3wRVVmjmHstSzgbVa10g0Oy9NvUw2U+kkSbsuOaf3pwCgio2LKPAJ
POWGk4/soRj57lWyXB4SKSVGr7bV6wVSkmLCch4zwE3ugYnlpGO9Azmn73igBV23
6HaSZUL8zMLl4wjOsFk9
=IMiD
-END PGP SIGNATURE-

Changes since libreoffice-6.0.3.1-buildfix1-1:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] translations.git: Changes to 'refs/tags/libreoffice-6.0.3.1-buildfix2'

2018-03-21 Thread Christian Lohmaier
Tag 'libreoffice-6.0.3.1-buildfix2' created by Christian Lohmaier 
 at 2018-03-21 21:06 +

Tag libreoffice-6.0.3.1-buildfix2
-BEGIN PGP SIGNATURE-

iQIcBAABAgAGBQJassk4AAoJEPQ0oe+v7q6j3b0P/0V229pq+UsPqeCfLHw8PQiB
qjOe/3gLZFqsjoZ0i4mRMOJPxC+N5kV6u4iXkByREnEv/E2WGnbdaX1vf+Tjkjwu
bQ0FMv8fs2BUYMZ2usNn7GTkmJTnlAN37y4IfCWI/V4DNILXZJS1kyiwQwMPZ1J0
L4p7g+hnJP/xb+rRBtD7DyY3cLI4JKWlPpgbOrV/NMmvFYqSTPpwXX0I5/pgz/Hr
UcttZADJaMDdLFVdNBTIg8hAjLdTLb7Trg37WRvbI5HwcQR40Ba2v33LlWyG5X5B
eLanJEp8Q57BD+/hqUVjUeJYVt1N98fOwNxr1h/NnaTa9lp87qSdI2AXK3e8P4GP
Xt5kxGV1m+kbjdhHEVDu6N3T2L/YDgwE51T4rdqipWEF/3LQit3FJBljMB+xR3rb
XNXkK4zHx37BbAD/xzJZvnS3I+V40uJRYrDkwZ8+VBRs8dWcIOnDPp0zJgXBcQgA
b8nFhoNDw9RYXGywWd6UFXQTlvH1XyT0JEA8vE6PGzd5efoY94mTElO0JLhX4nB6
Q3pnCG0n3aN+GS42fVgZK0vhPlxAAvLh6lcBytPa0Nvqz2TriOWX2bnyjt7Ks6zn
64DA344YfZORcBG2BrJ5R9LkazmhBVku0qnpNaILhesJlhhREOSxlBputQ6yyFMG
D/skIX8GWoa3RMZFoH9X
=s8Dd
-END PGP SIGNATURE-

Changes since libreoffice-6.0.3.1-buildfix1:
Christian Lohmaier (1):
  Version 6.0.3.1, tag libreoffice-6.0.3.1-buildfix2

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


[Libreoffice-commits] dictionaries.git: Changes to 'refs/tags/libreoffice-6.0.3.1-buildfix2'

2018-03-21 Thread Christian Lohmaier
Tag 'libreoffice-6.0.3.1-buildfix2' created by Christian Lohmaier 
 at 2018-03-21 21:05 +

Tag libreoffice-6.0.3.1-buildfix2
-BEGIN PGP SIGNATURE-

iQIcBAABAgAGBQJasskxAAoJEPQ0oe+v7q6jgwUP/jRc39WdREUnDWopMUnqaUzI
mvFy9aJCFy29kgSBvw9gUVT99N5vq9aiSND48QWJdLg4M66v4mHydcTSWj7Ghmk1
XNxuoPqvFmEWlMmcuUbB/KBtF/6WMuw1MMzRydih2quCWL0POy/alxEXmp0Q1GAa
ZnowyHIegNyQhpePNC28STPfKSE+hmKkJM7YC1+ExP1ElEB6pfEkjXGiTQFPkqEV
wYveoUkgDa0vsjMKrfdY66wLIzm2ZnQj27CSCbkbQl1RbCNsmX260aUn3HaW6D/P
wfDROPab0oIKdICq99oz8qCooUQOb7NNW2pst8IJqV+TKVtUQP8kMsUYYbWKdJHt
1BUdoJeO+XgfBaOzqCHURTS+TwJ1wcc1uUcFFBdONs4UA/7JM0hTBwbJUKFiDqBh
z90Dr2qTtDfT2Q0EQV/Omh6Px5HKXKA5V0qknPorjXL1mVGJmrvmESQvkq4EJQyb
y2K77PRQy1E1XzVn/bu0BL02tipuLS2ws8ZcFXLTEKcZgfkHBQr+AfQ2uC28Zfej
U88tdZCNcswBsVNmI+VeehQj4bPSm0SyovF+UJciYIkgU3NxM5AwaE5vB6QA6zTD
FScVOuEecrl2jlNp/4SL53k1cUR/klCcnPkXw0qqRXxDQ7TyrQ6XUblvw9QO47sE
rsHoJpXa4EiF3zI9cs5P
=Q3Qf
-END PGP SIGNATURE-

Changes since libreoffice-6.0.3.1-buildfix1:
Christian Lohmaier (1):
  Version 6.0.3.1, tag libreoffice-6.0.3.1-buildfix2

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


[Libreoffice-commits] help.git: Changes to 'refs/tags/libreoffice-6.0.3.1-buildfix2'

2018-03-21 Thread Christian Lohmaier
Tag 'libreoffice-6.0.3.1-buildfix2' created by Christian Lohmaier 
 at 2018-03-21 21:05 +

Tag libreoffice-6.0.3.1-buildfix2
-BEGIN PGP SIGNATURE-

iQIcBAABAgAGBQJassk1AAoJEPQ0oe+v7q6joJ4QAICapfasulgq96iv7O9dQD44
IB72EO1JxowzWEdpQbhTcZnjV4V1TOPC+tV8/TupZD02OOnYdE2CJ0bpHcRL4Wkg
+bupcOnkmjgC2N/JftUTyLrpupx2nnmZqQq+D4b3HFX5+XnJ1CYBzWHcwsCovRDT
Nhx2psgz1jktrb6LDr1HrfqZ7T71DtGtL2+iPDw/bHeHfY5vGrMCjVf3qT56bwaU
EYY7eBZpwnRRkBwpqItocM2bwE4ZuagJXsM0n1lEjlCnn4987M1QVDu1hgintHTy
M1D8w8rMTEvywfM4cmGJo4e0o7KBejAJhodt47gFsfthgPldQjCYa65rG+uVsAR6
DbDonLEIiCFzZIwn9OcPSY3xaE2KdYQ/TlfoLvsI7eTWVWVJIRkKGtcHeozwK39F
bo1Fs5PdCTZKbdxo/gXsW55qrgFuY0CLfKR5AFc3a39Xuki/rTIVnxWeguluxTCp
iXsFoD0omCFsAhPRaRXlBoen/a4sE5R5m59HAIG5ROOTyWR0m78mpLA46tubipmb
ThNrwBT05w1MD8l9VoSwFG0TysKrt8OTm1XUZtdcxvCgKDrMMnXlXwuQnTyoz+06
L4RT3WLdnWFr70SWbKwRpJso6M+yfNCVlTlOlqb/3wdRwDUdyv0SVAXmtwbjabWW
f/Pjzt4G/ieRccrrmfBX
=4CWR
-END PGP SIGNATURE-

Changes since libreoffice-6.0.3.1-buildfix1:
Christian Lohmaier (1):
  Version 6.0.3.1, tag libreoffice-6.0.3.1-buildfix2

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


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0-3' - vcl/inc vcl/win

2018-03-21 Thread Jan-Marek Glogowski
 vcl/inc/win/saldata.hxx |2 +-
 vcl/inc/win/salframe.h  |4 ++--
 vcl/win/app/salinst.cxx |2 +-
 vcl/win/window/salframe.cxx |   17 -
 4 files changed, 8 insertions(+), 17 deletions(-)

New commits:
commit 17185b48422f4d766e52bbbe38932901969c4f93
Author: Jan-Marek Glogowski 
Date:   Wed Mar 14 20:05:50 2018 +0100

tdf#115420 fix DC usecount and drop wrong asserts

For DC initialization we check the thread ID to assign a normal
or cached DC to the corresponding WinSalGraphics variable.
The cached DC has a usage count, as there are some limits on
cached DCs count (DCX_CACHE).

But for the WinSalGraphics DC init and release the variable just
matters for the accounting, and generally which thread is doing
the calls: the non-main thread always has to relay them to the
main application thread.

Since we're releasing all WinSalGraphics in ~WinSalFrame and do
all release and re-init in ImplSetParentFrame, there is no way
to correspond the thread ID to the WinSalGraphics variable.

So this drops the wrong assertions based on the WinSalGraphics
variables and renames the GETDC message to GETCACHEDDC to make
usage of a cached DC (DCX_CACHE) more obvious.
As a consequence of the different release DC handling this also
fixes the accounting of the cached DCs, wich was broken in the
initial fix; commit c15ea73f960bbd3d2a4b0c43b467ac62eeba3505

Change-Id: I11ce52a1b4005f26567f92588437fa37bf227a2e
Reviewed-on: https://gerrit.libreoffice.org/51318
Tested-by: Jenkins 
Reviewed-by: Jan-Marek Glogowski 
(cherry picked from commit 8939cb9456ee76a848cc8089747f280751092cf8)
Reviewed-on: https://gerrit.libreoffice.org/51549
Reviewed-by: Michael Meeks 
(cherry picked from commit 8e870ea9b828166b89a5c3f6c4f060bde6082f26)
Reviewed-on: https://gerrit.libreoffice.org/51714
Reviewed-by: Christian Lohmaier 
Tested-by: Christian Lohmaier 

diff --git a/vcl/inc/win/saldata.hxx b/vcl/inc/win/saldata.hxx
index 45c402363119..8f5a3b87b415 100644
--- a/vcl/inc/win/saldata.hxx
+++ b/vcl/inc/win/saldata.hxx
@@ -215,7 +215,7 @@ int ImplSalWICompareAscii( const wchar_t* pStr1, const 
char* pStr2 );
 // wParam == 0; lParam == pObject;
 #define SAL_MSG_DESTROYOBJECT   (WM_USER+117)
 // wParam == hWnd; lParam == 0; lResult == hDC
-#define SAL_MSG_GETDC   (WM_USER+120)
+#define SAL_MSG_GETCACHEDDC (WM_USER+120)
 // wParam == hWnd; lParam == 0
 #define SAL_MSG_RELEASEDC   (WM_USER+121)
 // wParam == newParentHwnd; lParam == oldHwnd; lResult == newhWnd
diff --git a/vcl/inc/win/salframe.h b/vcl/inc/win/salframe.h
index 77902a40034e..36e4a041c955 100644
--- a/vcl/inc/win/salframe.h
+++ b/vcl/inc/win/salframe.h
@@ -33,8 +33,8 @@ public:
 HWNDmhWnd;  // Window handle
 HCURSOR mhCursor;   // cursor handle
 HIMCmhDefIMEContext;// default IME-Context
-WinSalGraphics* mpLocalGraphics;// current local frame 
graphics
-WinSalGraphics* mpThreadGraphics;   // current frame graphics 
for other threads
+WinSalGraphics* mpLocalGraphics;// current main thread 
frame graphics
+WinSalGraphics* mpThreadGraphics;   // current frame graphics 
for other threads (DCX_CACHE)
 WinSalFrame*mpNextFrame;// pointer to next frame
 HMENU   mSelectedhMenu; // the menu where 
highlighting is currently going on
 HMENU   mLastActivatedhMenu;// the menu that was most 
recently opened
diff --git a/vcl/win/app/salinst.cxx b/vcl/win/app/salinst.cxx
index 5671361c987b..b13360f40b16 100644
--- a/vcl/win/app/salinst.cxx
+++ b/vcl/win/app/salinst.cxx
@@ -639,7 +639,7 @@ LRESULT CALLBACK SalComWndProc( HWND, UINT nMsg, WPARAM 
wParam, LPARAM lParam, b
 CASE_NOYIELDLOCK_RESULT( SAL_MSG_CREATEOBJECT, ImplSalCreateObject(
 GetSalData()->mpInstance, reinterpret_cast(lParam)) )
 CASE_NOYIELDLOCK( SAL_MSG_DESTROYOBJECT, delete 
reinterpret_cast(lParam) )
-CASE_NOYIELDLOCK_RESULT( SAL_MSG_GETDC, GetDCEx(
+CASE_NOYIELDLOCK_RESULT( SAL_MSG_GETCACHEDDC, GetDCEx(
 reinterpret_cast(wParam), nullptr, DCX_CACHE) )
 CASE_NOYIELDLOCK( SAL_MSG_RELEASEDC, ReleaseDC(
 reinterpret_cast(wParam), reinterpret_cast(lParam)) )
diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index dd0c4a521f74..f34c9d0936cc 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -924,17 +924,12 @@ bool WinSalFrame::ReleaseFrameGraphicsDC( WinSalGraphics* 
pGraphics )
 // we don't want to run the WinProc in the main thread directly
 // so we don't hit the mbNoYieldLock assert
 if ( !pSalData->mpInstance->IsMainThread() )
-{
-assert( pGraphics ==

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

2018-03-21 Thread Caolán McNamara
 vcl/unx/gtk3/gtk3gtkinst.cxx |   56 +--
 1 file changed, 49 insertions(+), 7 deletions(-)

New commits:
commit 2c498cfe21145a9290e004b10ad87f28605d230e
Author: Caolán McNamara 
Date:   Wed Mar 21 15:57:57 2018 +

block buttons with click handlers from setting a response

which is effectively what vcl buttons do

Change-Id: Ic4374b3a761b954548ff10d654422d14ef6e0763
Reviewed-on: https://gerrit.libreoffice.org/51710
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 1c635bfec584..ee3ae83fbfdd 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -1161,12 +1161,12 @@ namespace
 void set_help_id(const GtkWidget *pWidget, const OString& rHelpId)
 {
 gchar *helpid = g_strdup(rHelpId.getStr());
-g_object_set_data_full(G_OBJECT(pWidget), "helpid", helpid, g_free);
+g_object_set_data_full(G_OBJECT(pWidget), "g-lo-helpid", helpid, 
g_free);
 }
 
 OString get_help_id(const GtkWidget *pWidget)
 {
-void* pData = g_object_get_data(G_OBJECT(pWidget), "helpid");
+void* pData = g_object_get_data(G_OBJECT(pWidget), "g-lo-helpid");
 const gchar* pStr = static_cast(pData);
 return OString(pStr, pStr ? strlen(pStr) : 0);
 }
@@ -1563,6 +1563,8 @@ private:
 help();
 return;
 }
+else if (has_click_handler(ret))
+return;
 
 hide();
 m_aFunc(GtkToVcl(ret));
@@ -1595,6 +1597,8 @@ public:
 return true;
 }
 
+bool has_click_handler(int nResponse);
+
 virtual int run() override
 {
 
sort_native_button_order(GTK_BOX(gtk_dialog_get_action_area(m_pDialog)));
@@ -1607,6 +1611,9 @@ public:
 help();
 continue;
 }
+else if (has_click_handler(ret))
+continue;
+
 break;
 }
 hide();
@@ -1630,10 +1637,7 @@ public:
 return nResponse;
 }
 
-virtual void response(int nResponse) override
-{
-gtk_dialog_response(m_pDialog, VclToGtk(nResponse));
-}
+virtual void response(int nResponse) override;
 
 virtual void add_button(const OUString& rText, int nResponse, const 
OString& rHelpId) override
 {
@@ -1834,12 +1838,14 @@ private:
 GtkInstanceButton* pThis = static_cast(widget);
 pThis->signal_clicked();
 }
+
 public:
 GtkInstanceButton(GtkButton* pButton, bool bTakeOwnership)
 : GtkInstanceContainer(GTK_CONTAINER(pButton), bTakeOwnership)
 , m_pButton(pButton)
 , m_nSignalId(g_signal_connect(pButton, "clicked", 
G_CALLBACK(signalClicked), this))
 {
+g_object_set_data(G_OBJECT(m_pButton), "g-lo-GtkInstanceButton", this);
 }
 
 virtual void set_label(const OUString& rText) override
@@ -1853,20 +1859,56 @@ public:
 return OUString(pStr, pStr ? strlen(pStr) : 0, RTL_TEXTENCODING_UTF8);
 }
 
+// allow us to block buttons with click handlers making dialogs return a 
response
+bool has_click_handler() const
+{
+return m_aClickHdl.IsSet();
+}
+
+void clear_click_handler()
+{
+m_aClickHdl = Link();
+}
+
 virtual ~GtkInstanceButton() override
 {
+g_object_steal_data(G_OBJECT(m_pButton), "g-lo-GtkInstanceButton");
 g_signal_handler_disconnect(m_pButton, m_nSignalId);
 }
 };
 
 weld::Button* GtkInstanceDialog::get_widget_for_response(int nResponse)
 {
-GtkButton* pButton = 
GTK_BUTTON(gtk_dialog_get_widget_for_response(m_pDialog, nResponse));
+GtkButton* pButton = 
GTK_BUTTON(gtk_dialog_get_widget_for_response(m_pDialog, VclToGtk(nResponse)));
 if (!pButton)
 return nullptr;
 return new GtkInstanceButton(pButton, false);
 }
 
+void GtkInstanceDialog::response(int nResponse)
+{
+//unblock this response now when activated through code
+if (GtkWidget* pWidget = gtk_dialog_get_widget_for_response(m_pDialog, 
VclToGtk(nResponse)))
+{
+void* pData = g_object_get_data(G_OBJECT(pWidget), 
"g-lo-GtkInstanceButton");
+GtkInstanceButton* pButton = static_cast(pData);
+if (pButton)
+pButton->clear_click_handler();
+}
+gtk_dialog_response(m_pDialog, VclToGtk(nResponse));
+}
+
+bool GtkInstanceDialog::has_click_handler(int nResponse)
+{
+if (GtkWidget* pWidget = gtk_dialog_get_widget_for_response(m_pDialog, 
VclToGtk(nResponse)))
+{
+void* pData = g_object_get_data(G_OBJECT(pWidget), 
"g-lo-GtkInstanceButton");
+GtkInstanceButton* pButton = static_cast(pData);
+return pButton && pButton->has_click_handler();
+}
+return false;
+}
+
 class GtkInstanceToggleButton : public GtkInstanceButton, public virtual 
weld::ToggleButton
 {
 private:
___
Lib

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

2018-03-21 Thread Caolán McNamara
 sw/source/core/frmedt/feshview.cxx |   11 ---
 1 file changed, 8 insertions(+), 3 deletions(-)

New commits:
commit deb5db7bf6d45338c9b6f6f4a1d62fba168b7a85
Author: Caolán McNamara 
Date:   Wed Mar 21 14:08:49 2018 +

Resolves: tdf#116429 unwanted extra step in undo insert shape

Change-Id: I23065275baa60a09f2a3c15513e3f2b8160e2bf0
Reviewed-on: https://gerrit.libreoffice.org/51706
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit 655d7340536ed2847d1da873b141d8776f791d12)
Reviewed-on: https://gerrit.libreoffice.org/51711

diff --git a/sw/source/core/frmedt/feshview.cxx 
b/sw/source/core/frmedt/feshview.cxx
index 8f6e3ef357b9..69b41e9a3c98 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -2005,6 +2005,14 @@ bool SwFEShell::ImpEndCreate()
 }
 else
 {
+if (rSdrObj.GetName().isEmpty())
+{
+bool bRestore = GetDoc()->GetIDocumentUndoRedo().DoesDrawUndo();
+GetDoc()->GetIDocumentUndoRedo().DoDrawUndo(false);
+rSdrObj.SetName(GetUniqueShapeName());
+GetDoc()->GetIDocumentUndoRedo().DoDrawUndo(bRestore);
+}
+
 Point aRelNullPt;
 if( OBJ_CAPTION == nIdent )
 aRelNullPt = static_cast(rSdrObj).GetTailPos();
@@ -2060,9 +2068,6 @@ bool SwFEShell::ImpEndCreate()
 pAnch = pTmp;
 }
 
-if (rSdrObj.GetName().isEmpty())
-rSdrObj.SetName(GetUniqueShapeName());
-
 pContact->ConnectToLayout();
 
 // mark object at frame the object is inserted at.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-03-21 Thread Caolán McNamara
 include/vcl/dialog.hxx|1 +
 include/vcl/weld.hxx  |3 +++
 vcl/source/app/salvtables.cxx |8 
 vcl/source/window/dialog.cxx  |   36 
 vcl/unx/gtk3/gtk3gtkinst.cxx  |   10 ++
 5 files changed, 58 insertions(+)

New commits:
commit 678980ceaebd47916a4aafb448a3bfcfd5d3ca25
Author: Caolán McNamara 
Date:   Wed Mar 21 14:33:59 2018 +

add get_widget_for_response support

Change-Id: I49abb5e6621dbfe2fc92ef9c2a47568c62c372c2
Reviewed-on: https://gerrit.libreoffice.org/51709
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx
index 0b98901e32bb..6104def06236 100644
--- a/include/vcl/dialog.hxx
+++ b/include/vcl/dialog.hxx
@@ -178,6 +178,7 @@ public:
 
 voidadd_button(PushButton* pButton, int nResponse, bool 
bTransferOwnership);
 voidset_default_response(int nResponse);
+vcl::Window*get_widget_for_response(int nResponse);
 };
 
 class VCL_DLLPUBLIC ModelessDialog : public Dialog
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 58b0ddd80284..88c53b7e2336 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -124,6 +124,8 @@ public:
 ~WaitObject() { m_pWindow->set_busy_cursor(false); }
 };
 
+class Button;
+
 class VCL_DLLPUBLIC Dialog : virtual public Window
 {
 private:
@@ -138,6 +140,7 @@ public:
 virtual void add_button(const OUString& rText, int response, const 
OString& rHelpId = OString())
 = 0;
 virtual void set_default_response(int response) = 0;
+virtual Button* get_widget_for_response(int response) = 0;
 };
 
 class VCL_DLLPUBLIC MessageDialog : virtual public Dialog
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 52ff2baf67a7..27a0c288c593 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -478,6 +478,8 @@ public:
 m_xDialog->add_button(xButton, nResponse, true);
 }
 
+virtual weld::Button* get_widget_for_response(int nResponse) override;
+
 virtual void set_default_response(int nResponse) override
 {
 m_xDialog->set_default_response(nResponse);
@@ -665,6 +667,12 @@ IMPL_LINK(SalInstanceButton, ClickHdl, ::Button*, pButton, 
void)
 signal_clicked();
 }
 
+weld::Button* SalInstanceDialog::get_widget_for_response(int nResponse)
+{
+PushButton* pButton = 
dynamic_cast(m_xDialog->get_widget_for_response(nResponse));
+return pButton ? new SalInstanceButton(pButton, false) : nullptr;
+}
+
 class SalInstanceRadioButton : public SalInstanceButton, public virtual 
weld::RadioButton
 {
 private:
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 36d77298d767..a5450b582870 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -1355,6 +1355,42 @@ void Dialog::add_button(PushButton* pButton, int 
response, bool bTransferOwnersh
 }
 }
 
+vcl::Window* Dialog::get_widget_for_response(int response)
+{
+//copy explicit responses
+std::map, short> aResponses(mpDialogImpl->maResponses);
+
+//add implicit responses
+for (vcl::Window* pChild = 
mpActionArea->GetWindow(GetWindowType::FirstChild); pChild;
+ pChild = pChild->GetWindow(GetWindowType::Next))
+{
+if (aResponses.find(pChild) != aResponses.end())
+continue;
+switch (pChild->GetType())
+{
+case WindowType::OKBUTTON:
+aResponses[pChild] = RET_OK;
+break;
+case WindowType::CANCELBUTTON:
+aResponses[pChild] = RET_CANCEL;
+break;
+case WindowType::HELPBUTTON:
+aResponses[pChild] = RET_HELP;
+break;
+default:
+break;
+}
+}
+
+for (auto& a : aResponses)
+{
+if (a.second == response)
+   return a.first;
+}
+
+return nullptr;
+}
+
 void Dialog::set_default_response(int response)
 {
 //copy explicit responses
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 49581bb180e8..1c635bfec584 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -1647,6 +1647,8 @@ public:
 gtk_dialog_set_default_response(m_pDialog, VclToGtk(nResponse));
 }
 
+virtual weld::Button* get_widget_for_response(int nResponse) override;
+
 virtual ~GtkInstanceDialog() override
 {
 g_signal_handler_disconnect(m_pDialog, m_nCloseSignalId);
@@ -1857,6 +1859,14 @@ public:
 }
 };
 
+weld::Button* GtkInstanceDialog::get_widget_for_response(int nResponse)
+{
+GtkButton* pButton = 
GTK_BUTTON(gtk_dialog_get_widget_for_response(m_pDialog, nResponse));
+if (!pButton)
+return nullptr;
+return new GtkInstanceButton(pButton, false);
+}
+
 class GtkInstanceToggleButton : public GtkInstanceButton, public

Minutes from the design meeting 2018/Mar/21

2018-03-21 Thread Heiko Tietze
Present: Stuart, Andreas, Heiko

Tickets

 * Use character style for auto-format like *bold*
   + https://bugs.documentfoundation.org/show_bug.cgi?id=115418
   + unclear use case and benefit (Heiko)
   + AutoCorrect options for markup strikeout and italic are added commit 
(Tiago Santos)
   + we would have to add default character styles for underline and strikeout 
first (Stuart)
   + Advantage of character style on export and we have a pedagogic mission
   + Drawback when user reconfigure the inbuilt styles; we do not have control 
over the actual markup correction (Heiko)
   + implement option to either have character style or direct formatting 
(Stuart)
 + strongly opposing to this option (Heiko)
   => WONTFIX

 * Improve wording of "Skip empty cells" 
   + https://bugs.documentfoundation.org/show_bug.cgi?id=116448
   + Example: source with 1,_,2 and target _,a,_ copy source and paste special 
over target with/wo skip
   + Options: "Skip empty source cells", "Don't override with empty cells" 
   => no further opinion so lets keep the original text and add a tooltip
  "If enabled, blank cells in source will not override the target."

 * Remove functions "3 seconds in Insert/Delete mode" (alt+insert, alt+delete 
in Writer > Tables)
   + https://bugs.documentfoundation.org/show_bug.cgi?id=116452
   + 
https://help.libreoffice.org/Writer/Shortcut_Keys_for_Writer#Shortcut_Keys_for_Tables_in_LibreOffice_Writer
   + a time slot is a bad workflow; better repeat last command, make function 
sticky (like clone formatting), etc. (Heiko)
   + original summary needs to get adjusted; we have to decide one by one about 
hard-coded key combinations (Stuart)
   + no easter egg hunt
   => no disagreement, so let's go, blessing from the ESC assumed

 * Remove tooltips from Writer tables
  + https://bugs.documentfoundation.org/show_bug.cgi?id=116297
  + How about a longer timeout for tooltips to appear (say, 4 seconds)? (Adolfo)
+ don't mess up with timers; should all be defined by the system but isn't 
actually (Heiko)
  + Transparency doesn't work (Csongor on BZ)
  + we should keep the tooltips because of accessibility (Stuart)
  => provide an expert option to not show tooltips on tables

 * Default icon set on Windows (or on for all builds?)
   + Windows builds better served moving them off of Tango/Galaxy legacy 
(Stuart)
   + https://bugs.documentfoundation.org/show_bug.cgi?id=90194 (Tango > Colibre)
   + https://bugs.documentfoundation.org/show_bug.cgi?id=115867 (Colibre)
 + planning variants in different colors but as extensions (Andreas)
   + ask the community and ship only one icon theme (Heiko)
 + reasons for one artwork only (icon theme, font, notebookbar etc.)
   # intransparent development without any user request and no clear 
requirement
   # removal becomes controversial with time
   # maintanence trouble
   # size of binaries
 + and deliver icon themes via extension? Not a fan... (Stuart)
 + aim for system/theme mimicry (Andreas)
   + In exchange for the new theme, file an easy hack to kill off Crystal 
(Adolfo)
 + we have in master Breeze, Breeze Dark, High Contrast, Sifr Dark, Tango, 
Elementary, 
   Colibre, Sifr, Galaxy (R.I.P. Crystal since 4.x?)
   => no agreement for one theme only
   => 1a. backport to 6.0.x and optionally 1b. make Colibre the default for 
Windows for 6.0
  (do a big announcement with marketing)
  2. make Colibre the fallback for 6.1 and flag Crystal obsolete or move it 
directly into an extension
  3. include in LOOL
   => to be discussed: the future of Tango (see 90194)






signature.asc
Description: OpenPGP digital signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2018-03-21 Thread Laurent BP
 extras/source/templates/presnt/BrightBlue/content.xml |3 ---
 extras/source/templates/presnt/BrightBlue/styles.xml  |   13 +
 extras/source/templates/presnt/DNA/content.xml|7 +--
 extras/source/templates/presnt/DNA/styles.xml |   15 +--
 extras/source/templates/presnt/Progress/content.xml   |4 +---
 extras/source/templates/presnt/Progress/styles.xml|   10 --
 6 files changed, 16 insertions(+), 36 deletions(-)

New commits:
commit 625f341d4c1e7e1043702687a55a972f55cb8ebb
Author: Laurent BP 
Date:   Sat Mar 17 16:14:18 2018 +0100

tdf#114749 Replace fonts in templates

Replace Arial with Liberation Sans
Replace Times New Roman with Liberation Serif (except if does not make 
sense)
Replace Roboto Bk with Liberation Sans
Reduce number of fonts declared

Change-Id: I967818dd6079d43c9b0616541c6c7a7ddac13886
Reviewed-on: https://gerrit.libreoffice.org/51464
Tested-by: Jenkins 
Reviewed-by: Yousuf Philips 
Reviewed-by: Khaled Hosny 

diff --git a/extras/source/templates/presnt/BrightBlue/content.xml 
b/extras/source/templates/presnt/BrightBlue/content.xml
index 0854db4879fd..780684ee38db 100644
--- a/extras/source/templates/presnt/BrightBlue/content.xml
+++ b/extras/source/templates/presnt/BrightBlue/content.xml
@@ -2,11 +2,8 @@
 http://www.w3.org/1999/xlink"; 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" x
 mlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:ooo="http://openoffice.org/2004/office"; 
xmlns:ooow="http://openoffice.org/2004/writer"; 
xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:xforms="http://www.w3.org/2002/xforms"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:smil="urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0" 
xmlns:anim="urn:oasis:names:tc:opendocument:xmlns:animation:1.0" 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#"; 
xmlns:officeooo="http://openoffice.org/2009/office"; 
xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 xmlns:loext="urn:org:documentfoundation:
 names:experimental:office:xmlns:loext:1.0" 
xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0"
 xmlns:css3t="http://www.w3.org/TR/css3-text/"; office:version="1.2">
   
   
-
 
-
 
-
   
   
 
diff --git a/extras/source/templates/presnt/BrightBlue/styles.xml 
b/extras/source/templates/presnt/BrightBlue/styles.xml
index 869415a90f01..ff5606eb9a96 100644
--- a/extras/source/templates/presnt/BrightBlue/styles.xml
+++ b/extras/source/templates/presnt/BrightBlue/styles.xml
@@ -1,11 +1,8 @@
 
 http://www.w3.org/1999/xlink"; 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xm
 lns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:ooo="http://openoffice.org/2004/office"; 
xmlns:ooow="http://openoffice.org/2004/writer"; 
xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:smil="urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0" 
xmlns:anim="urn:oasis:names:tc:opendocument:xmlns:animation:1.0" 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#"; 
xmlns:officeooo="http://openoffice.org/2009/office"; 
xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:calcext="urn:org:documentfoundation:names:e

Libre Office Open Source Project for GSoC

2018-03-21 Thread Fernando Benavides
To whom it may concern

I am Fernando Benavides a Computer Systems Engineering student at
Tecnológico de Monterrey campus Guadalajara.


I am very exited on  the fact that I can help to improve a free software
where everybody can do daily documentation tasks. I would like to make my
proposal on the LibreOffice Online Admin idea. For that reason I asking for
more information about this project.

Sincerely,

Fernando Benavides
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: helpcontent2

2018-03-21 Thread Olivier Hallot
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 81f48a56fef3c467f34e3cd6cc8347a29675cddc
Author: Olivier Hallot 
Date:   Tue Mar 20 19:38:21 2018 -0300

Updated core
Project: help  4a1008b6ee7043031e9b050adcf836c2f0c88a47

Deploy videos in New Help (WIP)

Add YouTube videos in New help.
add makefile
NOTE:  is not rendered in old help.
NOTE2: Removed online objects from offline help

Change-Id: I829fe1858002a454417d36d0651fe49097e008d4
Reviewed-on: https://gerrit.libreoffice.org/51679
Reviewed-by: Olivier Hallot 
Tested-by: Olivier Hallot 

diff --git a/helpcontent2 b/helpcontent2
index bd71cddd5c34..4a1008b6ee70 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit bd71cddd5c343dc894e78bb9809acb94ca1db337
+Subproject commit 4a1008b6ee7043031e9b050adcf836c2f0c88a47
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: AllLangHelp_shared.mk help3xsl/default.css help3xsl/online_transform.xsl source/text

2018-03-21 Thread Olivier Hallot
 AllLangHelp_shared.mk   |1 
 help3xsl/default.css|6 
 help3xsl/online_transform.xsl   |   48 ++--
 source/text/scalc/main.xhp  |1 
 source/text/sdraw/main.xhp  |5 ++-
 source/text/shared/06/youtubevideos.xhp |   23 +++
 source/text/simpress/main.xhp   |3 +-
 source/text/smath/main.xhp  |1 
 source/text/swriter/main.xhp|3 +-
 9 files changed, 66 insertions(+), 25 deletions(-)

New commits:
commit 4a1008b6ee7043031e9b050adcf836c2f0c88a47
Author: Olivier Hallot 
Date:   Tue Mar 20 19:38:21 2018 -0300

Deploy videos in New Help (WIP)

Add YouTube videos in New help.
add makefile
NOTE:  is not rendered in old help.
NOTE2: Removed online objects from offline help

Change-Id: I829fe1858002a454417d36d0651fe49097e008d4
Reviewed-on: https://gerrit.libreoffice.org/51679
Reviewed-by: Olivier Hallot 
Tested-by: Olivier Hallot 

diff --git a/AllLangHelp_shared.mk b/AllLangHelp_shared.mk
index bf76d916b..dabc98dbe 100644
--- a/AllLangHelp_shared.mk
+++ b/AllLangHelp_shared.mk
@@ -513,6 +513,7 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,shared,\
 helpcontent2/source/text/shared/05/0150 \
 helpcontent2/source/text/shared/05/0160 \
 helpcontent2/source/text/shared/05/err_html \
+helpcontent2/source/text/shared/06/youtubevideos \
 helpcontent2/source/text/shared/07/0900 \
 helpcontent2/source/text/shared/3dsettings_toolbar \
 helpcontent2/source/text/shared/autokorr/0100 \
diff --git a/help3xsl/default.css b/help3xsl/default.css
index bf5bac86f..1ae99162b 100644
--- a/help3xsl/default.css
+++ b/help3xsl/default.css
@@ -255,6 +255,12 @@ h6 {
 .mediabutton {
 background-color: cyan;
 }
+.mediadiv{
+padding-bottom:5%;
+height:0;
+display:inline-block;
+border:none;
+}
 .tintro {
 color: white;
 background-color: green;
diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl
index 0e3a64950..467f093a9 100644
--- a/help3xsl/online_transform.xsl
+++ b/help3xsl/online_transform.xsl
@@ -571,7 +571,7 @@
 
 
 
-
+
 
 
 
@@ -1071,32 +1071,38 @@
 
 
 
-  
-   
-  
-  Object: 
-  
-  
+
+
+
+
+
 
-  
-  
+
+
 
-  
-  
-
-  
-
-  
+
+
+
+
+
+
+
+
 
-
-  
-
-  
+
+
+
+
+
+
+
+
+
 
 
-   
+
 
-  
+
 
 
 
diff --git a/source/text/scalc/main.xhp b/source/text/scalc/main.xhp
index eda9ccda3..c84f614d0 100644
--- a/source/text/scalc/main.xhp
+++ b/source/text/scalc/main.xhp
@@ -31,6 +31,7 @@
 
 
 Welcome to the $[officename] Calc Help
+
 How to 
Work With $[officename] Calc
 
 
diff --git a/source/text/sdraw/main.xhp b/source/text/sdraw/main.xhp
index 7405e92e8..0606d8235 100644
--- a/source/text/sdraw/main.xhp
+++ b/source/text/sdraw/main.xhp
@@ -30,9 +30,10 @@
 
 
 
-  
-  
+
+
   Welcome to the $[officename] Draw 
Help
+  
   How 
to Work With $[officename] Draw
   
   
diff --git a/source/text/shared/06/youtubevideos.xhp 
b/source/text/shared/06/youtubevideos.xhp
new file mode 100644
index 0..4418e9566
--- /dev/null
+++ b/source/text/shared/06/youtubevideos.xhp
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+YouTube Videos
+/text/shared/06/youtubevideos.xhp
+
+
+
+
+https://www.youtube-nocookie.com/embed/3KC0ZdcA6s8?rel=0"; 
id="vid_id61521568603544" type="video/youtube" width="560" height="315" />
+
+
+
diff --git a/source/text/simpress/main.xhp 
b/source/text/simpress/main.xhp
index ba61543b8..62ccefd7b 100644
--- a/source/text/simpress/main.xhp
+++ b/source/text/simpress/main.xhp
@@ -18,7 +18,7 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  -->
-   
+
 
 
 
@@ -33,6 +33,7 @@
 
 
 Welcome 
to the $[officename] Impress Help
+
 How to 
Work With $[officename] Impress
 
 
diff --git a/source/text/smath/main.xhp b/source/text/smath/main.xhp
index 621fdcb8d..1d5b93968 100644
--- a/source/text/smath/main.xhp
+++ b/source/text/smath/main.xhp
@@ -30,6 +30,7 @@
 
 
 Welcome 
to the $[officename] Math Help
+
 How to 
Work With $[officename] Math
 
 
diff --git a/source/text/swriter/main.xhp b/source/text/swriter/main.xhp
index d5f21323c..2208f6172 100644
--- a/source/text/swriter/main.xhp
+++ b/source/text/swriter/main.xhp
@@ -18,7 +18,7 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http:/

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

2018-03-21 Thread Khaled Hosny
 vcl/inc/sallayout.hxx |5 
 vcl/qa/cppunit/pdfexport/data/tdf115117-1.odt |binary
 vcl/qa/cppunit/pdfexport/data/tdf115117-2.odt |binary
 vcl/qa/cppunit/pdfexport/pdfexport.cxx|  217 ++
 vcl/source/gdi/CommonSalLayout.cxx|   45 +
 vcl/source/gdi/pdfwriter_impl.cxx |   48 +
 6 files changed, 277 insertions(+), 38 deletions(-)

New commits:
commit b94a66ebc8db6c5ca9c7dcfdfbb06b49deae4939
Author: Khaled Hosny 
Date:   Wed Mar 21 16:54:10 2018 +0200

tdf#115117: Fix PDF ToUnicode CMAP for ligatures

Move the glyph to character(s) mapping to CommonSalLayout where we have
enough information to do this properly. This correctly handles ligatures
at end of run that wasn’t handled before, and also fixes a bug in the
PDF writer code when there is more than one ligature in the run (it
forgot to clear aCodeUnitsPerGlyph vector after each iteration). Also
drop the “temporary” fix for rotated glyph from 2009 that does not seem
to be needed now (the document from that bug exports correctly after this
change).

Change-Id: I5b5b1f4470bbd0ef05cbbc86dfa29d2ff51249ea
Reviewed-on: https://gerrit.libreoffice.org/51617
Tested-by: Jenkins 
Reviewed-by: Miklos Vajna 

diff --git a/vcl/inc/sallayout.hxx b/vcl/inc/sallayout.hxx
index b1037bc684ef..962f0f6905ac 100644
--- a/vcl/inc/sallayout.hxx
+++ b/vcl/inc/sallayout.hxx
@@ -255,6 +255,7 @@ struct GlyphItem
 {
 int mnFlags;
 int mnCharPos;  // index in string
+int mnCharCount;// number of characters making up this glyph
 
 int mnOrigWidth;// original glyph width
 int mnNewWidth; // width after adjustments
@@ -270,6 +271,7 @@ public:
 long nFlags, int nOrigWidth )
 :   mnFlags(nFlags)
 ,   mnCharPos(nCharPos)
+,   mnCharCount(1)
 ,   mnOrigWidth(nOrigWidth)
 ,   mnNewWidth(nOrigWidth)
 ,   mnXOffset(0)
@@ -278,10 +280,11 @@ public:
 ,   mnFallbackLevel(0)
 { }
 
-GlyphItem( int nCharPos, sal_GlyphId aGlyphId, const Point& 
rLinearPos,
+GlyphItem(int nCharPos, int nCharCount, sal_GlyphId aGlyphId, 
const Point& rLinearPos,
 long nFlags, int nOrigWidth, int nXOffset )
 :   mnFlags(nFlags)
 ,   mnCharPos(nCharPos)
+,   mnCharCount(nCharCount)
 ,   mnOrigWidth(nOrigWidth)
 ,   mnNewWidth(nOrigWidth)
 ,   mnXOffset(nXOffset)
diff --git a/vcl/qa/cppunit/pdfexport/data/tdf115117-1.odt 
b/vcl/qa/cppunit/pdfexport/data/tdf115117-1.odt
new file mode 100644
index ..63fe82946ef1
Binary files /dev/null and b/vcl/qa/cppunit/pdfexport/data/tdf115117-1.odt 
differ
diff --git a/vcl/qa/cppunit/pdfexport/data/tdf115117-2.odt 
b/vcl/qa/cppunit/pdfexport/data/tdf115117-2.odt
new file mode 100644
index ..c1e1f6d4392c
Binary files /dev/null and b/vcl/qa/cppunit/pdfexport/data/tdf115117-2.odt 
differ
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 9ae6e19be328..fc46f22fec44 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -8,6 +8,7 @@
  */
 
 #include 
+#include 
 
 #include 
 #include 
@@ -25,6 +26,7 @@
 #include 
 #if HAVE_FEATURE_PDFIUM
 #include 
+#include 
 #include 
 #endif
 
@@ -67,6 +69,16 @@ public:
 void testTdf99680();
 void testTdf99680_2();
 void testTdf108963();
+#if !TEST_FONTS_MISSING
+/// Test writing ToUnicode CMAP for LTR ligatures.
+void testTdf115117_1();
+/// Text extracting LTR text with ligatures.
+void testTdf115117_1a();
+/// Test writing ToUnicode CMAP for RTL ligatures.
+void testTdf115117_2();
+/// Text extracting RTL text with ligatures.
+void testTdf115117_2a();
+#endif
 #endif
 
 CPPUNIT_TEST_SUITE(PdfExportTest);
@@ -85,6 +97,12 @@ public:
 CPPUNIT_TEST(testTdf99680);
 CPPUNIT_TEST(testTdf99680_2);
 CPPUNIT_TEST(testTdf108963);
+#if !TEST_FONTS_MISSING
+CPPUNIT_TEST(testTdf115117_1);
+CPPUNIT_TEST(testTdf115117_1a);
+CPPUNIT_TEST(testTdf115117_2);
+CPPUNIT_TEST(testTdf115117_2a);
+#endif
 #endif
 CPPUNIT_TEST_SUITE_END();
 };
@@ -760,6 +778,205 @@ void PdfExportTest::testTdf108963()
 
 CPPUNIT_ASSERT_EQUAL(1, nYellowPathCount);
 }
+
+#if !TEST_FONTS_MISSING
+// This requires Carlito font, if it is missing the test will most likely
+// fail.
+void PdfExportTest::testTdf115117_1()
+{
+vcl::filter::PDFDocument aDocument;
+load("tdf115117-1.odt", aDocument);
+
+vcl::filter::PDFObjectElement* pToUnicode = nullptr;
+
+// Get access to ToUnicode of the first font
+for (const auto& aElement : aDocument.GetElements())
+{
+auto pObject = 
dynamic_cast(aElement.get());
+if (!pObject)
+continue;
+

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

2018-03-21 Thread Stephan Bergmann
 filter/source/msfilter/escherex.cxx |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit c75705b2306d3fd41e71eb4613773b62bdaa9ca5
Author: Stephan Bergmann 
Date:   Wed Mar 21 18:01:50 2018 +0100

Fix lifetime of referenced-by-reference EnhancedCustomShape2d

...that is created as argument to
EnhancedCustomShape::FunctionParser::parseFunction (and referenced from data
reachable from aExpressNode), but still referenced during following
aExpressNode->fillNode call.  Reintroduce the aCustoShape2d variable that 
had
been removed with 86c4672f4600daf19238ef25377406f445d9453a "OperationSmiley:
Secured quite some places using CustomShape", causing the regression that in
UBSan builds e.g. CppunitTest_sc_subsequent_export_test would fail with

> /svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx:261:57: 
runtime error: member call on address 0x2b1295491180 which does not point to an 
object of type 'EnhancedCustomShape2d'
> 0x2b1295491180: note: object is of type 'SfxItemSet'
>  1a 04 00 01  10 99 42 cb 12 2b 00 00  10 2d 8f 00 40 60 00 00  00 00 00 
00 00 00 00 00  00 00 00 00
>   ^~~
>   vptr for 'SfxItemSet'
> #0 0x2b131efeb12d in (anonymous 
namespace)::EnumValueExpression::fillNode(std::__debug::vector >&, 
EnhancedCustomShape::ExpressionNode*, unsigned int) 
/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx:261:57
> #1 0x2b131f01f061 in (anonymous 
namespace)::BinaryFunctionExpression::fillNode(std::__debug::vector >&, 
EnhancedCustomShape::ExpressionNode*, unsigned int) 
/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx:632:40
> #2 0x2b12e0915a5c in 
ConvertEnhancedCustomShapeEquation(SdrObjCustomShape const&, 
std::__debug::vector >&, std::__debug::vector >&) /filter/source/msfilter/escherex.cxx:2426:62
[...]

when accessing the already-dead EnhancedCustomShape2d object.

Change-Id: I8f3e598f81e8e01e2505483437025ddd4cee2ec9

diff --git a/filter/source/msfilter/escherex.cxx 
b/filter/source/msfilter/escherex.cxx
index 57b18c443f15..0eb9efe66e86 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -2416,12 +2416,13 @@ void ConvertEnhancedCustomShapeEquation(
 sal_Int32 i;
 for ( i = 0; i < nEquationSourceCount; i++ )
 {
+EnhancedCustomShape2d aCustoShape2d(
+const_cast< SdrObjCustomShape& >(rSdrObjCustomShape));
 try
 {
 std::shared_ptr< EnhancedCustomShape::ExpressionNode > 
aExpressNode(
 EnhancedCustomShape::FunctionParser::parseFunction(
-sEquationSource[ i ],
-const_cast< SdrObjCustomShape& >(rSdrObjCustomShape)));
+sEquationSource[ i ], aCustoShape2d));
 drawing::EnhancedCustomShapeParameter aPara( 
aExpressNode->fillNode( rEquations, nullptr, 0 ) );
 if ( aPara.Type != 
drawing::EnhancedCustomShapeParameterType::EQUATION )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: officecfg/registry sc/inc sc/source sc/uiconfig

2018-03-21 Thread Szymon Kłos
 officecfg/registry/schema/org/openoffice/Office/Calc.xcs |   32 +++
 sc/inc/viewopti.hxx  |   12 +
 sc/source/core/tool/viewopti.cxx |   39 
 sc/source/ui/inc/tpview.hxx  |5 
 sc/source/ui/optdlg/tpview.cxx   |   31 +++
 sc/source/ui/view/output.cxx |8 
 sc/uiconfig/scalc/ui/tpviewpage.ui   |  140 ++-
 7 files changed, 260 insertions(+), 7 deletions(-)

New commits:
commit fb29b8262488d045a926504725669a362bacb5bb
Author: Szymon Kłos 
Date:   Tue Mar 20 16:40:35 2018 +0100

tdf#116241 Customizing value highlighting colors

Change-Id: I5d77e6207d1e29326282d7184c9348e59292977a
Reviewed-on: https://gerrit.libreoffice.org/51653
Tested-by: Jenkins 
Reviewed-by: Szymon Kłos 

diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
index 18b3612259e6..2fdd0caccd64 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
@@ -262,6 +262,38 @@
   
 Contains settings that affect the window layout.
   
+  
+
+  Contains settings that control highlighting.
+
+
+  
+  
+  
+Specifies the color of highlighted values.
+Value Color
+  
+  255
+
+
+  
+  
+  
+Specifies the color of highlighted formulas.
+Formula Color
+  
+  32768
+
+
+  
+  
+  
+Specifies the color of the highlighted text.
+Text Color
+  
+  0
+
+  
   
 
   Contains settings that control visual aids.
diff --git a/sc/inc/viewopti.hxx b/sc/inc/viewopti.hxx
index 8bc3d380b28a..965d1ac73b69 100644
--- a/sc/inc/viewopti.hxx
+++ b/sc/inc/viewopti.hxx
@@ -94,6 +94,15 @@ public:
 voidSetGridColor( const Color& rCol, const OUString& 
rName ) { aGridCol = rCol; aGridColName = rName;}
 Color const &   GetGridColor( OUString* pStrName = nullptr ) const;
 
+voidSetValueColor( const Color& rCol ) { aValueCol = 
rCol; }
+Color const &   GetValueColor() const { return aValueCol; }
+
+voidSetFormulaColor(const Color& rCol) { aFormulaCol = 
rCol; }
+Color const &   GetFormulaColor() const { return aFormulaCol; }
+
+voidSetTextColor(const Color& rCol) { aTextCol = rCol; 
}
+Color const &   GetTextColor() const { return aTextCol; }
+
 const ScGridOptions&GetGridOptions() const  { 
return aGridOpt; }
 voidSetGridOptions( const ScGridOptions& rNew ) { 
aGridOpt = rNew; }
 SvxGridItem*CreateGridItem() const;
@@ -108,6 +117,9 @@ private:
 Color   aGridCol;
 OUStringaGridColName;
 ScGridOptions   aGridOpt;
+Color   aValueCol;
+Color   aFormulaCol;
+Color   aTextCol;
 };
 
 // Item for the options dialog - View
diff --git a/sc/source/core/tool/viewopti.cxx b/sc/source/core/tool/viewopti.cxx
index d882e82e6fd2..eef9125424bb 100644
--- a/sc/source/core/tool/viewopti.cxx
+++ b/sc/source/core/tool/viewopti.cxx
@@ -132,6 +132,10 @@ void ScViewOptions::SetDefaults()
 aGridCol = SC_STD_GRIDCOLOR;
 aGridColName = ScGlobal::GetRscString( STR_GRIDCOLOR );
 
+aValueCol = COL_LIGHTBLUE;
+aTextCol = COL_BLACK;
+aFormulaCol = COL_GREEN;
+
 aGridOpt.SetDefaults();
 }
 
@@ -153,6 +157,9 @@ ScViewOptions& ScViewOptions::operator=( const 
ScViewOptions& rCpy )
 aGridCol= rCpy.aGridCol;
 aGridColName= rCpy.aGridColName;
 aGridOpt= rCpy.aGridOpt;
+aValueCol   = rCpy.aValueCol;
+aTextCol= rCpy.aTextCol;
+aFormulaCol = rCpy.aFormulaCol;
 
 return *this;
 }
@@ -168,6 +175,9 @@ bool ScViewOptions::operator==( const ScViewOptions& rOpt ) 
const
 bEqual = bEqual && (aGridCol   == rOpt.aGridCol);
 bEqual = bEqual && (aGridColName   == rOpt.aGridColName);
 bEqual = bEqual && (aGridOpt   == rOpt.aGridOpt);
+bEqual = bEqual && (aValueCol  == rOpt.aValueCol);
+bEqual = bEqual && (aTextCol   == rOpt.aTextCol);
+bEqual = bEqual && (aFormulaCol== rOpt.aFormulaCol);
 
 return bEqual;
 }
@@ -230,6 +240,9 @@ SfxPoolItem* ScTpViewItem::Clone( SfxItemPool * ) const
 #define SCLAYOUTOPT_SHEETTAB7
 #define SCLAYOUTOPT_OUTLINE 8
 #define SCLAYOUTOPT_GRID_ONCOLOR9
+#define SCLAYOUTOPT_VALUE_COLOR10
+#define SCLAYOUTOPT_FORMULA_COLOR  11
+#define SCLAYOUTOPT_TEXT_COLOR 12
 
 #define CFGPATH_DISPLAY "Office.Calc/Content/Display"
 

Re: Seeking a guidance for proposal

2018-03-21 Thread Muhammet Kara

Hi nisargmehta,

This might give you an idea: 
https://wiki.documentfoundation.org/Development/GSoC#Proposals


And I urge you to hurry in submitting your non-trivial easyhack, and 
preparing your proposal because the application period ends soon.


Cheers,
Muhammet

On 03/21/2018 07:28 PM, Nisarg Mehta wrote:
Hello libreoffice I am applying for the Google summer of code first 
time I am seeking a guidance for liber office project  proposal I want 
to know that what should be in a proposal and what should not be and I 
am a great fan of liber office and I want to give great experience to 
user of liber office. I am requesting you kindly please gide me.


nisargmehta


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


--
*Muhammet Kara *
LibreOffice Certified Developer 



*TÜBİTAK ULAKBİM*
*Pardus Projesi *
Mustafa Kemal Mahallesi Dumlupınar Bulvarı
(Eskişehir Yolu 7. km) 2151. Cadde No:154
06510 Çankaya/ANKARA
T +90 312 298 9293
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Seeking a guidance for proposal

2018-03-21 Thread Nisarg Mehta
Hello libreoffice I am applying for the Google summer of code first time I
am seeking a guidance for liber office project  proposal I want to know
that what should be in a proposal and what should not be and I am a great
fan of liber office and I want to give great experience to user of liber
office. I am requesting you kindly please gide me.

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


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - formula/source

2018-03-21 Thread Eike Rathke
 formula/source/ui/dlg/formula.cxx |   29 +++--
 1 file changed, 19 insertions(+), 10 deletions(-)

New commits:
commit e722779351bb83af4ca368c143ab9561f1864bcf
Author: Eike Rathke 
Date:   Tue Mar 20 14:26:35 2018 +0100

Resolves: tdf#116468 do not check array/matrix context for reportdesign

It doesn't have any, and worse, there's no currently active OpCode
symbol map that could be used to create strings from tokens.

Regression from

commit bf1ffc64128f5b96d7c2fcc7adc81cbc25e232fd
Date:   Sun Jul 16 15:18:09 2017 +0200

FormulaDlg_Impl::UpdateValues: evaluate in force-array context if 
present

Change-Id: I77c2035fdd0926f67fcc85e7090f30485b4e312c
(cherry picked from commit 3a3a61bce913b564c7b7a98c56b55cbc11ea273a)
Reviewed-on: https://gerrit.libreoffice.org/51642
Tested-by: Jenkins 
Reviewed-by: Lionel Elie Mamane 

diff --git a/formula/source/ui/dlg/formula.cxx 
b/formula/source/ui/dlg/formula.cxx
index c98167ea54bc..d6e39b62341b 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -570,19 +570,28 @@ void FormulaDlg_Impl::UpdateValues( bool 
bForceRecalcStruct )
 // Only necessary if it's not a matrix formula anyway.
 if (!m_pBtnMatrix->IsChecked())
 {
-const sal_Int32 nPos = m_aFuncSel.Min();
-assert( 0 <= nPos && nPos < 
m_pHelper->getCurrentFormula().getLength());
-OUStringBuffer aBuf;
+/* TODO: we probably don't even need to ask a compiler instance if
+ * m_pBtnMatrix is hidden. */
 std::unique_ptr pCompiler( m_pHelper->createCompiler( 
*m_pTokenArray.get()));
-const FormulaToken* pToken = nullptr;
-for (pToken = m_pTokenArrayIterator->First(); pToken; pToken = 
m_pTokenArrayIterator->Next())
+// In the case of the reportdesign dialog there is no currently active
+// OpCode symbol mapping that could be used to create strings from
+// tokens, it's all dreaded API mapping. However, in that case there's
+// no array/matrix support anyway.
+if (pCompiler->GetCurrentOpCodeMap().get())
 {
-pCompiler->CreateStringFromToken( aBuf, pToken);
-if (nPos < aBuf.getLength())
-break;
+const sal_Int32 nPos = m_aFuncSel.Min();
+assert( 0 <= nPos && nPos < 
m_pHelper->getCurrentFormula().getLength());
+OUStringBuffer aBuf;
+const FormulaToken* pToken = nullptr;
+for (pToken = m_pTokenArrayIterator->First(); pToken; pToken = 
m_pTokenArrayIterator->Next())
+{
+pCompiler->CreateStringFromToken( aBuf, pToken);
+if (nPos < aBuf.getLength())
+break;
+}
+if (pToken && nPos < aBuf.getLength())
+bForceArray = pToken->IsInForceArray();
 }
-if (pToken && nPos < aBuf.getLength())
-bForceArray = pToken->IsInForceArray();
 }
 
 OUString aStrResult;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loleaflet/src

2018-03-21 Thread Pranav Kant
 loleaflet/src/control/Control.LokDialog.js |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 82ec19069290b05e7980b39ba8d7413802ae61ba
Author: Pranav Kant 
Date:   Tue Mar 20 15:08:59 2018 +0530

Don't bore the map while user is playing with the dialog

Change-Id: I2aa466ec66b71fc7d65218a200638de142e99eea

diff --git a/loleaflet/src/control/Control.LokDialog.js 
b/loleaflet/src/control/Control.LokDialog.js
index f8de108bf..15dea5e2b 100644
--- a/loleaflet/src/control/Control.LokDialog.js
+++ b/loleaflet/src/control/Control.LokDialog.js
@@ -236,8 +236,6 @@ L.Control.LokDialog = L.Control.extend({
dialogCanvas.height = height;
dialogCanvas.id = strDlgId + '-canvas';
 
-   L.DomEvent.on(dialogCanvas, 'contextmenu', 
L.DomEvent.preventDefault);
-
var that = this;
$(dialogContainer).dialog({
width: width,
@@ -266,6 +264,10 @@ L.Control.LokDialog = L.Control.extend({
this._createDialogCursor(strDlgId);
var dlgInput = this._createDialogInput(strDlgId);
 
+   L.DomEvent.on(dialogCanvas, 'contextmenu', 
L.DomEvent.preventDefault);
+   L.DomEvent.on(dialogCanvas, 'mousemove', function() {
+   this._map.lastActiveTime = Date.now();
+   }, this);
L.DomEvent.on(dialogCanvas, 'mousedown mouseup', function(e) {
var buttons = 0;
buttons |= e.button === map['mouse'].JSButtons.left ? 
map['mouse'].LOButtons.left : 0;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: bundled/include

2018-03-21 Thread Pranav Kant
 bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h |   11 +++
 1 file changed, 11 insertions(+)

New commits:
commit 8481689f93a1081c5a8d9e3ac8891d601049160d
Author: Pranav Kant 
Date:   Wed Mar 21 21:39:46 2018 +0530

update bundled headers - clipboard_changed

Change-Id: Idad3aef64acb01928f6f70010a0e9d7ed297aede

diff --git a/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h 
b/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h
index b90aa6279..020bbff90 100644
--- a/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h
+++ b/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h
@@ -568,6 +568,17 @@ typedef enum
  * - "close" - window is closed
  */
 LOK_CALLBACK_WINDOW = 36,
+
+/**
+ * Notification that the clipboard contents have changed.
+ * Typically fired in response to copying to clipboard.
+ *
+ * The payload currently is empty and it's up to the
+ * client to get the contents, if necessary. However,
+ * in the future the contents might be included for
+ * convenience.
+ */
+LOK_CALLBACK_CLIPBOARD_CHANGED = 37,
 }
 LibreOfficeKitCallbackType;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/test test/inc test/Library_subsequenttest.mk test/Library_test.mk test/source

2018-03-21 Thread Jens Carl
 test/Library_subsequenttest.mk  |5 +
 test/Library_test.mk|5 +
 test/inc/unoapi_property_testers.hxx|6 +++---
 test/source/sheet/spreadsheet.cxx   |2 +-
 test/source/unoapi_property_testers.cxx |2 +-
 5 files changed, 15 insertions(+), 5 deletions(-)

New commits:
commit fc3f43b6fe3df5e46ca869d5934d4c444881
Author: Jens Carl 
Date:   Wed Mar 21 05:12:54 2018 +

Move UNO API property testers header file

Move the header file form the global include path include/test to the
module-specific path test/inc.

Change-Id: I72c1f3b420bc387f4f5b9ab75f30f0e8462c1b75
Reviewed-on: https://gerrit.libreoffice.org/51682
Tested-by: Jenkins 
Reviewed-by: Jens Carl 

diff --git a/test/Library_subsequenttest.mk b/test/Library_subsequenttest.mk
index 1e8fdb134770..ce88ef80a817 100644
--- a/test/Library_subsequenttest.mk
+++ b/test/Library_subsequenttest.mk
@@ -9,6 +9,11 @@
 
 $(eval $(call gb_Library_Library,subsequenttest))
 
+$(eval $(call gb_Library_set_include,subsequenttest,\
+-I$(SRCDIR)/test/inc \
+$$(INCLUDE) \
+))
+
 $(eval $(call gb_Library_add_defs,subsequenttest,\
-DOOO_DLLIMPLEMENTATION_TEST \
 ))
diff --git a/test/Library_test.mk b/test/Library_test.mk
index 47d0ffbec381..553eb2a3f148 100644
--- a/test/Library_test.mk
+++ b/test/Library_test.mk
@@ -9,6 +9,11 @@
 
 $(eval $(call gb_Library_Library,test))
 
+$(eval $(call gb_Library_set_include,test,\
+-I$(SRCDIR)/test/inc \
+$$(INCLUDE) \
+))
+
 $(eval $(call gb_Library_add_defs,test,\
 -DOOO_DLLIMPLEMENTATION_TEST \
 ))
diff --git a/include/test/unoapi_property_testers.hxx 
b/test/inc/unoapi_property_testers.hxx
similarity index 93%
rename from include/test/unoapi_property_testers.hxx
rename to test/inc/unoapi_property_testers.hxx
index 369ab586d366..1449df16b719 100644
--- a/include/test/unoapi_property_testers.hxx
+++ b/test/inc/unoapi_property_testers.hxx
@@ -7,8 +7,8 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#ifndef INCLUDED_TEST_SHEET_UNOAPIPROPERTYHELPER_HXX
-#define INCLUDED_TEST_SHEET_UNOAPIPROPERTYHELPER_HXX
+#ifndef INCLUDED_TEST_INC_UNOAPIPROPERTYTESTERS_HXX
+#define INCLUDED_TEST_INC_UNOAPIPROPERTYTESTERS_HXX
 
 #include 
 #include 
@@ -56,6 +56,6 @@ void OOO_DLLPUBLIC_TEST
 testStringProperty(css::uno::Reference& xPropertySet,
const OUString& name, const OUString& rValue);
 }
-#endif // INCLUDED_TEST_SHEET_UNOAPIPROPERTYHELPER_HXX
+#endif // INCLUDED_TEST_INC_UNOAPIPROPERTYTESTERS_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/test/source/sheet/spreadsheet.cxx 
b/test/source/sheet/spreadsheet.cxx
index 6ff83c475e46..f63c3667deee 100644
--- a/test/source/sheet/spreadsheet.cxx
+++ b/test/source/sheet/spreadsheet.cxx
@@ -8,7 +8,7 @@
  */
 
 #include 
-#include 
+#include 
 
 #include 
 #include 
diff --git a/test/source/unoapi_property_testers.cxx 
b/test/source/unoapi_property_testers.cxx
index 08fde5ebd5d0..756321a7e317 100644
--- a/test/source/unoapi_property_testers.cxx
+++ b/test/source/unoapi_property_testers.cxx
@@ -7,7 +7,7 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#include 
+#include 
 
 #include 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - vcl/inc vcl/win

2018-03-21 Thread Jan-Marek Glogowski
 vcl/inc/win/saldata.hxx |2 +-
 vcl/inc/win/salframe.h  |4 ++--
 vcl/win/app/salinst.cxx |2 +-
 vcl/win/window/salframe.cxx |   17 -
 4 files changed, 8 insertions(+), 17 deletions(-)

New commits:
commit 8e870ea9b828166b89a5c3f6c4f060bde6082f26
Author: Jan-Marek Glogowski 
Date:   Wed Mar 14 20:05:50 2018 +0100

tdf#115420 fix DC usecount and drop wrong asserts

For DC initialization we check the thread ID to assign a normal
or cached DC to the corresponding WinSalGraphics variable.
The cached DC has a usage count, as there are some limits on
cached DCs count (DCX_CACHE).

But for the WinSalGraphics DC init and release the variable just
matters for the accounting, and generally which thread is doing
the calls: the non-main thread always has to relay them to the
main application thread.

Since we're releasing all WinSalGraphics in ~WinSalFrame and do
all release and re-init in ImplSetParentFrame, there is no way
to correspond the thread ID to the WinSalGraphics variable.

So this drops the wrong assertions based on the WinSalGraphics
variables and renames the GETDC message to GETCACHEDDC to make
usage of a cached DC (DCX_CACHE) more obvious.
As a consequence of the different release DC handling this also
fixes the accounting of the cached DCs, wich was broken in the
initial fix; commit c15ea73f960bbd3d2a4b0c43b467ac62eeba3505

Change-Id: I11ce52a1b4005f26567f92588437fa37bf227a2e
Reviewed-on: https://gerrit.libreoffice.org/51318
Tested-by: Jenkins 
Reviewed-by: Jan-Marek Glogowski 
(cherry picked from commit 8939cb9456ee76a848cc8089747f280751092cf8)
Reviewed-on: https://gerrit.libreoffice.org/51549
Reviewed-by: Michael Meeks 

diff --git a/vcl/inc/win/saldata.hxx b/vcl/inc/win/saldata.hxx
index 45c402363119..8f5a3b87b415 100644
--- a/vcl/inc/win/saldata.hxx
+++ b/vcl/inc/win/saldata.hxx
@@ -215,7 +215,7 @@ int ImplSalWICompareAscii( const wchar_t* pStr1, const 
char* pStr2 );
 // wParam == 0; lParam == pObject;
 #define SAL_MSG_DESTROYOBJECT   (WM_USER+117)
 // wParam == hWnd; lParam == 0; lResult == hDC
-#define SAL_MSG_GETDC   (WM_USER+120)
+#define SAL_MSG_GETCACHEDDC (WM_USER+120)
 // wParam == hWnd; lParam == 0
 #define SAL_MSG_RELEASEDC   (WM_USER+121)
 // wParam == newParentHwnd; lParam == oldHwnd; lResult == newhWnd
diff --git a/vcl/inc/win/salframe.h b/vcl/inc/win/salframe.h
index 77902a40034e..36e4a041c955 100644
--- a/vcl/inc/win/salframe.h
+++ b/vcl/inc/win/salframe.h
@@ -33,8 +33,8 @@ public:
 HWNDmhWnd;  // Window handle
 HCURSOR mhCursor;   // cursor handle
 HIMCmhDefIMEContext;// default IME-Context
-WinSalGraphics* mpLocalGraphics;// current local frame 
graphics
-WinSalGraphics* mpThreadGraphics;   // current frame graphics 
for other threads
+WinSalGraphics* mpLocalGraphics;// current main thread 
frame graphics
+WinSalGraphics* mpThreadGraphics;   // current frame graphics 
for other threads (DCX_CACHE)
 WinSalFrame*mpNextFrame;// pointer to next frame
 HMENU   mSelectedhMenu; // the menu where 
highlighting is currently going on
 HMENU   mLastActivatedhMenu;// the menu that was most 
recently opened
diff --git a/vcl/win/app/salinst.cxx b/vcl/win/app/salinst.cxx
index 5671361c987b..b13360f40b16 100644
--- a/vcl/win/app/salinst.cxx
+++ b/vcl/win/app/salinst.cxx
@@ -639,7 +639,7 @@ LRESULT CALLBACK SalComWndProc( HWND, UINT nMsg, WPARAM 
wParam, LPARAM lParam, b
 CASE_NOYIELDLOCK_RESULT( SAL_MSG_CREATEOBJECT, ImplSalCreateObject(
 GetSalData()->mpInstance, reinterpret_cast(lParam)) )
 CASE_NOYIELDLOCK( SAL_MSG_DESTROYOBJECT, delete 
reinterpret_cast(lParam) )
-CASE_NOYIELDLOCK_RESULT( SAL_MSG_GETDC, GetDCEx(
+CASE_NOYIELDLOCK_RESULT( SAL_MSG_GETCACHEDDC, GetDCEx(
 reinterpret_cast(wParam), nullptr, DCX_CACHE) )
 CASE_NOYIELDLOCK( SAL_MSG_RELEASEDC, ReleaseDC(
 reinterpret_cast(wParam), reinterpret_cast(lParam)) )
diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index dd0c4a521f74..f34c9d0936cc 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -924,17 +924,12 @@ bool WinSalFrame::ReleaseFrameGraphicsDC( WinSalGraphics* 
pGraphics )
 // we don't want to run the WinProc in the main thread directly
 // so we don't hit the mbNoYieldLock assert
 if ( !pSalData->mpInstance->IsMainThread() )
-{
-assert( pGraphics == mpThreadGraphics );
 SendMessageW( pSalData->mpInstance->mhComWnd, SAL_MSG_RELEASEDC,
 reinterpret_cast(mhWnd), reinterpret_cast(hDC) );
-pSalData->mnCacheDCInUse--;
-   

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

2018-03-21 Thread Caolán McNamara
 sw/source/core/frmedt/feshview.cxx |   11 ---
 1 file changed, 8 insertions(+), 3 deletions(-)

New commits:
commit 655d7340536ed2847d1da873b141d8776f791d12
Author: Caolán McNamara 
Date:   Wed Mar 21 14:08:49 2018 +

Resolves: tdf#116429 unwanted extra step in undo insert shape

Change-Id: I23065275baa60a09f2a3c15513e3f2b8160e2bf0
Reviewed-on: https://gerrit.libreoffice.org/51706
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/source/core/frmedt/feshview.cxx 
b/sw/source/core/frmedt/feshview.cxx
index abdecbf05016..c1aa0935a071 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -2002,6 +2002,14 @@ bool SwFEShell::ImpEndCreate()
 }
 else
 {
+if (rSdrObj.GetName().isEmpty())
+{
+bool bRestore = GetDoc()->GetIDocumentUndoRedo().DoesDrawUndo();
+GetDoc()->GetIDocumentUndoRedo().DoDrawUndo(false);
+rSdrObj.SetName(GetUniqueShapeName());
+GetDoc()->GetIDocumentUndoRedo().DoDrawUndo(bRestore);
+}
+
 Point aRelNullPt;
 if( OBJ_CAPTION == nIdent )
 aRelNullPt = static_cast(rSdrObj).GetTailPos();
@@ -2057,9 +2065,6 @@ bool SwFEShell::ImpEndCreate()
 pAnch = pTmp;
 }
 
-if (rSdrObj.GetName().isEmpty())
-rSdrObj.SetName(GetUniqueShapeName());
-
 pContact->ConnectToLayout();
 
 // mark object at frame the object is inserted at.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-03-21 Thread Caolán McNamara
 include/vcl/weld.hxx  |3 ++-
 vcl/source/app/salvtables.cxx |3 ++-
 vcl/unx/gtk3/gtk3gtkinst.cxx  |6 --
 3 files changed, 8 insertions(+), 4 deletions(-)

New commits:
commit 8d55371997dd1e98a602b397fa86f20481119047
Author: Caolán McNamara 
Date:   Wed Mar 21 11:01:31 2018 +

add optional helpid to add_button

Change-Id: I9606d0788c78397feb0840463991c5498e759b5a
Reviewed-on: https://gerrit.libreoffice.org/51703
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 1d0e3f390076..58b0ddd80284 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -135,7 +135,8 @@ private:
 public:
 virtual int run() = 0;
 virtual void response(int response) = 0;
-virtual void add_button(const OUString& rText, int response) = 0;
+virtual void add_button(const OUString& rText, int response, const 
OString& rHelpId = OString())
+= 0;
 virtual void set_default_response(int response) = 0;
 };
 
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 63db48d4a1de..52ff2baf67a7 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -468,11 +468,12 @@ public:
 m_xDialog->EndDialog(nResponse);
 }
 
-virtual void add_button(const OUString& rText, int nResponse) override
+virtual void add_button(const OUString& rText, int nResponse, const 
OString& rHelpId) override
 {
 VclButtonBox* pBox = m_xDialog->get_action_area();
 VclPtr xButton(VclPtr::Create(pBox, 
WB_CLIPCHILDREN|WB_CENTER|WB_VCENTER));
 xButton->SetText(rText);
+xButton->SetHelpId(rHelpId);
 xButton->Show();
 m_xDialog->add_button(xButton, nResponse, true);
 }
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 3c825d167061..49581bb180e8 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -1635,9 +1635,11 @@ public:
 gtk_dialog_response(m_pDialog, VclToGtk(nResponse));
 }
 
-virtual void add_button(const OUString& rText, int nResponse) override
+virtual void add_button(const OUString& rText, int nResponse, const 
OString& rHelpId) override
 {
-gtk_dialog_add_button(m_pDialog, MapToGtkAccelerator(rText).getStr(), 
VclToGtk(nResponse));
+GtkWidget* pWidget = gtk_dialog_add_button(m_pDialog, 
MapToGtkAccelerator(rText).getStr(), VclToGtk(nResponse));
+if (!rHelpId.isEmpty())
+::set_help_id(pWidget, rHelpId);
 }
 
 virtual void set_default_response(int nResponse) override
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-03-21 Thread Caolán McNamara
 include/vcl/weld.hxx |   15 +--
 1 file changed, 9 insertions(+), 6 deletions(-)

New commits:
commit 417d26291cd13c861e8f6262d0fb6afa026f015c
Author: Caolán McNamara 
Date:   Wed Mar 21 10:45:48 2018 +

move these down to base

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

diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 1da74234d50e..1d0e3f390076 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -588,11 +588,18 @@ class VCL_DLLPUBLIC DialogController
 {
 private:
 virtual Dialog* getDialog() = 0;
+const Dialog* getConstDialog() const
+{
+return const_cast(this)->getDialog();
+}
 
 public:
 short run() { return getDialog()->run(); }
 static bool runAsync(const std::shared_ptr& rController,
  const std::function&);
+void set_title(const OUString& rTitle) { getDialog()->set_title(rTitle); }
+void set_help_id(const OString& rHelpId) { 
getDialog()->set_help_id(rHelpId); }
+OString get_help_id() const { return getConstDialog()->get_help_id(); }
 virtual ~DialogController();
 };
 
@@ -608,9 +615,7 @@ protected:
 public:
 GenericDialogController(weld::Widget* pParent, const OUString& rUIFile,
 const OString& rDialogId);
-~GenericDialogController() override;
-void set_title(const OUString& rTitle) { m_xDialog->set_title(rTitle); }
-void set_help_id(const OString& rHelpId) { 
m_xDialog->set_help_id(rHelpId); }
+virtual ~GenericDialogController() override;
 };
 
 class VCL_DLLPUBLIC MessageDialogController : public DialogController
@@ -628,9 +633,7 @@ protected:
 public:
 MessageDialogController(weld::Widget* pParent, const OUString& rUIFile,
 const OString& rDialogId, const OString& 
rRelocateId = OString());
-~MessageDialogController() override;
-void set_title(const OUString& rTitle) { m_xDialog->set_title(rTitle); }
-void set_help_id(const OString& rHelpId) { 
m_xDialog->set_help_id(rHelpId); }
+virtual ~MessageDialogController() override;
 void set_primary_text(const OUString& rText) { 
m_xDialog->set_primary_text(rText); }
 OUString get_primary_text() const { return m_xDialog->get_primary_text(); }
 void set_default_response(int response) { 
m_xDialog->set_default_response(response); }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-03-21 Thread Caolán McNamara
 framework/source/inc/loadenv/loadenv.hxx |5 
 framework/source/loadenv/loadenv.cxx |   37 ---
 2 files changed, 39 insertions(+), 3 deletions(-)

New commits:
commit 754f6e2fe0d329e12e9e083d4fccc4086d9b4d04
Author: Caolán McNamara 
Date:   Wed Mar 21 13:14:51 2018 +

tdf#115683 there are other cases of dialogs before document load

Change-Id: I97ddbb528927fecb66072b42baa90272de2af39a
Reviewed-on: https://gerrit.libreoffice.org/51704
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/framework/source/inc/loadenv/loadenv.hxx 
b/framework/source/inc/loadenv/loadenv.hxx
index ca8999f889a9..90f9c7ac89f5 100644
--- a/framework/source/inc/loadenv/loadenv.hxx
+++ b/framework/source/inc/loadenv/loadenv.hxx
@@ -547,6 +547,11 @@ private:
  */
 void impl_jumpToMark(const css::uno::Reference< css::frame::XFrame >& 
xFrame,
  const css::util::URL&aURL 
 );
+
+/** @short  determine if this loader has an interactive dialog shown before
+loading the document.
+ */
+bool impl_filterHasInteractiveDialog() const;
 };
 
 } // namespace framework
diff --git a/framework/source/loadenv/loadenv.cxx 
b/framework/source/loadenv/loadenv.cxx
index c915f80827bb..381f2f287f0c 100644
--- a/framework/source/loadenv/loadenv.cxx
+++ b/framework/source/loadenv/loadenv.cxx
@@ -963,6 +963,38 @@ bool LoadEnv::impl_furtherDocsAllowed()
 return bAllowed;
 }
 
+bool LoadEnv::impl_filterHasInteractiveDialog() const
+{
+//show the frame now so it can be the parent for any message dialogs shown 
during import
+
+//unless (tdf#114648) an Interactive case such as the new database wizard
+if (m_aURL.Arguments == "Interactive")
+   return true;
+
+// unless (tdf#116277) its the labels/business cards slave frame
+if (m_aURL.Arguments.indexOf("slot=") != -1)
+return true;
+
+OUString sFilter = 
m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_FILTERNAME(),
 OUString());
+if (sFilter.isEmpty())
+return false;
+
+// unless (tdf#115683) the filter has a UIComponent
+OUString sUIComponent;
+css::uno::Reference 
xFilterCont(m_xContext->getServiceManager()->createInstanceWithContext(SERVICENAME_FILTERFACTORY,
 m_xContext),
+ 
css::uno::UNO_QUERY_THROW);
+try
+{
+::comphelper::SequenceAsHashMap 
lFilterProps(xFilterCont->getByName(sFilter));
+sUIComponent = lFilterProps.getUnpackedValueOrDefault("UIComponent", 
OUString());
+}
+catch(const css::container::NoSuchElementException&)
+{
+}
+
+return !sUIComponent.isEmpty();
+}
+
 bool LoadEnv::impl_loadContent()
 {
 // SAFE -> ---
@@ -1076,9 +1108,8 @@ bool LoadEnv::impl_loadContent()
 {"Parent", uno::Any(xWindow)}
 }));
 xHandler->initialize(aArguments);
-//show the frame now, unless (tdf#116277) its the labels/business 
cards slave frame
-//or (tdf#114648) an Interactive case such as the new database 
wizard
-if (m_aURL.Arguments != "Interactive" && 
m_aURL.Arguments.indexOf("slot=") == -1)
+//show the frame as early as possible to make it the parent of any 
message dialogs
+if (!impl_filterHasInteractiveDialog())
 impl_makeFrameWindowVisible(xWindow, false);
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: chart2/source dbaccess/source extensions/source filter/source include/svtools svtools/source svx/source

2018-03-21 Thread Caolán McNamara
 chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx  |8 -
 chart2/source/controller/inc/dlg_ChartType_UNO.hxx  |2 
 dbaccess/source/ext/macromigration/macromigrationwizard.cxx |8 -
 dbaccess/source/ext/macromigration/macromigrationwizard.hxx |2 
 dbaccess/source/ui/inc/unosqlmessage.hxx|4 
 dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx  |7 -
 dbaccess/source/ui/uno/DBTypeWizDlg.cxx |4 
 dbaccess/source/ui/uno/DBTypeWizDlg.hxx |4 
 dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx|6 -
 dbaccess/source/ui/uno/DBTypeWizDlgSetup.hxx|4 
 dbaccess/source/ui/uno/TableFilterDlg.cxx   |4 
 dbaccess/source/ui/uno/TableFilterDlg.hxx   |4 
 dbaccess/source/ui/uno/UserSettingsDlg.cxx  |4 
 dbaccess/source/ui/uno/UserSettingsDlg.hxx  |4 
 dbaccess/source/ui/uno/admindlg.cxx |4 
 dbaccess/source/ui/uno/admindlg.hxx |4 
 dbaccess/source/ui/uno/composerdialogs.cxx  |   18 ++-
 dbaccess/source/ui/uno/composerdialogs.hxx  |8 -
 dbaccess/source/ui/uno/copytablewizard.cxx  |8 -
 dbaccess/source/ui/uno/textconnectionsettings_uno.cxx   |6 -
 dbaccess/source/ui/uno/unoDirectSql.cxx |   11 +-
 dbaccess/source/ui/uno/unoDirectSql.hxx |2 
 dbaccess/source/ui/uno/unoadmin.cxx |4 
 dbaccess/source/ui/uno/unosqlmessage.cxx|6 -
 extensions/source/abpilot/unodialogabp.cxx  |6 -
 extensions/source/abpilot/unodialogabp.hxx  |2 
 extensions/source/dbpilots/unoautopilot.hxx |6 -
 extensions/source/propctrlr/MasterDetailLinkDialog.cxx  |7 -
 extensions/source/propctrlr/MasterDetailLinkDialog.hxx  |2 
 extensions/source/propctrlr/controlfontdialog.cxx   |   15 +--
 extensions/source/propctrlr/controlfontdialog.hxx   |4 
 extensions/source/propctrlr/pcrunodialogs.cxx   |   11 --
 extensions/source/propctrlr/pcrunodialogs.hxx   |4 
 filter/source/flash/swfdialog.cxx   |   10 +-
 filter/source/flash/swfdialog.hxx   |2 
 filter/source/pdf/pdfdialog.cxx |   12 +-
 filter/source/pdf/pdfdialog.hxx |2 
 filter/source/svg/svgdialog.cxx |   12 +-
 filter/source/svg/svgdialog.hxx |2 
 include/svtools/genericunodialog.hxx|   59 ++--
 svtools/source/uno/addrtempuno.cxx  |   12 +-
 svtools/source/uno/genericunodialog.cxx |   50 +-
 svtools/source/uno/wizard/unowizard.cxx |   44 
 svx/source/form/xfm_addcondition.cxx|   13 --
 svx/source/inc/xfm_addcondition.hxx |2 
 45 files changed, 228 insertions(+), 185 deletions(-)

New commits:
commit 12efe34abb984ac37abae59ccac83a4f86a27e77
Author: Caolán McNamara 
Date:   Wed Mar 21 10:33:23 2018 +

support both vcl and weld in genericunodialog for interim

Change-Id: Ife85dd7a4bd27260514b390ca3928152db0d688f
Reviewed-on: https://gerrit.libreoffice.org/51699
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx 
b/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx
index c0563986ea91..78497a0d8a1b 100644
--- a/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx
+++ b/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx
@@ -33,10 +33,10 @@ ChartTypeUnoDlg::~ChartTypeUnoDlg()
 {
 // we do this here cause the base class' call to destroyDialog won't reach 
us anymore: we're within an dtor,
 // so this virtual-method-call the base class does not work, we're already 
dead then...
-if (m_pDialog)
+if (m_aDialog)
 {
 ::osl::MutexGuard aGuard(m_aMutex);
-if (m_pDialog)
+if (m_aDialog)
 destroyDialog();
 }
 }
@@ -67,9 +67,9 @@ void ChartTypeUnoDlg::implInitialize(const uno::Any& _rValue)
 else
 ChartTypeUnoDlg_BASE::implInitialize(_rValue);
 }
-VclPtr ChartTypeUnoDlg::createDialog(vcl::Window* _pParent)
+svt::OGenericUnoDialog::Dialog ChartTypeUnoDlg::createDialog(vcl::Window* 
_pParent)
 {
-return VclPtr::Create( _pParent, m_xChartModel );
+return 
svt::OGenericUnoDialog::Dialog(VclPtr::Create(_pParent, 
m_xChartModel));
 }
 uno::Reference  SAL_CALL 
ChartTypeUnoDlg::getPropertySetInfo()
 {
diff --git a/chart2/source/controller/inc/dlg_ChartType_UNO.hxx 
b/chart2/source/controller/inc/dlg_ChartType_UNO.hxx
index 76f7a15d79

[Libreoffice-commits] core.git: Branch 'private/swe/libreoffice-5-2+backports' - svx/source

2018-03-21 Thread Armin Le Grand
 svx/source/sdr/contact/viewcontactofsdrpathobj.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 4467578d92e9ba94e96cb0b7633fcb3f5afc57eb
Author: Armin Le Grand 
Date:   Wed Mar 21 15:37:21 2018 +0100

OperationSmiley: Added missing commit for LinuxBuild

Change-Id: Ie28d7d6f60feeda939cc1526866259c29d3967d5

diff --git a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx 
b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
index 4f72e6c4169f..0f09700181bc 100644
--- a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
@@ -26,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 
 
 namespace sdr
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-03-21 Thread Stephan Bergmann
 vcl/quartz/salbmp.cxx |   13 -
 1 file changed, 13 deletions(-)

New commits:
commit 718c82d1de44d2d7c16e4299b61171b72186f50b
Author: Stephan Bergmann 
Date:   Wed Mar 21 15:17:04 2018 +0100

Don't initialize data for --enable-dbgutil only

This had originally been introduced with
0f6149593129c3d208f07d0d017dec0c71760778 "Make it easier to catch code that
assumes SalBitmaps are created pre-cleared".  But it only made it harder to 
find
the issue reverted with ebe247642d85d39b6e1ffae3cf92c31748f2e983 "Revert
'tdf#116213 OS X and OpenGL bitmap scaline sizes are not 32-bit aligned'".

Change-Id: I344e1ab4b390baa8364ade5fd2737a12708facdc

diff --git a/vcl/quartz/salbmp.cxx b/vcl/quartz/salbmp.cxx
index f9a10a44020b..aba40b44d8e0 100644
--- a/vcl/quartz/salbmp.cxx
+++ b/vcl/quartz/salbmp.cxx
@@ -272,10 +272,6 @@ bool QuartzSalBitmap::CreateContext()
 try
 {
 m_pContextBuffer = o3tl::make_shared_array(mnHeight * 
nContextBytesPerRow);
-#ifdef DBG_UTIL
-for (size_t i = 0; i < mnHeight * nContextBytesPerRow; i++)
-m_pContextBuffer.get()[i] = (i & 0xFF);
-#endif
 
 if( !bSkipConversion )
 {
@@ -342,15 +338,6 @@ bool QuartzSalBitmap::AllocateUserData()
 m_pUserBuffer.reset( static_cast(nullptr) );
 mnBytesPerRow = 0;
 }
-#ifdef DBG_UTIL
-else
-{
-for (size_t i = 0; i < mnBytesPerRow * mnHeight; i++)
-{
-m_pUserBuffer.get()[i] = (i & 0xFF);
-}
-}
-#endif
 
 return m_pUserBuffer.get() != nullptr;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-03-21 Thread Stephan Bergmann
 vcl/opengl/salbmp.cxx |   19 ---
 vcl/qa/cppunit/BitmapTest.cxx |   27 ---
 vcl/quartz/salbmp.cxx |   15 ---
 3 files changed, 48 insertions(+), 13 deletions(-)

New commits:
commit ebe247642d85d39b6e1ffae3cf92c31748f2e983
Author: Stephan Bergmann 
Date:   Wed Mar 21 15:04:25 2018 +0100

Revert "tdf#116213 OS X and OpenGL bitmap scaline sizes are not 32-bit 
aligned"

This reverts commit 460f39e687393b3a8906d2adc3e8f7a0c749851a.

For one, it had started to make bitmap checksum equality check in
svx/qa/unit/XTableImportExportTest.cxx, CppunitTest_svx_unit, fail most of 
the
time in macOS --disable-dbgutil builds, as the bitmap checksum is now 
computed
also over padding bytes containing random values (but --enable-dbgutil
initializes those bytes).  And why would fixing tdf#116213 for Windows 
require
touching the macOS-specific code, anyway?

For another, tdf#116213 comments 6 and 7 report further problems that are 
likely
linked to this commit.

Change-Id: I3e158813ab89a1ead3780abbf6b120ec52660231

diff --git a/vcl/opengl/salbmp.cxx b/vcl/opengl/salbmp.cxx
index a83c2c820e0f..69c6c5481c35 100644
--- a/vcl/opengl/salbmp.cxx
+++ b/vcl/opengl/salbmp.cxx
@@ -81,13 +81,18 @@ inline bool isValidBitCount( sal_uInt16 nBitCount )
 
 sal_uInt32 lclBytesPerRow(sal_uInt16 nBits, int nWidth)
 {
-assert ((nBits == 1 || nBits == 4 || nBits == 8 || nBits == 16 || nBits == 
24 || nBits == 32)
-&& "vcl::OpenGLSalBitmap::AllocateUserData(), illegal bitcount!");
-
-if (!isValidBitCount(nBits))
-return 0;
-
-return AlignedWidth4Bytes(nBits * nWidth);
+switch(nBits)
+{
+case 1:  return (nWidth + 7) >> 3;
+case 4:  return (nWidth + 1) >> 1;
+case 8:  return  nWidth;
+case 16: return  nWidth * 2;
+case 24: return  nWidth * 3;
+case 32: return  nWidth * 4;
+default:
+OSL_FAIL("vcl::OpenGLSalBitmap::AllocateUserData(), illegal 
bitcount!");
+}
+return 0;
 }
 
 typedef std::vector > 
TextureAtlasVector;
diff --git a/vcl/qa/cppunit/BitmapTest.cxx b/vcl/qa/cppunit/BitmapTest.cxx
index 0bbe6d294882..f835c7b78bc3 100644
--- a/vcl/qa/cppunit/BitmapTest.cxx
+++ b/vcl/qa/cppunit/BitmapTest.cxx
@@ -342,8 +342,15 @@ void BitmapTest::testConvert()
 {
 Bitmap::ScopedReadAccess pReadAccess(aBitmap);
 CPPUNIT_ASSERT_EQUAL(static_cast(8), 
pReadAccess->GetBitCount());
-// scanline should pad to 32-bit multiples
-CPPUNIT_ASSERT_EQUAL(static_cast(12), 
pReadAccess->GetScanlineSize());
+#if defined MACOSX || defined IOS
+//it would be nice to find and change the stride for quartz to be the 
same as everyone else
+CPPUNIT_ASSERT_EQUAL(static_cast(10), 
pReadAccess->GetScanlineSize());
+#else
+#if HAVE_FEATURE_OPENGL
+if (!OpenGLHelper::isVCLOpenGLEnabled())
+CPPUNIT_ASSERT_EQUAL(static_cast(12), 
pReadAccess->GetScanlineSize());
+#endif
+#endif
 CPPUNIT_ASSERT(pReadAccess->HasPalette());
 const BitmapColor& rColor = 
pReadAccess->GetPaletteColor(pReadAccess->GetPixelIndex(1, 1));
 CPPUNIT_ASSERT_EQUAL(sal_Int32(204), sal_Int32(rColor.GetRed()));
@@ -358,8 +365,22 @@ void BitmapTest::testConvert()
 Bitmap::ScopedReadAccess pReadAccess(aBitmap);
 // 24 bit Bitmap on SVP backend can now use 24bit RGB everywhere.
 CPPUNIT_ASSERT_EQUAL(static_cast(24), 
pReadAccess->GetBitCount());
-// scanline should pad to 32-bit multiples
+
+#if defined LINUX || defined FREEBSD
 CPPUNIT_ASSERT_EQUAL(sal_uLong(32), pReadAccess->GetScanlineSize());
+#else
+#if defined(_WIN32)
+if (!OpenGLHelper::isVCLOpenGLEnabled())
+{
+// GDI Scanlines padded to DWORD multiples, it seems
+CPPUNIT_ASSERT_EQUAL(sal_uLong(32), 
pReadAccess->GetScanlineSize());
+}
+else
+#endif
+{
+CPPUNIT_ASSERT_EQUAL(sal_uLong(30), 
pReadAccess->GetScanlineSize());
+}
+#endif
 
 CPPUNIT_ASSERT(!pReadAccess->HasPalette());
 Color aColor = pReadAccess->GetPixel(0, 0).GetColor();
diff --git a/vcl/quartz/salbmp.cxx b/vcl/quartz/salbmp.cxx
index 04fb820b08a3..f9a10a44020b 100644
--- a/vcl/quartz/salbmp.cxx
+++ b/vcl/quartz/salbmp.cxx
@@ -310,10 +310,19 @@ bool QuartzSalBitmap::AllocateUserData()
 
 if( mnWidth && mnHeight )
 {
-assert((mnBits == 1 || mnBits == 4 || mnBits == 8 || mnBits == 16 || 
mnBits == 24 || mnBits == 32)
-&& "vcl::QuartzSalBitmap::AllocateUserData(), illegal 
bitcount!");
+mnBytesPerRow =  0;
 
-mnBytesPerRow = AlignedWidth4Bytes(mnBits * mnWidth);
+switch( mnBits )
+{
+case 1: mnBytesPerRow = (mnWidth + 7) >> 3; break;
+case 4: mnBytesPerRow = (mnWidth + 1) >> 1; break;
+case 8: mnBytesPerRow = mnWidth; break;
+case 16:mnBytesPerRow = m

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

2018-03-21 Thread Xisco Fauli
 sd/source/ui/view/drviewse.cxx |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 2d8d36713790584b4ab7f5c94179bad05754b2ec
Author: Xisco Fauli 
Date:   Wed Mar 14 10:19:47 2018 +0100

tdf#115539, tdf#116238: Don't display the notebookbar in presentation mode

Change-Id: Ifc64d9a3b5c93b83fa238737375e7a58b2ae86db
Reviewed-on: https://gerrit.libreoffice.org/51262
Tested-by: Jenkins 
Reviewed-by: Szymon Kłos 
(cherry picked from commit 6a9326803c01f4c9bc7da855053ce4e80646fad8)
Reviewed-on: https://gerrit.libreoffice.org/51295
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index 54b3628826cc..52a244635ddb 100644
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -720,12 +720,8 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
 case SID_PRESENTATION_CURRENT_SLIDE:
 case SID_REHEARSE_TIMINGS:
 {
-sfx2::SfxNotebookBar::LockNotebookBar();
-
 slideshowhelp::ShowSlideShow(rReq, *GetDoc());
 rReq.Ignore ();
-
-sfx2::SfxNotebookBar::UnlockNotebookBar();
 }
 break;
 
@@ -1582,6 +1578,7 @@ namespace slideshowhelp
 Reference< XPresentation2 > xPresentation( rDoc.getPresentation() );
 if( xPresentation.is() )
 {
+sfx2::SfxNotebookBar::LockNotebookBar();
 if (SID_REHEARSE_TIMINGS == rReq.GetSlot())
 xPresentation->rehearseTimings();
 else if (rDoc.getPresentationSettings().mbCustomShow)
@@ -1611,6 +1608,7 @@ namespace slideshowhelp
 
 xPresentation->startWithArguments( aArguments );
 }
+sfx2::SfxNotebookBar::UnlockNotebookBar();
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-03-21 Thread Michael Stahl
 sfx2/source/dialog/templdlg.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 8256df2bb3823f318d2131f513d62784e702b90c
Author: Michael Stahl 
Date:   Tue Mar 13 22:16:20 2018 +0100

tdf#91106 sfx2: Stylist hierarchical: sort the Default Style first

(regression from 41af2a9e26f3ee6b505b343120d5df3617ba5c49)

(cherry picked from commit fd67ee14e769ebdf1e43d55e0117f70f90d53053)

Change-Id: I47377447dd1e04a44033dea27ce7307a65821737
Reviewed-on: https://gerrit.libreoffice.org/51244
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit 21f220fce05bb99964f098247786eec014e56902)
Reviewed-on: https://gerrit.libreoffice.org/51591

diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 0832f1515a15..0e872b367581 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -562,6 +562,10 @@ StyleTreeArr_Impl& MakeTree_Impl(StyleTreeArr_Impl& rArr)
 // tdf#91106 sort top level styles
 std::sort(rArr.begin(), rArr.end(),
 [&aSorter](StyleTree_Impl* pEntry1, StyleTree_Impl* pEntry2) {
+if (pEntry2->getName() == "Default Style")
+return false;
+if (pEntry1->getName() == "Default Style")
+return true; // default always first
 return aSorter.compare(pEntry1->getName(), pEntry2->getName()) < 0;
 });
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'private/swe/libreoffice-5-2+backports' - 3 commits - include/svx sc/qa svx/inc svx/source

2018-03-21 Thread Armin Le Grand
 include/svx/EnhancedCustomShape2d.hxx  |   23 +-
 include/svx/svdobj.hxx |   21 ++
 include/svx/svdopath.hxx   |7 
 sc/qa/unit/tiledrendering/data/shape.ods   |binary
 svx/inc/sdr/primitive2d/sdrpathprimitive2d.hxx |   18 +
 svx/source/customshapes/EnhancedCustomShape2d.cxx  |  219 -
 svx/source/sdr/contact/viewcontactofsdrpathobj.cxx |   28 ++
 svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx  |   37 ++-
 svx/source/svdraw/svdobj.cxx   |5 
 svx/source/svdraw/svdopath.cxx |8 
 10 files changed, 251 insertions(+), 115 deletions(-)

New commits:
commit 673c0c9418c6937cb33378d3a91b494b73f8c735
Author: Armin Le Grand 
Date:   Sat Mar 17 18:20:10 2018 +0100

OperationSmiley: Adapted TestDocument

The OperationSmiley fix is about removing the old hack
that for CustomShapes in top-left and bottom-right points
were added. In the ScTiledRenderingTest::testGraphicInvalidate
UnitTest using this document exactly that top-left wrong polygon
was hit which is now no longer there. The used shape was an
ellipse, so this makes a difference - there *is* no geometry
in the top-left corner of this shape. To fix that, I exchanged
the ellipe CustomShape with a rectangle CustomShape. That way,
the old hit behaviour will be replicated.

Change-Id: I4b96ad79ba91166f097207226577d34087625589

diff --git a/sc/qa/unit/tiledrendering/data/shape.ods 
b/sc/qa/unit/tiledrendering/data/shape.ods
new file mode 100755
index ..36da8a70c1cd
Binary files /dev/null and b/sc/qa/unit/tiledrendering/data/shape.ods differ
commit 67ba3505a86f06bcfdc9949bb5342344ed1e0aac
Author: Armin Le Grand 
Date:   Fri Feb 23 16:57:41 2018 +0100

OperationSmiley: Added support for using same FillGeometry

It is now possible to use a single FillGeometry to fill objects that
are made of multiple filled objects (e.g. CustomShapes) so that
they look as using a single fill. This is used for CustomShapes,
but may later be 'extended' to be used for more cases. The basic
functionality was already in the primitives, but had to be added
to SDrObject due to these being used for CustomShapeVisualization
(currently - would be better to change this to primitives, too).

Change-Id: I1d9fb158191a9ec663e46f3911213be2f3d88986

diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index efc3bb220c66..3899295bbfd5 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -261,6 +261,27 @@ class SvxShape;
 class SVX_DLLPUBLIC SdrObject: public SfxListener, public tools::WeakBase< 
SdrObject >
 {
 private:
+// OperationSmiley: Allow at each SdrObject to set a 
FillGeometryDefiningShape,
+// so that for SdrObjects where this is set, the definition of a defined 
FillStyle
+// will use this, but the local geometry will be filled. This allows to 
fill
+// multiple shapes with a unified fill, e.g think about CustomShapes.
+// Currently this is *only* used for CustomShapes, but may be developed to 
get a
+// common mechanism - usages for it are easy to be found. The current 
limitation
+// to CustomShapes allows to to think about these SdrObjects to 'vanish' 
during the
+// lifetime of 'this' - the SdrObjects without SdrPage and SdrModel are 
used as helper
+// objects for SdrObjCustomShape and thus their lifetime is limited to the 
lifetime
+// of this local object. For unifying this mechanism, some weak reference 
of
+// SdrObjects would have to be thought about (not easy with the current 
implementation).
+// So - allow *only* EnhancedCustomShape2d (which creates the 
visualizations for
+// SdrObjCustomShape) to set this. Already allow unified read to use it - 
thus already
+// allowing to implement as standard case for all kinds of SdrObjects.
+friend class EnhancedCustomShape2d;
+const SdrObject*mpFillGeometryDefiningShape;
+void setFillGeometryDefiningShape(const SdrObject* pNew) { 
mpFillGeometryDefiningShape = pNew; }
+public:
+const SdrObject* getFillGeometryDefiningShape() const { return 
mpFillGeometryDefiningShape; }
+
+private:
 struct Impl;
 Impl* mpImpl;
 
diff --git a/svx/inc/sdr/primitive2d/sdrpathprimitive2d.hxx 
b/svx/inc/sdr/primitive2d/sdrpathprimitive2d.hxx
index 035a183f66f5..126eaaa2cc2a 100644
--- a/svx/inc/sdr/primitive2d/sdrpathprimitive2d.hxx
+++ b/svx/inc/sdr/primitive2d/sdrpathprimitive2d.hxx
@@ -40,20 +40,36 @@ namespace drawinglayer
 attribute::SdrLineFillShadowTextAttribute   maSdrLFSTAttribute;
 basegfx::B2DPolyPolygon maUnitPolyPolygon;
 
+// OperationSmiley: Added to be able to define a FillGeometry 
different from local
+// geometry. It is ignored when empty and/or equal to 
UnitPolyPolygon.
+// If used and there is a

[Libreoffice-commits] libmspub.git: src/lib

2018-03-21 Thread David Tardon
 src/lib/PolygonUtils.cpp |4 
 1 file changed, 4 insertions(+)

New commits:
commit 3988aba06f5297fc2262462d89cb601aeffcae3b
Author: David Tardon 
Date:   Wed Mar 21 15:03:03 2018 +0100

ofz#7053 avoid access to empty vector

Change-Id: I0d353901c1d5a02b57cc068aa9b7669af81f3073

diff --git a/src/lib/PolygonUtils.cpp b/src/lib/PolygonUtils.cpp
index 7738809..17f3515 100644
--- a/src/lib/PolygonUtils.cpp
+++ b/src/lib/PolygonUtils.cpp
@@ -5786,6 +5786,10 @@ void drawEmulatedLine(std::shared_ptr 
shape, ShapeType shapeT
   }
 }
   }
+
+  if (lineInfos.empty())
+return;
+
   if (rectangle)
   {
 LineInfo *top = &lineInfos[0];
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/vcl solenv/clang-format vcl/inc vcl/source xmlsecurity/inc xmlsecurity/qa xmlsecurity/source xmlsecurity/workben

2018-03-21 Thread Miklos Vajna
 include/vcl/filter/pdfdocument.hxx|   37 
 solenv/clang-format/blacklist |8 
 vcl/inc/pdfread.hxx   |2 
 vcl/source/filter/ipdf/pdfdocument.cxx| 1037 --
 vcl/source/filter/ipdf/pdfread.cxx|   49 -
 xmlsecurity/inc/pdfio/pdfdocument.hxx |5 
 xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx |  139 ++-
 xmlsecurity/source/pdfio/pdfdocument.cxx  |   20 
 xmlsecurity/workben/pdfverify.cxx |   28 
 9 files changed, 680 insertions(+), 645 deletions(-)

New commits:
commit 17407f808ed0ca5d65a98da186f7e2ab60dc641b
Author: Miklos Vajna 
Date:   Wed Mar 21 13:23:58 2018 +0100

Turn on clang-format for these files

I (tried to) keep these files consistent locally with astyle in the past,
switching to clang-format makes sure that the recent problem with 
introducing
inconsistencies in these files doesn't happen again.

(On the flip side, it's great to see that now others also touch this
PDF/pdfium code. :-) )

Change-Id: I6065eab77c584197a82fe48e7d3e81b445106efd
Reviewed-on: https://gerrit.libreoffice.org/51701
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins 

diff --git a/include/vcl/filter/pdfdocument.hxx 
b/include/vcl/filter/pdfdocument.hxx
index dfc13534bff8..8fd58dec647a 100644
--- a/include/vcl/filter/pdfdocument.hxx
+++ b/include/vcl/filter/pdfdocument.hxx
@@ -25,7 +25,6 @@ namespace vcl
 {
 namespace filter
 {
-
 class PDFTrailerElement;
 class PDFHexStringElement;
 class PDFReferenceElement;
@@ -67,9 +66,9 @@ class VCL_DLLPUBLIC PDFObjectElement : public PDFElement
 /// The stream of this object, used when this is an object stream.
 PDFStreamElement* m_pStreamElement;
 /// Objects of an object stream.
-std::vector< std::unique_ptr > m_aStoredElements;
+std::vector> m_aStoredElements;
 /// Elements of an object in an object stream.
-std::vector< std::unique_ptr > m_aElements;
+std::vector> m_aElements;
 /// Uncompressed buffer of an object in an object stream.
 std::unique_ptr m_pStreamBuffer;
 /// List of all reference elements inside this object's dictionary and
@@ -105,7 +104,7 @@ public:
 PDFArrayElement* GetArray() const;
 /// Parse objects stored in this object stream.
 void ParseStoredObjects();
-std::vector< std::unique_ptr >& GetStoredElements();
+std::vector>& GetStoredElements();
 SvMemoryStream* GetStreamBuffer() const;
 void SetStreamBuffer(std::unique_ptr& pStreamBuffer);
 PDFDocument& GetDocument();
@@ -117,6 +116,7 @@ class VCL_DLLPUBLIC PDFArrayElement : public PDFElement
 std::vector m_aElements;
 /// The object that contains this array.
 PDFObjectElement* m_pObject;
+
 public:
 PDFArrayElement(PDFObjectElement* pObject);
 bool Read(SvStream& rStream) override;
@@ -136,7 +136,8 @@ class VCL_DLLPUBLIC PDFReferenceElement : public PDFElement
 PDFNumberElement& m_rObject;
 
 public:
-PDFReferenceElement(PDFDocument& rDoc, PDFNumberElement& rObject, 
PDFNumberElement const& rGeneration);
+PDFReferenceElement(PDFDocument& rDoc, PDFNumberElement& rObject,
+PDFNumberElement const& rGeneration);
 bool Read(SvStream& rStream) override;
 /// Assuming the reference points to a number object, return its value.
 double LookupNumber(SvStream& rStream) const;
@@ -171,6 +172,7 @@ class VCL_DLLPUBLIC PDFNameElement : public PDFElement
 sal_uInt64 m_nLocation = 0;
 /// Length till the next token start.
 sal_uInt64 m_nLength = 0;
+
 public:
 PDFNameElement();
 bool Read(SvStream& rStream) override;
@@ -195,8 +197,10 @@ public:
 PDFDictionaryElement();
 bool Read(SvStream& rStream) override;
 
-static size_t Parse(const std::vector< std::unique_ptr >& 
rElements, PDFElement* pThis, std::map& rDictionary);
-static PDFElement* Lookup(const std::map& 
rDictionary, const OString& rKey);
+static size_t Parse(const std::vector>& 
rElements,
+PDFElement* pThis, std::map& 
rDictionary);
+static PDFElement* Lookup(const std::map& 
rDictionary,
+  const OString& rKey);
 void SetKeyOffset(const OString& rKey, sal_uInt64 nOffset);
 sal_uInt64 GetKeyOffset(const OString& rKey) const;
 void SetKeyValueLength(const OString& rKey, sal_uInt64 nLength);
@@ -252,6 +256,7 @@ struct XRefEntry
 class VCL_DLLPUBLIC PDFHexStringElement : public PDFElement
 {
 OString m_aValue;
+
 public:
 bool Read(SvStream& rStream) override;
 const OString& GetValue() const;
@@ -261,6 +266,7 @@ public:
 class VCL_DLLPUBLIC PDFLiteralStringElement : public PDFElement
 {
 OString m_aValue;
+
 public:
 bool Read(SvStream& rStream) override;
 const OString& GetValue() const;
@@ -293,7 +299,7 @@ public:
 class VCL_DLLPUBLIC PDFDocument
 {
 /// This vector owns all elements.
-std::vector< std::unique_

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

2018-03-21 Thread Stephan Bergmann
 filter/source/graphicfilter/itiff/itiff.cxx |   61 +---
 1 file changed, 46 insertions(+), 15 deletions(-)

New commits:
commit 45ea6ebdf1ddb43335d116a0dd7a4ad61f5725f3
Author: Stephan Bergmann 
Date:   Wed Mar 21 13:17:17 2018 +0100

Avoid undefined floating -> integer conversion in TIFF import

...as started to happen when reading (invalid)
filter/qa/cppunit/data/tiff/fail/RC4-crash-7.tiff in
CppunitTest_filter_tiff_test after c81765629bf0f7b3a0a8bb1dbed599a7f49ee58c
"coverity#1266496 Untrusted loop bound":

> /filter/source/graphicfilter/itiff/itiff.cxx:270:47: runtime error: value 
-nan is outside the range of representable values of type 'int'
> #0 0x2b5bae7ad928 in TIFFReader::ReadIntData() 
/filter/source/graphicfilter/itiff/itiff.cxx:270:47
> #1 0x2b5bae7b0017 in TIFFReader::ReadTagData(unsigned short, unsigned 
int) /filter/source/graphicfilter/itiff/itiff.cxx:320:27
> #2 0x2b5bae7e80f3 in TIFFReader::ReadTIFF(SvStream&, Graphic&) 
/filter/source/graphicfilter/itiff/itiff.cxx:1377:21
[...]

With an error-reporting concept apparently missing here, just convert such 
out-
of-bounds values to zero.  (And make ReadDoubleData not go though the value-
limiting ReadIntData for floating types.)

Change-Id: I6e53e468e6b98fb7a7d5fd7f3336ee2168f76e30
Reviewed-on: https://gerrit.libreoffice.org/51700
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/filter/source/graphicfilter/itiff/itiff.cxx 
b/filter/source/graphicfilter/itiff/itiff.cxx
index e68f87e8f9c7..f764c73e0bee 100644
--- a/filter/source/graphicfilter/itiff/itiff.cxx
+++ b/filter/source/graphicfilter/itiff/itiff.cxx
@@ -267,11 +267,27 @@ sal_uInt32 TIFFReader::ReadIntData()
 break;
 case 11 :
 pTIFF->ReadFloat( nFLOAT );
-nUINT32a = static_cast(nFLOAT);
+if (!rtl::math::isNan(nFLOAT) && nFLOAT > SAL_MIN_INT32 - 1.0
+&& nFLOAT < SAL_MAX_INT32 + 1.0)
+{
+nUINT32a = static_cast(nFLOAT);
+}
+else
+{
+SAL_INFO("filter.tiff", "float " << nFLOAT << " outsider of 
sal_Int32 range");
+}
 break;
 case 12 :
 pTIFF->ReadDouble( nDOUBLE );
-nUINT32a = static_cast(nDOUBLE);
+if (!rtl::math::isNan(nDOUBLE) && nDOUBLE > SAL_MIN_INT32 - 1.0
+&& nDOUBLE < SAL_MAX_INT32 + 1.0)
+{
+nUINT32a = static_cast(nDOUBLE);
+}
+else
+{
+SAL_INFO("filter.tiff", "double " << nDOUBLE << " outsider of 
sal_Int32 range");
+}
 break;
 default:
 pTIFF->ReadUInt32( nUINT32a );
@@ -282,21 +298,36 @@ sal_uInt32 TIFFReader::ReadIntData()
 
 double TIFFReader::ReadDoubleData()
 {
-double  nd;
+switch (nDataType) {
+case 5:
+{
+sal_uInt32 nulong(0);
+pTIFF->ReadUInt32( nulong );
+double nd = static_cast(nulong);
+nulong = 0;
+pTIFF->ReadUInt32( nulong );
+if ( nulong != 0 )
+nd /= static_cast(nulong);
+return nd;
+}
 
-if ( nDataType == 5 )
-{
-sal_uInt32 nulong(0);
-pTIFF->ReadUInt32( nulong );
-nd = static_cast(nulong);
-nulong = 0;
-pTIFF->ReadUInt32( nulong );
-if ( nulong != 0 )
-nd /= static_cast(nulong);
+case 11:
+{
+float x = 0;
+pTIFF->ReadFloat(x);
+return x;
+}
+
+case 12:
+{
+double x = 0;
+pTIFF->ReadDouble(x);
+return x;
+}
+
+default:
+return static_cast(ReadIntData());
 }
-else
-nd = static_cast(ReadIntData());
-return nd;
 }
 
 void TIFFReader::ReadTagData( sal_uInt16 nTagType, sal_uInt32 nDataLen)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-03-21 Thread Caolán McNamara
 lotuswordpro/qa/cppunit/data/fail/registered-1.lwp |binary
 lotuswordpro/source/filter/lwpfrib.cxx |2 ++
 2 files changed, 2 insertions(+)

New commits:
commit bee825957a15bd8ef5bbcaf2dcb6fb812bd7de6c
Author: Caolán McNamara 
Date:   Wed Mar 21 09:18:21 2018 +

ofz#7043 already registered

Change-Id: Ic94891c82944d04fe3391c0bd0731a6e3e4373e0
Reviewed-on: https://gerrit.libreoffice.org/51691
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/lotuswordpro/qa/cppunit/data/fail/registered-1.lwp 
b/lotuswordpro/qa/cppunit/data/fail/registered-1.lwp
new file mode 100644
index ..f3419f45b369
Binary files /dev/null and b/lotuswordpro/qa/cppunit/data/fail/registered-1.lwp 
differ
diff --git a/lotuswordpro/source/filter/lwpfrib.cxx 
b/lotuswordpro/source/filter/lwpfrib.cxx
index 919b257be043..f1f74a25420c 100644
--- a/lotuswordpro/source/filter/lwpfrib.cxx
+++ b/lotuswordpro/source/filter/lwpfrib.cxx
@@ -451,6 +451,8 @@ XFColor LwpFrib::GetHighlightColor()
 
 void LwpFrib::Register(std::map* pFribMap)
 {
+if (m_pFribMap)
+throw std::runtime_error("registered already");
 m_pFribMap = pFribMap;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - 26 commits - bin/gbuild-to-ide cppuhelper/source cui/source desktop/source framework/inc framework/source include/LibreOfficeKit incl

2018-03-21 Thread Jan Holesovsky
 bin/gbuild-to-ide|2 
 cppuhelper/source/servicemanager.cxx |   31 ++
 cui/source/dialogs/cuicharmap.cxx|2 
 desktop/source/lib/init.cxx  |5 
 framework/inc/classes/taskcreator.hxx|3 
 framework/source/classes/taskcreator.cxx |   10 
 framework/source/loadenv/loadenv.cxx |4 
 framework/source/services/desktop.cxx|4 
 framework/source/services/frame.cxx  |   23 +-
 framework/source/services/taskcreatorsrv.cxx |9 
 include/LibreOfficeKit/LibreOfficeKit.hxx|5 
 include/sfx2/lokhelper.hxx   |2 
 include/sfx2/tabdlg.hxx  |1 
 include/vcl/abstdlg.hxx  |   18 +
 include/vcl/dialog.hxx   |   19 +
 include/vcl/window.hxx   |7 
 sc/inc/clipparam.hxx |6 
 sc/source/core/data/clipparam.cxx|6 
 sc/source/ui/attrdlg/scdlgfact.hxx   |5 
 sc/source/ui/inc/inputhdl.hxx|1 
 sc/source/ui/inc/viewdata.hxx|   52 
 sc/source/ui/view/gridwin4.cxx   |   92 
 sc/source/ui/view/tabview.cxx|  247 ---
 sc/source/ui/view/tabvwsha.cxx   |   54 +++--
 sc/source/ui/view/viewdata.cxx   |  198 +++
 sc/source/ui/view/viewfun2.cxx   |   17 +
 sc/source/ui/view/viewfun3.cxx   |   22 --
 sfx2/source/appl/macroloader.cxx |   12 -
 sfx2/source/appl/sfxhelp.cxx |3 
 sfx2/source/control/request.cxx  |   17 +
 sfx2/source/dialog/tabdlg.cxx|   37 ++-
 sfx2/source/notify/eventsupplier.cxx |8 
 sfx2/source/view/lokhelper.cxx   |   11 +
 sw/source/ui/dialog/swdlgfact.hxx|9 
 sw/source/uibase/app/docst.cxx   |   31 +-
 sw/source/uibase/shells/textsh1.cxx  |  281 ++-
 sw/source/uibase/shells/txtnum.cxx   |   86 
 unotools/source/misc/syslocale.cxx   |8 
 vcl/headless/svpgdi.cxx  |   21 +-
 vcl/inc/implimagetree.hxx|2 
 vcl/inc/svdata.hxx   |2 
 vcl/source/app/svdata.cxx|3 
 vcl/source/app/svmain.cxx|2 
 vcl/source/image/ImplImageTree.cxx   |   49 ++--
 vcl/source/uitest/uitest.cxx |4 
 vcl/source/window/abstdlg.cxx|6 
 vcl/source/window/dialog.cxx |  155 --
 vcl/source/window/window.cxx |5 
 vcl/source/window/winproc.cxx|6 
 49 files changed, 934 insertions(+), 669 deletions(-)

New commits:
commit c6750cc682634ed141c75f8e2c78fe5bc4e78d1a
Author: Jan Holesovsky 
Date:   Wed Jan 17 11:11:34 2018 +0100

sw: Actually only .uno:StyleApply and .uno:StyleWatercanMode can return...

...a value, at least according to sfx2/sdi/sfx.sdi.

Reviewed-on: https://gerrit.libreoffice.org/48041
Reviewed-by: Michael Meeks 
Tested-by: Jenkins 
(cherry picked from commit 67ea8e1432f4ea86f2bc16d8479ef8cf10c74b80)

Change-Id: I1a12c025386cfc6eae529782cdb69207ffa388c5

diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx
index c414b3c05368..b17e936dd02e 100644
--- a/sw/source/uibase/app/docst.cxx
+++ b/sw/source/uibase/app/docst.cxx
@@ -295,7 +295,6 @@ void  SwDocShell::StateStyleSheet(SfxItemSet& rSet, 
SwWrtShell* pSh)
 void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
 {
 sal_uInt16  nSlot   = rReq.GetSlot();
-sal_uInt16  nRet= SFXSTYLEBIT_ALL;
 
 const SfxItemSet* pArgs = rReq.GetArgs();
 const SfxPoolItem* pItem;
@@ -323,7 +322,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
 if (sName.isEmpty() && m_xBasePool.get())
 sName = SfxStyleDialog::GenerateUnusedName(*m_xBasePool);
 
-nRet = Edit( sName, sParent, nFamily, nMask, true, OString(), 
nullptr, rReq.IsAPI() );
+Edit(sName, sParent, nFamily, nMask, true, OString(), nullptr, 
rReq.IsAPI());
 
 // Update Watermark if new page style was created
 if( nFamily == SfxStyleFamily::Page )
@@ -498,47 +497,55 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
 }
 if (!aParam.isEmpty() || nSlot == SID_STYLE_WATERCAN )
 {
+sal_uInt16 nRet = SFXSTYLEBIT_ALL;
+bool bReturns = false;
+
 switch(nSlot)
 {
 case SID_STYLE_EDIT:
-nRet = Edit(aParam, aEmptyOUStr, nFamily, nMask, 
false, OString(), pActShell );
+Edit(aParam, aEmptyOUStr, nFamily, nMask, false, 
OString(), pActShell);
 break;
 case SID_STYLE_DEL

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

2018-03-21 Thread Caolán McNamara
 cui/source/customize/cfg.cxx   |4 ++--
 filter/source/pdf/pdfinteract.cxx  |2 +-
 sw/source/core/doc/docftn.cxx  |5 ++---
 sw/source/ui/dbui/mmoutputtypepage.cxx |2 +-
 4 files changed, 6 insertions(+), 7 deletions(-)

New commits:
commit bec100c0742101f9fd378f21b20f0721262bfd32
Author: Caolán McNamara 
Date:   Wed Mar 21 09:23:50 2018 +

coverity#1430229 Unchecked return value

Change-Id: I100125d723a83ec7846cf9651ecebd3df697ce58
Reviewed-on: https://gerrit.libreoffice.org/51695
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 429e8302eb31..7f27e15f695a 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -1632,7 +1632,7 @@ SvTreeListEntry* SvxConfigPage::AddFunction(
 {
 std::unique_ptr 
xBox(Application::CreateMessageDialog(GetFrameWeld(),
   
VclMessageType::Info, VclButtonsType::Ok, 
CuiResId(RID_SVXSTR_MNUCFG_ALREADY_INCLUDED)));
-xBox->run();
+(void)xBox->run();
 delete pNewEntryData;
 return nullptr;
 }
@@ -3316,7 +3316,7 @@ void SvxIconSelectorDialog::ImportGraphics(
 }
 
 SvxIconChangeDialog aDialog(GetFrameWeld(), message);
-aDialog.run();
+(void)aDialog.run();
 }
 }
 
diff --git a/filter/source/pdf/pdfinteract.cxx 
b/filter/source/pdf/pdfinteract.cxx
index 19dc5e7546f3..a08221562141 100644
--- a/filter/source/pdf/pdfinteract.cxx
+++ b/filter/source/pdf/pdfinteract.cxx
@@ -62,7 +62,7 @@ sal_Bool SAL_CALL 
PDFInteractionHandler::handleInteractionRequest( const Referen
 
 VclPtr xParent(VCLUnoHelper::GetWindow(m_xParent));
 ImplErrorDialog aDlg(xParent ? xParent->GetFrameWeld() : nullptr, 
aCodes);
-aDlg.run();
+(void)aDlg.run();
 bHandled = true;
 }
 return bHandled;
diff --git a/sw/source/ui/dbui/mmoutputtypepage.cxx 
b/sw/source/ui/dbui/mmoutputtypepage.cxx
index fe6c362a7bbd..6f1176f6cbdf 100644
--- a/sw/source/ui/dbui/mmoutputtypepage.cxx
+++ b/sw/source/ui/dbui/mmoutputtypepage.cxx
@@ -548,7 +548,7 @@ void SwSendMailDialog::DocumentSent( uno::Reference< 
mail::XMailMessage> const &
 if (pError)
 {
 SwSendWarningBox_Impl aDlg(GetFrameWeld(), *pError);
-aDlg.run();
+(void)aDlg.run();
 }
 }
 
commit 42fe3985ed93d79228f70ecd6d69218fb9c3d41a
Author: Caolán McNamara 
Date:   Wed Mar 21 09:29:58 2018 +

coverity#1430228 Dereference after null check

Change-Id: I15b63e0adba812a84517bae086548441edfab7dc
Reviewed-on: https://gerrit.libreoffice.org/51697
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/source/core/doc/docftn.cxx b/sw/source/core/doc/docftn.cxx
index 8f1c4e43ea1a..ffbb49c35623 100644
--- a/sw/source/core/doc/docftn.cxx
+++ b/sw/source/core/doc/docftn.cxx
@@ -185,11 +185,10 @@ void SwEndNoteInfo::SwClientNotify( const SwModify& 
rModify, const SfxHint& rHin
 if (auto pLegacyHint = dynamic_cast(&rHint))
 {
 const sal_uInt16 nWhich = pLegacyHint->m_pOld ? 
pLegacyHint->m_pOld->Which() : pLegacyHint->m_pNew ? 
pLegacyHint->m_pNew->Which() : 0 ;
-if( RES_ATTRSET_CHG == nWhich ||
-RES_FMT_CHG == nWhich )
+if (RES_ATTRSET_CHG == nWhich || RES_FMT_CHG == nWhich)
 {
 auto pFormat = GetCurrentCharFormat(pCharFormat != nullptr);
-if(!aDepends.IsListeningTo(pFormat) || pFormat->IsFormatInDTOR())
+if (!pFormat || !aDepends.IsListeningTo(pFormat) || 
pFormat->IsFormatInDTOR())
 return;
 SwDoc* pDoc = pFormat->GetDoc();
 SwFootnoteIdxs& rFootnoteIdxs = pDoc->GetFootnoteIdxs();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - sc/source

2018-03-21 Thread Eike Rathke
 sc/source/core/tool/interpr1.cxx |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit b0e7b2336d5d5723a9feab124f7c8a152f96dda4
Author: Eike Rathke 
Date:   Sat Mar 10 20:34:36 2018 +0100

Resolves: tdf#116324 treat jump empty path as 0 when nested

Apparently a fallout from

commit 0f45ac20cd2ab2a64c40c7d6850f333cc33feeb0
AuthorDate: Mon Jun 28 11:40:39 2010 -0400
CommitDate: Sat Nov 6 23:40:00 2010 -0400

More on fixing build by eliminating use of ScMatrixValue.

or other commits related to ScMatrix handling.

Change-Id: I10e8b58aed51cd707b1503dbbc0b369aea4a2805
(cherry picked from commit 8930f8f530b4879226a6bac55bfeb551ac9e7489)
Reviewed-on: https://gerrit.libreoffice.org/51053
Tested-by: Jenkins 
Reviewed-by: Kohei Yoshida 

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 679a165f7e9c..49c7d009f05a 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -130,8 +130,10 @@ void ScInterpreter::ScIfJump()
 else
 {
 // Treat empty and empty path as 0, but string
-// as error.
-bIsValue = (!pMat->IsString(nC, nR) || 
pMat->IsEmpty(nC, nR));
+// as error. ScMatrix::IsValueOrEmpty() returns
+// true for any empty, empty path, empty cell,
+// empty result.
+bIsValue = pMat->IsValueOrEmpty(nC, nR);
 bTrue = false;
 fVal = (bIsValue ? 0.0 : CreateDoubleError( 
FormulaError::NoValue));
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-03-21 Thread Eike Rathke
 sc/source/core/tool/interpr1.cxx |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 4100c987f7c73a2e90ee8747ebc845478deff82e
Author: Eike Rathke 
Date:   Sat Mar 10 20:34:36 2018 +0100

Resolves: tdf#116324 treat jump empty path as 0 when nested

Apparently a fallout from

commit 0f45ac20cd2ab2a64c40c7d6850f333cc33feeb0
AuthorDate: Mon Jun 28 11:40:39 2010 -0400
CommitDate: Sat Nov 6 23:40:00 2010 -0400

More on fixing build by eliminating use of ScMatrixValue.

or other commits related to ScMatrix handling.

Change-Id: I10e8b58aed51cd707b1503dbbc0b369aea4a2805
(cherry picked from commit 8930f8f530b4879226a6bac55bfeb551ac9e7489)
Reviewed-on: https://gerrit.libreoffice.org/51054
Tested-by: Jenkins 
Reviewed-by: Kohei Yoshida 

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index f40637f33540..666e27ebc156 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -131,8 +131,10 @@ void ScInterpreter::ScIfJump()
 else
 {
 // Treat empty and empty path as 0, but string
-// as error.
-bIsValue = (!pMat->IsString(nC, nR) || 
pMat->IsEmpty(nC, nR));
+// as error. ScMatrix::IsValueOrEmpty() returns
+// true for any empty, empty path, empty cell,
+// empty result.
+bIsValue = pMat->IsValueOrEmpty(nC, nR);
 bTrue = false;
 fVal = (bIsValue ? 0.0 : CreateDoubleError( 
FormulaError::NoValue));
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-03-21 Thread Eike Rathke
 sc/source/ui/view/viewfun2.cxx |   23 ---
 1 file changed, 16 insertions(+), 7 deletions(-)

New commits:
commit 4f7250d4bb2b86b1d50e27a72af9bb4d7b01c66a
Author: Eike Rathke 
Date:   Tue Mar 6 21:26:23 2018 +0100

Resolves: tdf#116215 separate column sums and row sums, tdf#71339 related

Change-Id: Ifc7ab0c460f521ad3be4aa2785d54a1e4ed304e5
(cherry picked from commit 9d8dcec608dde63c68b34450a95a3b168121e289)
Reviewed-on: https://gerrit.libreoffice.org/50846
Tested-by: Jenkins 
Reviewed-by: Kohei Yoshida 

diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 55332765bb96..8805d11da115 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -615,7 +615,10 @@ bool ScViewFunc::AutoSum( const ScRange& rRange, bool 
bSubTotal, bool bSetCursor
 SCCOL nMarkEndCol = nEndCol;
 SCROW nMarkEndRow = nEndRow;
 ScAutoSum eSum = ScAutoSumNone;
-ScRangeList aSumRangeList;
+SCROW nColSums = 0;
+SCCOL nRowSums = 0;
+SCROW nColSumsStartRow = 0;
+SCCOL nRowSumsStartCol = 0;
 
 if ( bRow )
 {
@@ -639,12 +642,15 @@ bool ScViewFunc::AutoSum( const ScRange& rRange, bool 
bSubTotal, bool bSetCursor
 {
 if ( !pDoc->IsBlockEmpty( nTab, nCol, nStartRow, nCol, nSumEndRow 
) )
 {
+ScRangeList aRangeList;
 // Include the originally selected start row.
 const ScRange aRange( nCol, rRange.aStart.Row(), nTab, nCol, 
nSumEndRow, nTab );
-if ( (eSum = lcl_GetAutoSumForColumnRange( pDoc, 
aSumRangeList, aRange )) != ScAutoSumNone )
+if ( (eSum = lcl_GetAutoSumForColumnRange( pDoc, aRangeList, 
aRange )) != ScAutoSumNone )
 {
+if (++nRowSums == 1)
+nRowSumsStartCol = aRangeList[0]->aStart.Col();
 const OUString aFormula = GetAutoSumFormula(
-aSumRangeList, bSubTotal, ScAddress(nCol, nInsRow, 
nTab));
+aRangeList, bSubTotal, ScAddress(nCol, nInsRow, nTab));
 EnterData( nCol, nInsRow, nTab, aFormula );
 }
 }
@@ -673,11 +679,14 @@ bool ScViewFunc::AutoSum( const ScRange& rRange, bool 
bSubTotal, bool bSetCursor
 {
 if ( !pDoc->IsBlockEmpty( nTab, nStartCol, nRow, nSumEndCol, nRow 
) )
 {
+ScRangeList aRangeList;
 // Include the originally selected start column.
 const ScRange aRange( rRange.aStart.Col(), nRow, nTab, 
nSumEndCol, nRow, nTab );
-if ( (eSum = lcl_GetAutoSumForRowRange( pDoc, aSumRangeList, 
aRange )) != ScAutoSumNone )
+if ( (eSum = lcl_GetAutoSumForRowRange( pDoc, aRangeList, 
aRange )) != ScAutoSumNone )
 {
-const OUString aFormula = GetAutoSumFormula( 
aSumRangeList, bSubTotal, ScAddress(nInsCol, nRow, nTab) );
+if (++nColSums == 1)
+nColSumsStartRow = aRangeList[0]->aStart.Row();
+const OUString aFormula = GetAutoSumFormula( aRangeList, 
bSubTotal, ScAddress(nInsCol, nRow, nTab) );
 EnterData( nInsCol, nRow, nTab, aFormula );
 }
 }
@@ -690,10 +699,10 @@ bool ScViewFunc::AutoSum( const ScRange& rRange, bool 
bSubTotal, bool bSetCursor
 // original selection. All extended by end column/row where the sum is put.
 const ScRange aMarkRange(
 (eSum == ScAutoSumSum ?
- (aSumRangeList.size() == 1 ? aSumRangeList[0]->aStart.Col() : 
nStartCol) :
+ (nRowSums == 1 ? nRowSumsStartCol : nStartCol) :
  rRange.aStart.Col()),
 (eSum == ScAutoSumSum ?
- (aSumRangeList.size() == 1 ? aSumRangeList[0]->aStart.Row() : 
nStartRow) :
+ (nColSums == 1 ? nColSumsStartRow : nStartRow) :
  rRange.aStart.Row()),
 nTab, nMarkEndCol, nMarkEndRow, nTab );
 MarkRange( aMarkRange, false, bContinue );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-03-21 Thread Noel Grandin
 sw/source/core/frmedt/fetab.cxx |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit c6202b2cdacbed5821c8eeec026e9c7d8f69c00e
Author: Noel Grandin 
Date:   Tue Mar 20 15:38:21 2018 +0200

fix bug in SwFEShell::SetColRowWidthHeight

which has been there ever since

commit 84a3db80b4fd66c6854b3135b5f69b61fd828e62
Date:   Mon Sep 18 23:08:29 2000 +
initial import

since ColLeft==0, the expression "eType & ColLeft" would always evaluate
to false.

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

diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx
index 645c353d3fef..4f4f64453f93 100644
--- a/sw/source/core/frmedt/fetab.cxx
+++ b/sw/source/core/frmedt/fetab.cxx
@@ -2192,8 +2192,9 @@ void SwFEShell::SetColRowWidthHeight( 
TableChgWidthHeightType eType, sal_uInt16
 const SwFormatFrameSize& rTableFrameSz = pTab->GetFormat()->GetFrameSize();
 SwRectFnSet aRectFnSet(pTab);
 long nPrtWidth = aRectFnSet.GetWidth(pTab->getFramePrintArea());
+TableChgWidthHeightType eTypePos = extractPosition(eType);
 if( TableChgMode::VarWidthChangeAbs == pTab->GetTable()->GetTableChgMode() 
&&
-( eType & TableChgWidthHeightType::ColLeft || eType & 
TableChgWidthHeightType::ColRight ) &&
+( eTypePos == TableChgWidthHeightType::ColLeft || eTypePos == 
TableChgWidthHeightType::ColRight ) &&
 text::HoriOrientation::NONE == 
pTab->GetFormat()->GetHoriOrient().GetHoriOrient() &&
 nPrtWidth != rTableFrameSz.GetWidth() )
 {
@@ -2209,7 +2210,7 @@ void SwFEShell::SetColRowWidthHeight( 
TableChgWidthHeightType eType, sal_uInt16
 
 // we must move the cursor outside the current cell before
 // deleting the cells.
-switch( extractPosition(eType) )
+switch( eTypePos )
 {
 case TableChgWidthHeightType::RowTop:
 lcl_GoTableRow( this, true );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - sc/source

2018-03-21 Thread Eike Rathke
 sc/source/ui/view/viewfun2.cxx |   23 ---
 1 file changed, 16 insertions(+), 7 deletions(-)

New commits:
commit 2f504da556cb091db0ad7c47f1bb90220d890c66
Author: Eike Rathke 
Date:   Tue Mar 6 21:26:23 2018 +0100

Resolves: tdf#116215 separate column sums and row sums, tdf#71339 related

Change-Id: Ifc7ab0c460f521ad3be4aa2785d54a1e4ed304e5
(cherry picked from commit 9d8dcec608dde63c68b34450a95a3b168121e289)
Reviewed-on: https://gerrit.libreoffice.org/50845
Tested-by: Jenkins 
Reviewed-by: Kohei Yoshida 

diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 5d5457b4e088..7f4ca39fc8e2 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -614,7 +614,10 @@ bool ScViewFunc::AutoSum( const ScRange& rRange, bool 
bSubTotal, bool bSetCursor
 SCCOL nMarkEndCol = nEndCol;
 SCROW nMarkEndRow = nEndRow;
 ScAutoSum eSum = ScAutoSumNone;
-ScRangeList aSumRangeList;
+SCROW nColSums = 0;
+SCCOL nRowSums = 0;
+SCROW nColSumsStartRow = 0;
+SCCOL nRowSumsStartCol = 0;
 
 if ( bRow )
 {
@@ -638,12 +641,15 @@ bool ScViewFunc::AutoSum( const ScRange& rRange, bool 
bSubTotal, bool bSetCursor
 {
 if ( !pDoc->IsBlockEmpty( nTab, nCol, nStartRow, nCol, nSumEndRow 
) )
 {
+ScRangeList aRangeList;
 // Include the originally selected start row.
 const ScRange aRange( nCol, rRange.aStart.Row(), nTab, nCol, 
nSumEndRow, nTab );
-if ( (eSum = lcl_GetAutoSumForColumnRange( pDoc, 
aSumRangeList, aRange )) != ScAutoSumNone )
+if ( (eSum = lcl_GetAutoSumForColumnRange( pDoc, aRangeList, 
aRange )) != ScAutoSumNone )
 {
+if (++nRowSums == 1)
+nRowSumsStartCol = aRangeList[0]->aStart.Col();
 const OUString aFormula = GetAutoSumFormula(
-aSumRangeList, bSubTotal, ScAddress(nCol, nInsRow, 
nTab));
+aRangeList, bSubTotal, ScAddress(nCol, nInsRow, nTab));
 EnterData( nCol, nInsRow, nTab, aFormula );
 }
 }
@@ -672,11 +678,14 @@ bool ScViewFunc::AutoSum( const ScRange& rRange, bool 
bSubTotal, bool bSetCursor
 {
 if ( !pDoc->IsBlockEmpty( nTab, nStartCol, nRow, nSumEndCol, nRow 
) )
 {
+ScRangeList aRangeList;
 // Include the originally selected start column.
 const ScRange aRange( rRange.aStart.Col(), nRow, nTab, 
nSumEndCol, nRow, nTab );
-if ( (eSum = lcl_GetAutoSumForRowRange( pDoc, aSumRangeList, 
aRange )) != ScAutoSumNone )
+if ( (eSum = lcl_GetAutoSumForRowRange( pDoc, aRangeList, 
aRange )) != ScAutoSumNone )
 {
-const OUString aFormula = GetAutoSumFormula( 
aSumRangeList, bSubTotal, ScAddress(nInsCol, nRow, nTab) );
+if (++nColSums == 1)
+nColSumsStartRow = aRangeList[0]->aStart.Row();
+const OUString aFormula = GetAutoSumFormula( aRangeList, 
bSubTotal, ScAddress(nInsCol, nRow, nTab) );
 EnterData( nInsCol, nRow, nTab, aFormula );
 }
 }
@@ -689,10 +698,10 @@ bool ScViewFunc::AutoSum( const ScRange& rRange, bool 
bSubTotal, bool bSetCursor
 // original selection. All extended by end column/row where the sum is put.
 const ScRange aMarkRange(
 (eSum == ScAutoSumSum ?
- (aSumRangeList.size() == 1 ? aSumRangeList[0]->aStart.Col() : 
nStartCol) :
+ (nRowSums == 1 ? nRowSumsStartCol : nStartCol) :
  rRange.aStart.Col()),
 (eSum == ScAutoSumSum ?
- (aSumRangeList.size() == 1 ? aSumRangeList[0]->aStart.Row() : 
nStartRow) :
+ (nColSums == 1 ? nColSumsStartRow : nStartRow) :
  rRange.aStart.Row()),
 nTab, nMarkEndCol, nMarkEndRow, nTab );
 MarkRange( aMarkRange, false, bContinue );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - formula/source include/formula sc/source

2018-03-21 Thread Eike Rathke
 formula/source/core/api/FormulaCompiler.cxx |6 +-
 formula/source/ui/dlg/formula.cxx   |1 +
 include/formula/paramclass.hxx  |   11 +--
 sc/source/core/tool/interpr1.cxx|9 -
 4 files changed, 23 insertions(+), 4 deletions(-)

New commits:
commit b52ca1a7cf9e3652ebd433753b6642b6f5124d1f
Author: Eike Rathke 
Date:   Tue Mar 6 18:41:56 2018 +0100

Resolves: tdf#116100 fewer array of references cases, tdf#58874 related

In particular if in any ForceArray context use the matrix result
instead of the array of references list.

(cherry picked from commit cfc6cf5177f8df23af35c4509c0276a19de56cce)

Change-Id: I72328a690760637f6d31fadba447641c64711a67
Reviewed-on: https://gerrit.libreoffice.org/50842
Tested-by: Jenkins 
Reviewed-by: Kohei Yoshida 

diff --git a/formula/source/core/api/FormulaCompiler.cxx 
b/formula/source/core/api/FormulaCompiler.cxx
index 0ee613dcd8f0..715a2608c7ea 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -2606,9 +2606,11 @@ void FormulaCompiler::ForceArrayOperator( 
FormulaTokenRef const & rCurr )
 else if (eType == formula::ParamClass::ReferenceOrForceArray)
 {
 // Inherit further only if the return class of the nested function is
-// not Reference.
+// not Reference. Else flag as suppressed.
 if (GetForceArrayParameter( rCurr.get(), SAL_MAX_UINT16) != 
ParamClass::Reference)
 rCurr->SetInForceArray( eType);
+else
+rCurr->SetInForceArray( 
formula::ParamClass::SuppressedReferenceOrForceArray);
 return;
 }
 
@@ -2622,6 +2624,8 @@ void FormulaCompiler::ForceArrayOperator( FormulaTokenRef 
const & rCurr )
 {
 if (GetForceArrayParameter( rCurr.get(), SAL_MAX_UINT16) != 
ParamClass::Reference)
 rCurr->SetInForceArray( eType);
+else
+rCurr->SetInForceArray( 
formula::ParamClass::SuppressedReferenceOrForceArray);
 }
 }
 }
diff --git a/formula/source/ui/dlg/formula.cxx 
b/formula/source/ui/dlg/formula.cxx
index 1a7505ac06f8..c98167ea54bc 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -762,6 +762,7 @@ void FormulaDlg_Impl::MakeTree( StructPage* _pTree, 
SvTreeListEntry* pParent, co
 case ParamClass::Array:
 case ParamClass::ForceArray:
 case ParamClass::ReferenceOrForceArray:
+case ParamClass::SuppressedReferenceOrForceArray:
 ;   // nothing, only as array/matrix
 // no default to get compiler warning
 }
diff --git a/include/formula/paramclass.hxx b/include/formula/paramclass.hxx
index e8d411088061..a22854fc890c 100644
--- a/include/formula/paramclass.hxx
+++ b/include/formula/paramclass.hxx
@@ -51,8 +51,15 @@ namespace formula
 propagated to subsequent operators and functions being part of a
 parameter of this function. Used with functions that treat
 references separately from arrays, but need the forced array
-calculation of parameters that are not references.*/
-ReferenceOrForceArray
+calculation of parameters that are not references. */
+ReferenceOrForceArray,
+
+/** Same as ReferenceOrForceArray but suppressed / not inherited in the
+compiler's ForceArray context to indicate that a result of
+Reference in JumpMatrix context should use the result matrix
+instead of the array of references. Never used as initial parameter
+classification. */
+SuppressedReferenceOrForceArray
 };
 }
 
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 18a93676fa4a..679a165f7e9c 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -800,12 +800,19 @@ bool ScInterpreter::JumpMatrix( short nStackLevel )
 }
 if ( !bCont )
 {   // We're done with it, throw away jump matrix, keep result.
-// For an intermediate result of Reference use the array of references,
+// For an intermediate result of Reference use the array of references
+// if there are more than one reference and the current ForceArray
+// context is not ForceArray or related, suppressed, ...,
 // else (also for a final result of Reference) use the matrix.
 // Treat the result of a jump command as final and use the matrix (see
 // tdf#115493 for why).
+ParamClass eParamClass;
 if (!FormulaCompiler::IsOpCodeJumpCommand( pJumpMatrix->GetOpCode()) &&
+pJumpMatrix->GetRefList().size() > 1 &&
 ScParameterClassification::GetParameterType( pCur, 
SAL_MAX_UINT16) == ParamClass::Refer

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

2018-03-21 Thread Caolán McNamara
 cui/source/tabpages/transfrm.cxx |5 -
 1 file changed, 5 deletions(-)

New commits:
commit 0330a03e41610b6298c3f588180783f86e730b0b
Author: Caolán McNamara 
Date:   Wed Mar 21 09:22:23 2018 +

coverity#1430232 Dereference before null check

Change-Id: If15fe7c5f523a1c29a3d399a7b072180f9642439
Reviewed-on: https://gerrit.libreoffice.org/51694
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx
index bb95a7ca5153..226947059a7b 100644
--- a/cui/source/tabpages/transfrm.cxx
+++ b/cui/source/tabpages/transfrm.cxx
@@ -665,11 +665,6 @@ void SvxSlantTabPage::Reset(const SfxItemSet* rAttrs)
 
 while(true)
 {
-if(nullptr == pView)
-{
-break;
-}
-
 if(1 != pView->GetMarkedObjectList().GetMarkCount())
 {
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: tools/KitClient.cpp

2018-03-21 Thread Miklos Vajna
 tools/KitClient.cpp |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 0f4da16aecd5b5b3984db7b289ec87f0ea15dd11
Author: Miklos Vajna 
Date:   Wed Mar 21 10:52:39 2018 +0100

Fix -Werror=switch warning

Change-Id: I9542ec33df7a2c141055264cb09dc58cb3ad7593

diff --git a/tools/KitClient.cpp b/tools/KitClient.cpp
index cb3881dcf..c2261223b 100644
--- a/tools/KitClient.cpp
+++ b/tools/KitClient.cpp
@@ -80,6 +80,7 @@ extern "C"
 CASE(CELL_ADDRESS);
 CASE(RULER_UPDATE);
 CASE(WINDOW);
+CASE(CLIPBOARD_CHANGED);
 #undef CASE
 }
 std::cout << " payload: " << payload << std::endl;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/vector/vector-5.4' - 3 commits - sw/qa sw/source

2018-03-21 Thread Miklos Vajna
 sw/qa/extras/htmlexport/data/reqif-table.xhtml |9 +
 sw/qa/extras/htmlexport/htmlexport.cxx |   21 -
 sw/source/filter/html/css1atr.cxx  |   15 +++
 sw/source/filter/html/htmltabw.cxx |   15 +++
 sw/source/filter/html/wrthtml.cxx  |6 ++
 sw/source/filter/html/wrthtml.hxx  |4 ++--
 6 files changed, 59 insertions(+), 11 deletions(-)

New commits:
commit 1b444e839c62ade6d5f4177cbee87fe50b71c547
Author: Miklos Vajna 
Date:   Tue Mar 20 17:48:58 2018 +0100

sw XHTML export: write only CSS markup for table background

At least in the ReqIF case the bgcolor attribute is not only redundant
but is also invalid.

Reviewed-on: https://gerrit.libreoffice.org/51657
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins 
(cherry picked from commit e2076f48aef4aff9a90ae8581d3bde7c26c69ef1)

Conflicts:
sw/source/filter/html/htmltabw.cxx

Change-Id: I9b5f00a4885d0671668b6bab986c4aee00f3597b

diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx 
b/sw/qa/extras/htmlexport/htmlexport.cxx
index ba2fafbc5876..0cac2dad965c 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -471,6 +471,9 @@ DECLARE_HTMLEXPORT_TEST(testReqIfTable, "reqif-table.xhtml")
 // This failed, there were 2 style attributes, so as a best effort the
 // parser took the value of the first.
 CPPUNIT_ASSERT(aStyle.indexOf("border") != -1);
+
+// The attribute was present, which is not valid in reqif-xhtml.
+assertXPathNoAttribute(pDoc, "/html/body/div/table/tr/th", "bgcolor");
 }
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/filter/html/htmltabw.cxx 
b/sw/source/filter/html/htmltabw.cxx
index 853bf8ce7d24..89aacba1ad31 100644
--- a/sw/source/filter/html/htmltabw.cxx
+++ b/sw/source/filter/html/htmltabw.cxx
@@ -420,7 +420,9 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt,
 if( pBrushItem )
 {
 // Hintergrund ausgeben
-rWrt.OutBackground( pBrushItem, false );
+if (!rWrt.mbReqIF)
+// Avoid non-CSS version in the ReqIF case.
+rWrt.OutBackground( pBrushItem, false );
 
 if( rWrt.m_bCfgOutStyles )
 OutCSS1_TableBGStyleOpt( rWrt, *pBrushItem, /*bClose=*/false );
commit 4b909600d25ef4ce3485b49546a9d259d939
Author: Miklos Vajna 
Date:   Tue Mar 20 14:58:19 2018 +0100

sw XHTML import: write  wrapper in ReqIF mode

ReqIF says the XHTML fragment must be of type xhtml.BlkStruct.class,
which is either a  or a  element (a single one).

Just write this wrapper unconditionally, as we ignore it on import
anyway, and it could be skipped only in the single-paragraph-doc case.

Change-Id: I3051008866c4a28ce54413c73071bd4a5ced8b87
Reviewed-on: https://gerrit.libreoffice.org/51646
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins 
(cherry picked from commit f74d9ba2190426b974ca3d56da58919ac233a5d3)

diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx 
b/sw/qa/extras/htmlexport/htmlexport.cxx
index f13946edc65f..ba2fafbc5876 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -341,7 +341,8 @@ DECLARE_HTMLEXPORT_TEST(testReqIfParagraph, "reqif-p.xhtml")
 sal_uInt64 nLength = pStream->Tell();
 pStream->Seek(0);
 
-OString 
aExpected("aaa\nbbb" 
SAL_NEWLINE_STRING);
+OString 
aExpected("aaa\nbbb"
+  "" SAL_NEWLINE_STRING);
 
 // This was ' was missing, so the XHTML fragment wasn't a valid
+// xhtml.BlkStruct.class type anymore.
+assertXPath(pDoc, "/html/body/div/table/tr/th", 1);
+OUString aStyle = getXPath(pDoc, "/html/body/div/table/tr/th", "style");
 CPPUNIT_ASSERT(aStyle.indexOf("background") != -1);
 // This failed, there were 2 style attributes, so as a best effort the
 // parser took the value of the first.
diff --git a/sw/source/filter/html/wrthtml.cxx 
b/sw/source/filter/html/wrthtml.cxx
index 9169c403ada7..42ec9956ef9e 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -452,6 +452,9 @@ sal_uLong SwHTMLWriter::WriteStream()
 OutNewLine();
 HTMLOutFuncs::Out_AsciiTag( Strm(), GetNamespace() + 
OOO_STRING_SVTOOLS_HTML_html, false );
 }
+else if (mbReqIF)
+// ReqIF: end xhtml.BlkStruct.class.
+HTMLOutFuncs::Out_AsciiTag(Strm(), GetNamespace() + 
OOO_STRING_SVTOOLS_HTML_division, false);
 
 // delete the table with floating frames
 OSL_ENSURE( !m_pHTMLPosFlyFrames, "Were not all frames output?" );
@@ -1078,6 +1081,9 @@ const SwPageDesc *SwHTMLWriter::MakeHeader( sal_uInt16 
&rHeaderAttrs )
 
 Strm().WriteChar( '>' );
 }
+else if (mbReqIF)
+// ReqIF: start xhtml.BlkStruct.class.
+HTMLOutFuncs::Out_AsciiTag(Strm(), GetNamespace() + 
OOO_STRING_SVTOOLS_HTML_division);
 
  

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

2018-03-21 Thread Stephan Bergmann
 postprocess/qa/services.cxx |  114 +++-
 1 file changed, 112 insertions(+), 2 deletions(-)

New commits:
commit ffc525e348cd497f73d7c0abbff8499d52540e3f
Author: Stephan Bergmann 
Date:   Tue Mar 20 17:20:32 2018 +0100

CppunitTest_services: check service impls support properties as advertised

...blacklisting existing violations for now (to be cleaned up)

Change-Id: Ie94de44d44e04ed45c0ae10d518157da76332bda
Reviewed-on: https://gerrit.libreoffice.org/51654
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/postprocess/qa/services.cxx b/postprocess/qa/services.cxx
index 27fed5779e93..eb65a37b8c18 100644
--- a/postprocess/qa/services.cxx
+++ b/postprocess/qa/services.cxx
@@ -24,9 +24,13 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
+#include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -94,6 +98,19 @@ bool contains(
 return true;
 }
 
+void addService(
+css::uno::Reference const & 
service,
+std::set> * 
allServices)
+{
+assert(allServices != nullptr);
+if (!allServices->insert(service).second) {
+return;
+}
+for (auto const & serv: service->getMandatoryServices()) {
+addService(serv, allServices);
+}
+}
+
 class Test: public test::BootstrapFixture {
 public:
 void test();
@@ -104,6 +121,7 @@ public:
 
 private:
 void createInstance(
+css::uno::Reference const & 
typeManager,
 OUString const & name, bool withArguments,
 OUString const & implementationName,
 css::uno::Sequence const & serviceNames,
@@ -260,7 +278,7 @@ void Test::test() {
 if (i.second.constructors.empty()) {
 if (i.second.accumulationBased) {
 createInstance(
-i.first, false, i.first, i.second.serviceNames, 
&comps);
+typeMgr, i.first, false, i.first, 
i.second.serviceNames, &comps);
 } else {
 std::cout
 << "no obvious way to instantiate implementation \""
@@ -269,7 +287,7 @@ void Test::test() {
 } else {
 for (auto const & j: i.second.constructors) {
 createInstance(
-j.serviceName, !j.defaultConstructor, i.first,
+typeMgr, j.serviceName, !j.defaultConstructor, i.first,
 i.second.serviceNames, &comps);
 }
 }
@@ -282,6 +300,7 @@ void Test::test() {
 }
 
 void Test::createInstance(
+css::uno::Reference const & 
typeManager,
 OUString const & name, bool withArguments,
 OUString const & implementationName,
 css::uno::Sequence const & serviceNames,
@@ -400,6 +419,97 @@ void Test::createInstance(
 + msg(expServs))
  .getStr()),
 contains(servs, expServs));
+std::set> 
allservs;
+for (auto const & serv: servs) {
+if (!typeManager->hasByHierarchicalName(serv)) {
+std::cout
+<< "instantiating \"" << implementationName << "\" via \"" << 
name
+<< "\" supports fantasy service name \"" << serv << "\"\n";
+continue;
+}
+addService(
+css::uno::Reference(
+typeManager->getByHierarchicalName(serv), 
css::uno::UNO_QUERY_THROW),
+&allservs);
+}
+css::uno::Reference propsinfo;
+for (auto const & serv: allservs) {
+auto const props = serv->getProperties();
+for (auto const & prop: props) {
+auto const optional
+= (prop->getPropertyFlags() & 
css::beans::PropertyAttribute::OPTIONAL) != 0;
+if (!propsinfo.is()) {
+css::uno::Reference propset(inst, 
css::uno::UNO_QUERY);
+if (!propset.is()) {
+CPPUNIT_ASSERT_MESSAGE(
+(OString(
+"instantiating \"" + msg(implementationName) + "\" 
via \"" + msg(name)
++ "\" reports service " + msg(serv->getName())
++ " with non-optional property \"" + 
msg(prop->getName())
++ "\" but does not implement css.uno.XPropertySet")
+ .getStr()),
+optional);
+continue;
+}
+propsinfo = propset->getPropertySetInfo();
+if (!propsinfo.is()) {
+//TODO: legal to return null in more cases? ("@returns 
NULL if the
+// implementation cannot or will not provide information 
about the properties")
+CPPUNIT_ASSERT_MESSAGE(
+(OString(
+"instantiating \"" + msg(implementationName) + "\" 
via \"" + msg(name)
++ "\" reports service " + msg(serv->getName())
+ 

GSoC 2018 : LIbreOffice | LOEclipse | Introduction : Shobhan Mandal

2018-03-21 Thread Shobhan Mandal
Greetings LibreOffice Community,

I am Shobhan Mandal, currently pursuing my Masters Degree in Computer
Science from International Institute of Information Technology - Hyderabad,
Hyderabad, Telangana, India.

I am interested in working on the GSoC 2018 project in LOEclipse under
LibreOffice. I have also started submitting patches towards LOEclipse for
the same. With experience in making projects using C, Java and Python and
help from this beautiful community, I believe we can make some fruitful
contribution to the LOEclipse code-base.

Any help from you guys on improving how I contribute will always be
appreciated. Looking forward to working with you guys.

Thanks and Regards,
Shobhan.

Name : Shobhan Mandal
Email id   : dev.shobhanman...@gmail.com
IRC Nick : shobhanmandal
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2018-03-21 Thread Mike Kaganski
 svl/source/items/itemset.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit f1779e0e4b9d191ca4682011d179ff1879ef82f5
Author: Mike Kaganski 
Date:   Wed Mar 21 09:23:48 2018 +0100

Remove redundant assert

We had just returned on this condition

Change-Id: I822a4fe62e24442800ca17b404862818095e641d
Reviewed-on: https://gerrit.libreoffice.org/51685
Tested-by: Jenkins 
Reviewed-by: Mike Kaganski 

diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx
index 9aeacbd0ee9d..398a74896084 100644
--- a/svl/source/items/itemset.cxx
+++ b/svl/source/items/itemset.cxx
@@ -1338,7 +1338,6 @@ bool SfxItemSet::Equals(const SfxItemSet &rCmp, bool 
bComparePool) const
 return false;
 
 // If we reach here and bDifferentPools==true that means 
bComparePool==false.
-assert(!bDifferentPools || !bComparePool);
 
 // Counting Ranges takes longer; they also need to be the same, however
 sal_uInt16 nCount1 = TotalCount();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bin/gbuild-to-ide

2018-03-21 Thread Mike Kaganski
 bin/gbuild-to-ide |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 234d0368c823eb1a74e973e051ac522e6b86e833
Author: Mike Kaganski 
Date:   Wed Mar 21 09:03:59 2018 +0100

Don't generate filters with empty Includes

Avoids VS warnings:

> smoketest\Library_smoketest.vcxproj.filters : warning  : Unable to
> read the filters file "Library_smoketest.vcxproj.filters". Please
> unload the project "Library_smoketest.vcxproj" to be able to edit it.
> The required attribute "Include" is empty or missing from the element
> .

Change-Id: I0f02e837823a5e7a0355fd0f895f00c63a5df6fc
Reviewed-on: https://gerrit.libreoffice.org/51684
Tested-by: Jenkins 
Reviewed-by: Mike Kaganski 

diff --git a/bin/gbuild-to-ide b/bin/gbuild-to-ide
index 48d1a760c781..8507de280d83 100755
--- a/bin/gbuild-to-ide
+++ b/bin/gbuild-to-ide
@@ -945,7 +945,7 @@ class 
VisualStudioIntegrationGenerator(IdeIntegrationGenerator):
 
 def get_subfilters(self, proj_filter):
 parts = proj_filter.split('\\')
-subfilters = set([proj_filter])
+subfilters = set([proj_filter]) if proj_filter else set()
 for i in range(1, len(parts)):
 subfilters.add('\\'.join(parts[:i]))
 return subfilters
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-03-21 Thread Andrea Gelmini
 shell/source/backends/wininetbe/wininetbackend.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c262048da915614cf0349d6e4293ad82cc0667d9
Author: Andrea Gelmini 
Date:   Wed Mar 21 08:35:35 2018 +0100

Fix typo

Change-Id: Ib9aac2a629352a25d80061c2d4ca420e8144a94b
Reviewed-on: https://gerrit.libreoffice.org/51683
Reviewed-by: Julien Nabet 
Tested-by: Jenkins 

diff --git a/shell/source/backends/wininetbe/wininetbackend.cxx 
b/shell/source/backends/wininetbe/wininetbackend.cxx
index b6bcae4a8fc5..5334877d3451 100644
--- a/shell/source/backends/wininetbe/wininetbackend.cxx
+++ b/shell/source/backends/wininetbe/wininetbackend.cxx
@@ -160,7 +160,7 @@ WinInetBackend::WinInetBackend()
 // proxy is enabled or not
 
 // We use InternetQueryOptionW (see 
https://msdn.microsoft.com/en-us/library/aa385101);
-// it fills INTERNET_PROXY_INFO struct which is definned in 
WinInet.h to have LPCTSTR
+// it fills INTERNET_PROXY_INFO struct which is defined in 
WinInet.h to have LPCTSTR
 // (i.e., the UNICODE-dependent generic string type expanding to 
const wchar_t* when
 // UNICODE is defined, and InternetQueryOption macro expands to 
InternetQueryOptionW).
 // Thus, it's natural to expect that W version would return wide 
strings. But it's not
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loleaflet/dist

2018-03-21 Thread Jan Holesovsky
 loleaflet/dist/images/lc_drawchart-lc_insertobjectchart.svg |  617 
 loleaflet/dist/images/lc_drawchart.svg  |   10 
 loleaflet/dist/toolbar.css  |2 
 3 files changed, 11 insertions(+), 618 deletions(-)

New commits:
commit 77c45d456c452a5a5fbb12b0e61f07473b394c35
Author: Jan Holesovsky 
Date:   Tue Mar 20 18:46:19 2018 +0100

Use a 'breeze' icon for the insert chart toolbar button.

Change-Id: I8a4a8a45a634f44f8cc600c5c30232c9451c533c
Reviewed-on: https://gerrit.libreoffice.org/51659
Reviewed-by: pranavk 
Tested-by: pranavk 
(cherry picked from commit e641e524d3356a89126ce743f402fb023154e4ea)
Reviewed-on: https://gerrit.libreoffice.org/51689
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/loleaflet/dist/images/lc_drawchart-lc_insertobjectchart.svg 
b/loleaflet/dist/images/lc_drawchart-lc_insertobjectchart.svg
deleted file mode 100644
index 312f2c0b0..0
--- a/loleaflet/dist/images/lc_drawchart-lc_insertobjectchart.svg
+++ /dev/null
@@ -1,617 +0,0 @@
-
-
-
-http://purl.org/dc/elements/1.1/";
-   xmlns:cc="http://creativecommons.org/ns#";
-   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
-   xmlns:svg="http://www.w3.org/2000/svg";
-   xmlns="http://www.w3.org/2000/svg";
-   xmlns:xlink="http://www.w3.org/1999/xlink";
-   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd";
-   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape";
-   width="24"
-   height="24"
-   id="svg2"
-   version="1.1"
-   inkscape:version="0.48.3.1 r9886"
-   sodipodi:docname="lc_drawchart-lc_insertobjectchart.svg"
-   
inkscape:export-filename="/home/alexander/libo/icon-themes/tango_testing/cmd/lc_drawchart.png"
-   inkscape:export-xdpi="90"
-   inkscape:export-ydpi="90">
-  
-
-  
-  
-
-
-  
-  
-
-
-
-
-  
-  
-
-
-  
-  
-
-
-
-
-
-
-
-
-
-
-  
-  
-
-  
-  
-
-  
-image/svg+xml
-http://purl.org/dc/dcmitype/StillImage"; />
-
-  
-
-  
-  
-
-  
-
-  
-
-  
-
-  
-  
-  
-
-
-  
-  
-
-  
-
-  
-
-  
-
-  
-  
-   
-@font-face{font-family:'TrebuchetMS-Bold';src:url("data:;base64,\
-T1RUTwADACAAAQAQQ0ZGINnFGF0AAADFYUdQT1OwB73vAAAGJGZjbWFwAtwCtwAAADwA\
-AACEAQMMAAQAeBoAEAADAAoAIABDAFAAVQBhAGYAaQBsAG8AcgB0AHn//wAA\
-ACAAQwBQAFUAYQBlAGkAbABuAHIAdAB54f+//7P/r/+k/6H/n/+d/5z/mv+Z/5UAAQAA\
-AQAEAgABAQERVHJlYnVjaGV0TVMtQm9sZAABAQE7+BsMAPgU\
-BPgcDBX7Yvy8HAgUHAfYBR6gAEiCgSX/i4seoABIgoEl/4uLDAf3Pw/3XBD3XhGRHAVbEgACAQE/\
-TENvcHlyaWdodCAoYykgMTk5NiBNaWNyb3NvZnQgQ29ycG9yYXRpb24uIEFsbCByaWdodHMgcmVz\
-ZXJ2ZWQuL0ZTVHlwZSA4IGRlZgABACQAMQA2AEIARgBHAEoATQBPAFAAUwBVAFoPAgAB\
-ABsAHgCXAPEBPgHaAlICmwLlAwgDTQO+A+8ENwRvIPcU9/IV+ZT5lP2UB/0U9xQV+JT4lPyUBg78\
-lg73DhwEghwFaxUg+2sFxVEuqPsVG/sOJ1glPR89JGT7FfsxGvsxr/sQ1C8eL9PrXfcNG/ce9wC8\
-7tkf9w37ZgX7BSH7L1P7YRv7Yfszzvcb+wUf+wX3G1L3S/d9GvdtyvdJ9xL3Jh73JfcR9zXU91gb\
-9zz3GmlG8B8O0vgu+K8V/K/7mBwFuAeS90Hxj6gb93v3PmhE9h/2RMD7A/srGvvk+1r7PPwgbmON\
-kFoe+VAE/GkHhreuiaQb9wvhn7PCH8KypszkGvcs+w7X+4lwcImIch4O95X3KhwFuRX3mP51Bjyj\
-S7taHlq7zXLfG+nUo7zAH7+7pc3fGvpw95j+hAf7K1n7CiY2HjYm+xtg+z0b+z77F7XeLx8u3l33\
-DPcvGg5j+W/2FXRmZGxTdAhzUlB/Thv7BzCoxUkfScRq3fUa9xC67OjRHtHo9xiu9z8bqK6GgbMf\
-9xI7yvszLTx7bEweVfdWBbTh8aD3Cxv3N/cMZkHXH9dAsfsh+2Ma+3kH+yOoMsRmHnZndHVygwiC\
-cm6Hahtna5imbh9upniogaoIc/ghFZRga492G/tZKEr7FSvDW/cD9yrW1vcqHw65+tf4XxX9kQaQ\
-NqhIwVwIXMHUc+Yb9wbiqcbGH+z7UwVEM/sXZ/tDG/s3+xW76ywfLOpb9xr3Pxr3Pb/3HPT0HvTz\
-9xG/9yYb9y/3EV0u6R/pLrr7CvsjGmyEXX1NHv2I91AV+KIG9zF6NNn7MBv7IzM9+zFoHw78Cvlw\
-HAUBFZ1UYZRuG1xjd2JqH2piellQGoKLg4yCHvdy+2L7bv31+4759fsw92L3MQaQ9xey9dTcCNzT\
-6LP3BxvG1H5x4B8O/Jz33xwFzhWzrX1vqB+nbplpYxpjfWlvbx5ubml9YxtjaZmobx9up32tsxqz\
-ma2oqB6np62Zsxv7FRz6MhX59vsd92H4Gv7DBw73RhwFvhX3jscFHPtMB/sYsjzach5CZElmLhv7\
-BVLa9zEfDtn5zBb4/wfmes5otR61aFGgPBtmZIF2Yh9hdmpydGwI/Zr7jvrD90gHuScF28/vs/cZ\
-G/cT8GU/1R/UPrAh+x0a/SUHDqfM+K4V9ze69xnq8h7y6fcQvvcvG/c39xJaKOUf5Si4+xv7Pxr7\
-P137GzAmHiYv+xJZ+zMb+zf7Er7xMR8w8F73G/c9GveYFvuA4PsK9z7ZyarIuR64yKLj9wUa9302\
-9wj7PT1NbE5dHl1OdDX7AhoO+5T5hvnaFaheWppWG1FYcVZeH15WdEs/Gvz2+476w/eOKQfa0eiy\
-9wgb4M1+cbgfDvvT90H5+hX7EPdd9xD3bgb3jucF+8r3uvtd+7r8aQc+l1WjbB5ro7V7xxvHw5us\
-vx/7egd3UTiBIBsgOanIUh9Sx27h9wMaDmX49ftAFXBEUlA0XAhcMyVz+wkb93EH91Xru+zLcO1W\
-9xgf++P50wX3lwb3uP1495v5eAX3lwYO+PAU+v8VAAEKAB4ALAABREZMVAAIAAQA\
-//8AAQFrZXJuAAgBAQAEAAIBAAgAAQAmAAQCAA4AIAAEAAH/2wAF/6AA\
-Bv+gAAv/oAABAAX/wAABAAIAAwAMAAA=")}
-@font-face{font-family:'Arial-BoldMT';src:url("data:;base64,\
-T1RUTwADACAAAQAQQ0ZGILKMO8C

New Defects reported by Coverity Scan for LibreOffice

2018-03-21 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

5 new defect(s) introduced to LibreOffice found with Coverity Scan.
32 defect(s), reported by Coverity Scan earlier, were marked fixed in the 
recent build analyzed by Coverity Scan.

New defect(s) Reported-by: Coverity Scan
Showing 5 of 5 defect(s)


** CID 1430232:  Null pointer dereferences  (REVERSE_INULL)
/cui/source/tabpages/transfrm.cxx: 668 in SvxSlantTabPage::Reset(const 
SfxItemSet *)()



*** CID 1430232:  Null pointer dereferences  (REVERSE_INULL)
/cui/source/tabpages/transfrm.cxx: 668 in SvxSlantTabPage::Reset(const 
SfxItemSet *)()
662 m_pMtrAngle->SaveValue();
663 
664 bool bSelectionIsSdrObjCustomShape(false);
665 
666 while(true)
667 {
>>> CID 1430232:  Null pointer dereferences  (REVERSE_INULL)
>>> Null-checking "this->pView" suggests that it may be null, but it has 
>>> already been dereferenced on all paths leading to the check.
668 if(nullptr == pView)
669 {
670 break;
671 }
672 
673 if(1 != pView->GetMarkedObjectList().GetMarkCount())

** CID 1430231:  Error handling issues  (CHECKED_RETURN)
/filter/source/pdf/pdfinteract.cxx: 65 in 
PDFInteractionHandler::handleInteractionRequest(const 
com::sun::star::uno::Reference &)()



*** CID 1430231:  Error handling issues  (CHECKED_RETURN)
/filter/source/pdf/pdfinteract.cxx: 65 in 
PDFInteractionHandler::handleInteractionRequest(const 
com::sun::star::uno::Reference &)()
59 sal_Int32 nCodes = aExc.ErrorCodes.getLength();
60 for( sal_Int32 i = 0; i < nCodes; i++ )
61 aCodes.insert( 
static_cast(aExc.ErrorCodes.getConstArray()[i]) );
62 
63 VclPtr xParent(VCLUnoHelper::GetWindow(m_xParent));
64 ImplErrorDialog aDlg(xParent ? xParent->GetFrameWeld() : 
nullptr, aCodes);
>>> CID 1430231:  Error handling issues  (CHECKED_RETURN)
>>> Calling "run" without checking return value (as is done elsewhere 52 
>>> out of 65 times).
65 aDlg.run();
66 bHandled = true;
67 }
68 return bHandled;
69 }
70 

** CID 1430230:  Error handling issues  (CHECKED_RETURN)
/cui/source/customize/cfg.cxx: 3319 in 
SvxIconSelectorDialog::ImportGraphics(const 
com::sun::star::uno::Sequence &)()



*** CID 1430230:  Error handling issues  (CHECKED_RETURN)
/cui/source/customize/cfg.cxx: 3319 in 
SvxIconSelectorDialog::ImportGraphics(const 
com::sun::star::uno::Sequence &)()
3313 for ( sal_Int32 i = 0; i < rejectedCount; ++i )
3314 {
3315 message += fPath + rejected[i] + "\n";
3316 }
3317 
3318 SvxIconChangeDialog aDialog(GetFrameWeld(), message);
>>> CID 1430230:  Error handling issues  (CHECKED_RETURN)
>>> Calling "run" without checking return value (as is done elsewhere 52 
>>> out of 65 times).
3319 aDialog.run();
3320 }
3321 }
3322 
3323 bool SvxIconSelectorDialog::ImportGraphic( const OUString& aURL )
3324 {

** CID 1430229:  Error handling issues  (CHECKED_RETURN)
/sw/source/ui/dbui/mmoutputtypepage.cxx: 551 in 
SwSendMailDialog::DocumentSent(const 
com::sun::star::uno::Reference &, bool, 
const rtl::OUString *)()



*** CID 1430229:  Error handling issues  (CHECKED_RETURN)
/sw/source/ui/dbui/mmoutputtypepage.cxx: 551 in 
SwSendMailDialog::DocumentSent(const 
com::sun::star::uno::Reference &, bool, 
const rtl::OUString *)()
545 
546 UpdateTransferStatus( );
547 
548 if (pError)
549 {
550 SwSendWarningBox_Impl aDlg(GetFrameWeld(), *pError);
>>> CID 1430229:  Error handling issues  (CHECKED_RETURN)
>>> Calling "run" without checking return value (as is done elsewhere 52 
>>> out of 65 times).
551 aDlg.run();
552 }
553 }
554 
555 void SwSendMailDialog::UpdateTransferStatus()
556 {

** CID 1430228:  Null pointer dereferences  (FORWARD_NULL)



*** CID 1430228:  Null pointer dereferences  (FORWARD_NULL)
/sw/source/core/doc/docftn.cxx: 192 in SwEndNoteInfo::SwClientNotify(const 
SwModify &, const SfxHint &)()
186 {
187 const sal_uInt16 nWhich = pLegacyHint->m_pOld ? 
pLegacyHint->m_pOld->Which() : pLegacyHint->m_pNew ? 
pLegacyHint->m_pNew->Which() : 0 ;
188 if( RES_ATTRSET_CHG == nWhich ||
189   

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

2018-03-21 Thread Caolán McNamara
 dbaccess/source/ui/dlg/sqlmessage.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f6d2aa05482b47fc702d9fdc655ee33e9d8e5a0e
Author: Caolán McNamara 
Date:   Tue Mar 20 23:26:07 2018 +

drop debugging test

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

diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx 
b/dbaccess/source/ui/dlg/sqlmessage.cxx
index 9dfc3c1f84f2..f85b1b39d807 100644
--- a/dbaccess/source/ui/dlg/sqlmessage.cxx
+++ b/dbaccess/source/ui/dlg/sqlmessage.cxx
@@ -559,7 +559,7 @@ void OSQLMessageBox::impl_addDetailsButton()
 }
 }
 
-if ( bMoreDetailsAvailable || true )
+if ( bMoreDetailsAvailable )
 {
 AddButton( StandardButtonType::More, RET_MORE);
 PushButton* pButton = GetPushButton( RET_MORE );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-03-21 Thread Stephan Bergmann
 sw/source/core/layout/sectfrm.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit f57db0a495e99723e81381ffa29dfee982fbd325
Author: Stephan Bergmann 
Date:   Tue Mar 20 19:52:37 2018 +0100

loplugin:emptyif

Change-Id: If113f176e6ec590d578f5225323f1efda77b7c23
Reviewed-on: https://gerrit.libreoffice.org/51674
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/sw/source/core/layout/sectfrm.cxx 
b/sw/source/core/layout/sectfrm.cxx
index 62b3e7f310d3..ce3c2017ace0 100644
--- a/sw/source/core/layout/sectfrm.cxx
+++ b/sw/source/core/layout/sectfrm.cxx
@@ -151,10 +151,12 @@ void SwSectionFrame::DestroyImpl()
 pMaster->InvalidateSize();
 }
 }
+#if defined DBG_UTIL
 else if( HasFollow() )
 {
 PROTOCOL( this, PROT::Section, DbgAction::DelMaster, GetFollow() )
 }
+#endif
 }
 
 SwLayoutFrame::DestroyImpl();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-03-21 Thread Stephan Bergmann
 sw/source/core/doc/tblrwcl.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 19ccd4ca8a103c3945c292ae91cd65b3f27b1335
Author: Stephan Bergmann 
Date:   Tue Mar 20 18:51:15 2018 +0100

loplugin:emptyif

Change-Id: I79aee732d3437d13894a9b91506225b76b3a16be
Reviewed-on: https://gerrit.libreoffice.org/51658
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx
index 22df3ed0b8dc..5544487788a2 100644
--- a/sw/source/core/doc/tblrwcl.cxx
+++ b/sw/source/core/doc/tblrwcl.cxx
@@ -3851,11 +3851,13 @@ bool SwTable::SetColWidth( SwTableBox& rCurrentBox, 
TableChgWidthHeightType eTyp
 }
 }
 
+#if defined DBG_UTIL
 if( bRet )
 {
 CHECKBOXWIDTH
 CHECKTABLELAYOUT
 }
+#endif
 
 return bRet;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-03-21 Thread Stephan Bergmann
 vcl/source/window/dialog.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 328a69253b063b0d4b53794a285cfb412706256a
Author: Stephan Bergmann 
Date:   Tue Mar 20 17:28:18 2018 +0100

loplugin:unreffun

Change-Id: I7ed192011a930ea871d7efd2d966e6b746e2da3f
Reviewed-on: https://gerrit.libreoffice.org/51656
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 40eccbd30378..36d77298d767 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -346,6 +346,7 @@ struct DialogImpl
 
 DialogImpl() : mnResult( -1 ), mbStartedModal( false ) {}
 
+#ifndef NDEBUG
 short get_response(vcl::Window *pWindow) const
 {
 auto aFind = maResponses.find(pWindow);
@@ -353,6 +354,7 @@ struct DialogImpl
 return aFind->second;
 return RET_CANCEL;
 }
+#endif
 
 ~DialogImpl()
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-03-21 Thread Miklos Vajna
 sw/inc/anchoredobject.hxx |1 +
 sw/inc/dbmgr.hxx  |1 +
 sw/inc/doc.hxx|1 +
 sw/inc/fesh.hxx   |1 +
 sw/inc/shellres.hxx   |1 -
 sw/inc/splargs.hxx|2 --
 sw/inc/swabstdlg.hxx  |8 +---
 sw/inc/swacorr.hxx|3 ++-
 sw/inc/swatrset.hxx   |1 -
 sw/inc/swcalwrp.hxx   |8 ++--
 sw/inc/swcli.hxx  |8 
 sw/inc/swcrsr.hxx |2 --
 sw/inc/swdbdata.hxx   |2 +-
 sw/inc/swdll.hxx  |2 --
 sw/inc/swevent.hxx|3 ---
 sw/inc/swfltopt.hxx   |1 +
 sw/inc/swserv.hxx |2 +-
 sw/inc/swtypes.hxx|   12 ++--
 sw/qa/core/uwriter.cxx|2 ++
 sw/qa/extras/ooxmlexport/ooxmlexport9.cxx |1 +
 sw/qa/extras/uiwriter/uiwriter.cxx|1 +
 sw/qa/extras/ww8export/ww8export2.cxx |1 +
 sw/source/core/bastyp/init.cxx|1 +
 sw/source/core/doc/docdesc.cxx|1 +
 sw/source/core/docnode/swbaslnk.cxx   |1 +
 sw/source/core/inc/swblocks.hxx   |2 ++
 sw/source/core/swg/SwXMLTextBlocks1.cxx   |1 +
 sw/source/core/unocore/unoevent.cxx   |1 +
 sw/source/core/unocore/unoobj.cxx |1 +
 sw/source/filter/ww8/wrtww8.cxx   |1 +
 sw/source/filter/ww8/ww8par2.hxx  |1 +
 sw/source/uibase/app/docsh2.cxx   |1 +
 sw/source/uibase/dochdl/gloshdl.cxx   |1 +
 sw/source/uibase/docvw/edtwin.cxx |3 +++
 sw/source/uibase/inc/swdtflvr.hxx |1 +
 sw/source/uibase/inc/wrtsh.hxx|1 +
 sw/source/uibase/shells/frmsh.cxx |1 +
 sw/source/uibase/shells/textfld.cxx   |1 +
 sw/source/uibase/shells/textsh.cxx|1 +
 sw/source/uibase/table/tablemgr.cxx   |1 +
 sw/source/uibase/uiview/swcli.cxx |1 +
 sw/source/uibase/wrtsh/select.cxx |1 +
 sw/source/uibase/wrtsh/wrtsh1.cxx |1 +
 sw/source/uibase/wrtsh/wrtsh2.cxx |1 +
 44 files changed, 52 insertions(+), 37 deletions(-)

New commits:
commit 3613c299f6e6c44bb7f106450d9210037bc18c37
Author: Miklos Vajna 
Date:   Tue Mar 20 21:28:57 2018 +0100

sw: fix some IWYU warnings

Change-Id: I3682cc475de8342e4cdf122a35f6c1cfddd4c01e
Reviewed-on: https://gerrit.libreoffice.org/51677
Tested-by: Jenkins 
Reviewed-by: Miklos Vajna 

diff --git a/sw/inc/anchoredobject.hxx b/sw/inc/anchoredobject.hxx
index 7cc7a356899e..7aa0a23df4b4 100644
--- a/sw/inc/anchoredobject.hxx
+++ b/sw/inc/anchoredobject.hxx
@@ -33,6 +33,7 @@ class SwObjPositioningInProgress;
 
 class SwFrameFormat;
 class SwFormatAnchor;
+enum class RndStdIds;
 
 /** wrapper class for the positioning of Writer fly frames and drawing objects
 
diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx
index 9bc2e3b90a0b..4a8c40e8903f 100644
--- a/sw/inc/dbmgr.hxx
+++ b/sw/inc/dbmgr.hxx
@@ -21,6 +21,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include "swdllapi.h"
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index eb04a2ab9b3b..145267775ca2 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -174,6 +174,7 @@ class SetGetExpFields;
 struct SwInsertTableOptions;
 enum class SvMacroItemId : sal_uInt16;
 enum class SvxFrameDirection;
+enum class RndStdIds;
 
 namespace sw { namespace mark {
 class MarkManager;
diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx
index 67be27486aea..43c37323f29a 100644
--- a/sw/inc/fesh.hxx
+++ b/sw/inc/fesh.hxx
@@ -52,6 +52,7 @@ class SotDataObject;
 class SwFrameFormat;
 struct SwSortOptions;
 class SdrMarkList;
+enum class RndStdIds;
 
 namespace svx
 {
diff --git a/sw/inc/shellres.hxx b/sw/inc/shellres.hxx
index 2885b150e655..7b8d70962350 100644
--- a/sw/inc/shellres.hxx
+++ b/sw/inc/shellres.hxx
@@ -22,7 +22,6 @@
 #include 
 #include "swdllapi.h"
 #include 
-#include 
 
 struct SW_DLLPUBLIC ShellResource
 {
diff --git a/sw/inc/splargs.hxx b/sw/inc/splargs.hxx
index 50c3e7ae6973..f5813c9ee9b7 100644
--- a/sw/inc/splargs.hxx
+++ b/sw/inc/splargs.hxx
@@ -20,7 +20,6 @@
 #define INCLUDED_SW_INC_SPLARGS_HXX
 
 #include 
-#include 
 #include 
 
 #include 
@@ -28,7 +27,6 @@
 #include 
 
 #include 
-#include 
 
 class SwTextFrame;
 class SwTextNode;
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index d11d882052b5..c0c1c232c20c 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -20,19 +20,12 @@
 #define INCLUDED_SW_INC_SWABSTDLG_HXX
 
 #include 
-#include 
 #include 
-#include 
-#include 
-#include "globals.hrc"
 #include 
 #include 
 #include 
-#include 
 #include 
-#include 
 #include 
-#include "itabenum.hxx"
 #include 
 #include "dbmgr.hxx"
 #include 
@@ -73,

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

2018-03-21 Thread Serge Krot
 sd/qa/unit/data/odp/tdf115005.odp  |binary
 sd/qa/unit/export-tests-ooxml2.cxx |   22 ++
 xmloff/source/core/xmlmultiimagehelper.cxx |4 
 3 files changed, 26 insertions(+)

New commits:
commit 070f3db51da48c70cde12050c18fb03de2192c0f
Author: Serge Krot 
Date:   Mon Mar 19 22:19:38 2018 +0100

tdf#115005 Do not remove original vector images from slides

During calculation of the quality index of the image, we should
take into account also SVM vector image type.
Its mime type is image/x-vclgraphic.

Reviewed-on: https://gerrit.libreoffice.org/51599
Tested-by: Jenkins 
Reviewed-by: Samuel Mehrbrodt 

Conflicts:
sd/qa/unit/export-tests-ooxml2.cxx
xmloff/source/core/xmlmultiimagehelper.cxx

Change-Id: I7c723e5f73258bb59d976a6c7670c51f7a25
Reviewed-on: https://gerrit.libreoffice.org/51655
Tested-by: Jenkins 
Reviewed-by: Samuel Mehrbrodt 

diff --git a/sd/qa/unit/data/odp/tdf115005.odp 
b/sd/qa/unit/data/odp/tdf115005.odp
new file mode 100755
index ..764a862feda7
Binary files /dev/null and b/sd/qa/unit/data/odp/tdf115005.odp differ
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx 
b/sd/qa/unit/export-tests-ooxml2.cxx
index 0c8540dc55d0..4f6f86566530 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -124,6 +124,7 @@ public:
 void testGroupsRotatedPosition();
 void testAccentColor();
 void testTdf114848();
+void testTdf115005();
 /// SmartArt animated elements
 void testTdf104792();
 void testTdf90627();
@@ -178,6 +179,7 @@ public:
 CPPUNIT_TEST(testGroupsRotatedPosition);
 CPPUNIT_TEST(testAccentColor);
 CPPUNIT_TEST(testTdf114848);
+CPPUNIT_TEST(testTdf115005);
 CPPUNIT_TEST(testTdf104792);
 CPPUNIT_TEST(testTdf90627);
 CPPUNIT_TEST(testTdf104786);
@@ -1324,6 +1326,26 @@ void SdOOXMLExportTest2::testTdf114848()
 assertXPath(pXmlDocTheme2, 
"/a:theme/a:themeElements/a:clrScheme/a:dk2/a:srgbClr", "val", "1f497d");
 }
 
+void SdOOXMLExportTest2::testTdf115005()
+{
+sd::DrawDocShellRef xDocShRefOriginal = 
loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/tdf115005.odp"), ODP);
+utl::TempFile tempFile;
+sd::DrawDocShellRef xDocShRefResaved = 
saveAndReload(xDocShRefOriginal.get(), ODP, &tempFile);
+
+// additional checks of the output file
+uno::Reference xNameAccess = 
packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory),
 tempFile.GetURL());
+
+// check that the document contains original vector images
+const uno::Sequence names = xNameAccess->getElementNames();
+int nSVMFiles = 0;
+for (int i=0; ihttps://lists.freedesktop.org/mailman/listinfo/libreoffice-commits