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

2019-03-28 Thread Jaromir Wysoglad (via logerrit)
 offapi/com/sun/star/configuration/ConfigurationRegistry.idl |1 
-
 offapi/com/sun/star/document/FilterAdapter.idl  |1 
-
 offapi/com/sun/star/frame/XTransientDocumentsDocumentContentFactory.idl |1 
-
 offapi/com/sun/star/text/XDefaultNumberingProvider.idl  |1 
-
 offapi/com/sun/star/text/XNumberingFormatter.idl|1 
-
 offapi/com/sun/star/text/XNumberingTypeInfo.idl |1 
-
 offapi/com/sun/star/ucb/AlreadyInitializedException.idl |1 
-
 offapi/com/sun/star/ucb/CommandAbortedException.idl |1 
-
 offapi/com/sun/star/ucb/CommandFailedException.idl  |1 
-
 offapi/com/sun/star/ucb/ContentCreationException.idl|1 
-
 offapi/com/sun/star/ucb/DuplicateCommandIdentifierException.idl |1 
-
 offapi/com/sun/star/ucb/MissingPropertiesException.idl  |1 
-
 offapi/com/sun/star/ucb/NameClashResolveRequest.idl |1 
-
 offapi/com/sun/star/ucb/RemoteContentProviderChangeAction.idl   |1 
-
 offapi/com/sun/star/ucb/RemoteContentProviderChangeEvent.idl|1 
-
 offapi/com/sun/star/ucb/ResultSetException.idl  |1 
-
 offapi/com/sun/star/ucb/SimpleFileAccess.idl|1 
-
 offapi/com/sun/star/ucb/UnsupportedCommandException.idl |1 
-
 offapi/com/sun/star/ucb/UnsupportedDataSinkException.idl|1 
-
 offapi/com/sun/star/ucb/UnsupportedNameClashException.idl   |1 
-
 offapi/com/sun/star/ucb/UnsupportedOpenModeException.idl|1 
-
 offapi/com/sun/star/ucb/XCommandEnvironment.idl |1 
-
 offapi/com/sun/star/ucb/XCommandInfo.idl|1 
-
 offapi/com/sun/star/ucb/XCommandInfoChangeListener.idl  |1 
-
 offapi/com/sun/star/ucb/XCommandInfoChangeNotifier.idl  |1 
-
 offapi/com/sun/star/ucb/XCommandProcessor.idl   |1 
-
 offapi/com/sun/star/ucb/XContent.idl|1 
-
 offapi/com/sun/star/ucb/XContentAccess.idl  |1 
-
 offapi/com/sun/star/ucb/XContentCreator.idl |1 
-
 offapi/com/sun/star/ucb/XContentEventListener.idl   |1 
-
 offapi/com/sun/star/ucb/XContentIdentifier.idl  |1 
-
 offapi/com/sun/star/ucb/XContentIdentifierFactory.idl   |1 
-
 offapi/com/sun/star/ucb/XContentProvider.idl|1 
-
 offapi/com/sun/star/ucb/XContentProviderFactory.idl |1 
-
 offapi/com/sun/star/ucb/XContentProviderManager.idl |1 
-
 offapi/com/sun/star/ucb/XContentProviderSupplier.idl|1 
-
 offapi/com/sun/star/ucb/XContentTransmitter.idl |1 
-
 offapi/com/sun/star/ucb/XDataContainer.idl  |1 
-
 offapi/com/sun/star/ucb/XFileIdentifierConverter.idl|1 
-
 offapi/com/sun/star/ucb/XInteractionReplaceExistingData.idl |1 
-
 offapi/com/sun/star/ucb/XInteractionSupplyName.idl  |1 
-
 offapi/com/sun/star/ucb/XParameterizedContentProvider.idl   |1 
-
 offapi/com/sun/star/ucb/XPersistentPropertySet.idl  |1 
-
 offapi/com/sun/star/ucb/XPropertySetRegistry.idl|1 
-
 offapi/com/sun/star/ucb/XPropertySetRegistryFactory.idl |1 
-
 offapi/com/sun/star/ucb/XRemoteContentProviderAcceptor.idl  |1 
-
 offapi/com/sun/star/ucb/XRemoteContentProviderChangeListener.idl|1 
-
 offapi/com/sun/star/ucb/XRemoteContentProviderChangeNotifier.idl|1 
-
 offapi/com/sun/star/ucb/XRemoteContentProviderConnectionControl.idl |1 
-
 offapi/com/sun/star/ucb/XRemoteContentProviderDistributor.idl   |1 
-
 offapi/com/sun/star/ucb/XRemoteContentProviderDoneListener.idl  |1 
-
 offapi/com/sun/star/ucb/XRemoteContentProviderSupplier.idl  |1 
-
 wizards/com/sun/star/wizards/agenda/TopicsControl.py|1 
-
 wizards/com/sun/star/wizards/common/Properties.py   |1 
-
 wizards/com/sun/star/wizards/ui/DocumentPreview.py  |1 
-
 wizards/com/sun/star/wizards/ui/PeerConfig.py   |1 
-
 wizards/com/sun/star/wizards/ui/event/DataAware.py  |1 
-
 wizards/com/sun/star/wizards/ui/event/UnoDataAware.py   |1 
-
 58 files changed, 58 deletions(-)

New commits:
commit 92ce72a4731ad468f5928efd9da7fe66bfdb08ea
Author: Jaromir Wysoglad 
AuthorDate: Wed Mar 27 23:44:38 2019 +0100
Commit: Sam

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

2019-03-28 Thread Noel Grandin (via logerrit)
 sw/inc/swtable.hxx   |2 -
 sw/source/core/table/swtable.cxx |   48 +--
 sw/source/filter/xml/xmltbli.cxx |2 -
 3 files changed, 28 insertions(+), 24 deletions(-)

New commits:
commit 912742333b67c08f7d65c200efabd5fab00b907f
Author: Noel Grandin 
AuthorDate: Thu Mar 28 13:13:22 2019 +0200
Commit: Noel Grandin 
CommitDate: Fri Mar 29 07:29:54 2019 +0100

tdf#84635 quadratic slowdown on loading large tables

skip the re-registration scan in SwTableBox::ChgFrameFormat, which we
don't need since we are creating this table for the first time

On my machine,
loading the  69 page file goes from 40.9s to 30.4s
loading the 128 page file goes from 79.1s to 45.1s

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

diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx
index 21348a36662b..844ab31497e0 100644
--- a/sw/inc/swtable.hxx
+++ b/sw/inc/swtable.hxx
@@ -433,7 +433,7 @@ public:
 
 // Creates its own FrameFormat if more boxes depend on it.
 SwFrameFormat* ClaimFrameFormat();
-void ChgFrameFormat( SwTableBoxFormat *pNewFormat );
+void ChgFrameFormat( SwTableBoxFormat *pNewFormat, bool bNeedToReregister 
= true );
 
 void RemoveFromTable();
 const SwStartNode *GetSttNd() const { return m_pStartNode; }
diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index 6617665698ea..eee79e9e8354 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -1739,36 +1739,40 @@ SwFrameFormat* SwTableBox::ClaimFrameFormat()
 return pRet;
 }
 
-void SwTableBox::ChgFrameFormat( SwTableBoxFormat* pNewFormat )
+void SwTableBox::ChgFrameFormat( SwTableBoxFormat* pNewFormat, bool 
bNeedToReregister )
 {
 SwFrameFormat *pOld = GetFrameFormat();
 SwIterator aIter( *pOld );
 
+// tdf#84635 We set bNeedToReregister=false to avoid a quadratic slowdown 
on loading large tables,
+// and since we are creating the table for the first time, no 
re-registration is necessary.
+
 // First, re-register the Frames.
-for( SwCellFrame* pCell = aIter.First(); pCell; pCell = aIter.Next() )
-{
-if( pCell->GetTabBox() == this )
-{
-pCell->RegisterToFormat( *pNewFormat );
-pCell->InvalidateSize();
-pCell->InvalidatePrt_();
-pCell->SetCompletePaint();
-pCell->SetDerivedVert( false );
-pCell->CheckDirChange();
-
-// #i47489#
-// make sure that the row will be formatted, in order
-// to have the correct Get(Top|Bottom)MarginForLowers values
-// set at the row.
-const SwTabFrame* pTab = pCell->FindTabFrame();
-if ( pTab && pTab->IsCollapsingBorders() )
+if (bNeedToReregister)
+for( SwCellFrame* pCell = aIter.First(); pCell; pCell = aIter.Next() )
+{
+if( pCell->GetTabBox() == this )
 {
-SwFrame* pRow = pCell->GetUpper();
-pRow->InvalidateSize_();
-pRow->InvalidatePrt_();
+pCell->RegisterToFormat( *pNewFormat );
+pCell->InvalidateSize();
+pCell->InvalidatePrt_();
+pCell->SetCompletePaint();
+pCell->SetDerivedVert( false );
+pCell->CheckDirChange();
+
+// #i47489#
+// make sure that the row will be formatted, in order
+// to have the correct Get(Top|Bottom)MarginForLowers values
+// set at the row.
+const SwTabFrame* pTab = pCell->FindTabFrame();
+if ( pTab && pTab->IsCollapsingBorders() )
+{
+SwFrame* pRow = pCell->GetUpper();
+pRow->InvalidateSize_();
+pRow->InvalidatePrt_();
+}
 }
 }
-}
 
 // Now, re-register self.
 pNewFormat->Add( this );
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index dcd71a568259..f385c113b802 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -1824,7 +1824,7 @@ SwTableBoxFormat* SwXMLTableContext::GetSharedBoxFormat(
 {
 // set the shared format
 pBoxFormat2 = aIter->second;
-pBox->ChgFrameFormat( pBoxFormat2 );
+pBox->ChgFrameFormat( pBoxFormat2, /*bNeedToReregister*/false );
 bNew = false;   // copied from an existing format
 
 // claim it, if we are not allowed to share
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-03-28 Thread Noel Grandin (via logerrit)
 sdext/source/pdfimport/inc/pdfparse.hxx  |4 ++--
 sdext/source/pdfimport/pdfparse/pdfparse.cxx |   14 +++---
 sdext/source/pdfimport/test/pdfunzip.cxx |5 ++---
 3 files changed, 11 insertions(+), 12 deletions(-)

New commits:
commit 77192c1bcbae89ddc8e293cc06bd54e0315f1f08
Author: Noel Grandin 
AuthorDate: Thu Mar 28 10:32:35 2019 +0200
Commit: Noel Grandin 
CommitDate: Fri Mar 29 07:29:25 2019 +0100

loplugin:useuniqueptr in PDFReader

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

diff --git a/sdext/source/pdfimport/inc/pdfparse.hxx 
b/sdext/source/pdfimport/inc/pdfparse.hxx
index e8fcd77f7863..719766e7db98 100644
--- a/sdext/source/pdfimport/inc/pdfparse.hxx
+++ b/sdext/source/pdfimport/inc/pdfparse.hxx
@@ -291,9 +291,9 @@ class PDFReader
 public:
 PDFReader() {}
 
-static PDFEntry* read( const char* pFileName );
+static std::unique_ptr read( const char* pFileName );
 #ifdef _WIN32
-static PDFEntry* read( const char* pBuffer, unsigned int nLen );
+static std::unique_ptr read( const char* pBuffer, unsigned int 
nLen );
 #endif
 };
 
diff --git a/sdext/source/pdfimport/pdfparse/pdfparse.cxx 
b/sdext/source/pdfimport/pdfparse/pdfparse.cxx
index 42d4c231a336..60ab775ccda5 100644
--- a/sdext/source/pdfimport/pdfparse/pdfparse.cxx
+++ b/sdext/source/pdfimport/pdfparse/pdfparse.cxx
@@ -550,7 +550,7 @@ public:
 };
 
 #ifdef _WIN32
-PDFEntry* PDFReader::read( const char* pBuffer, unsigned int nLen )
+std::unique_ptr PDFReader::read( const char* pBuffer, unsigned int 
nLen )
 {
 PDFGrammar aGrammar( pBuffer );
 
@@ -581,11 +581,11 @@ PDFEntry* PDFReader::read( const char* pBuffer, unsigned 
int nLen )
 #endif
 }
 
-PDFEntry* pRet = nullptr;
+std::unique_ptr pRet;
 unsigned int nEntries = aGrammar.m_aObjectStack.size();
 if( nEntries == 1 )
 {
-pRet = aGrammar.m_aObjectStack.back();
+pRet.reset(aGrammar.m_aObjectStack.back());
 aGrammar.m_aObjectStack.pop_back();
 }
 #if OSL_DEBUG_LEVEL > 0
@@ -597,7 +597,7 @@ PDFEntry* PDFReader::read( const char* pBuffer, unsigned 
int nLen )
 }
 #endif
 
-PDFEntry* PDFReader::read( const char* pFileName )
+std::unique_ptr PDFReader::read( const char* pFileName )
 {
 #ifdef _WIN32
 /* #i106583#
@@ -608,7 +608,7 @@ PDFEntry* PDFReader::read( const char* pFileName )
So for the time being bite the bullet and read the whole file.
FIXME: give Spirit 2.x another try when we upgrade boost again.
 */
-PDFEntry* pRet = nullptr;
+std::unique_ptr pRet;
 FILE* fp = fopen( pFileName, "rb" );
 if( fp )
 {
@@ -660,11 +660,11 @@ PDFEntry* PDFReader::read( const char* pFileName )
 #endif
 }
 
-PDFEntry* pRet = nullptr;
+std::unique_ptr pRet;
 unsigned int nEntries = aGrammar.m_aObjectStack.size();
 if( nEntries == 1 )
 {
-pRet = aGrammar.m_aObjectStack.back();
+pRet.reset(aGrammar.m_aObjectStack.back());
 aGrammar.m_aObjectStack.pop_back();
 }
 #if OSL_DEBUG_LEVEL > 0
diff --git a/sdext/source/pdfimport/test/pdfunzip.cxx 
b/sdext/source/pdfimport/test/pdfunzip.cxx
index ca7e5afa0b1a..7db906bb255e 100644
--- a/sdext/source/pdfimport/test/pdfunzip.cxx
+++ b/sdext/source/pdfimport/test/pdfunzip.cxx
@@ -217,10 +217,10 @@ static int handleFile( const char* pInFile, const char* 
pOutFile, const char* pP
 
 PDFReader aParser;
 int nRet = 0;
-PDFEntry* pEntry = pdfparse::PDFReader::read( pInFile );
+std::unique_ptr pEntry = pdfparse::PDFReader::read( pInFile );
 if( pEntry )
 {
-PDFFile* pPDFFile = dynamic_cast(pEntry);
+PDFFile* pPDFFile = dynamic_cast(pEntry.get());
 if( pPDFFile )
 {
 fprintf( stdout, "have a %s PDF file\n", pPDFFile->isEncrypted() ? 
"encrypted" : "unencrypted" );
@@ -231,7 +231,6 @@ static int handleFile( const char* pInFile, const char* 
pOutFile, const char* pP
 }
 else
 nRet = 20;
-delete pEntry;
 }
 return nRet;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-03-28 Thread Andrea Gelmini (via logerrit)
 connectivity/source/drivers/postgresql/pq_preparedstatement.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit bf1114a84176ff0683d72a541dfbf574e1344732
Author: Andrea Gelmini 
AuthorDate: Wed Mar 27 12:41:16 2019 +
Commit: Julien Nabet 
CommitDate: Fri Mar 29 07:05:55 2019 +0100

Fix typo

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

diff --git a/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx 
b/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx
index 808f30b03a14..13fbcdf03579 100644
--- a/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx
+++ b/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx
@@ -305,7 +305,7 @@ sal_Bool PreparedStatement::execute( )
 // Only snafu is giving the types of the parameters and
 // that it needs $1, $2, etc instead of "?"
 
-// printf( "Splitted %d %s\n" , i , str.getStr() );
+// printf( "Split %d %s\n" , i , str.getStr() );
 if( isQuoted( str ) )
 {
 buf.append( str );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Re: gsoc 2019

2019-03-28 Thread Muhammet Kara

Hello Shubham,


On 29.03.2019 01:21, Shubham Verma wrote:

Hello Dear Sir,

My name is Shubham Verma. I am a B tech 2nd-year I.T. student and I 
would like to look into working with LibreOffice for the Google Summer 
of Code 2019.



Great! Welcome to LibreOffice!





I have just recently started learning and looking into the 
contributions that I can make to GitHub issues. As this is my first 
GSOC  I wanted to know what other things I have to do to be part of an 
organization.



We don't use GitHub at all for the LibreOffice project. What you see on 
our GitHub repo is just a read-only mirror.


The answer you got on the dev mailing list still stands mostly: 
https://lists.freedesktop.org/archives/libreoffice/2019-March/082306.html






I mentioned my interest and project on which I want to work on below, 
have a look at that and tell me what will be good for me. I want to 
work on the project Additions - Tight integration of extensions like 
GHNS! and 100 paper cuts under the guidance of yours. and I want to 
ask you if you have a particular long-standing idea on which I can work.



Both sound good.

For the 100-paper-cuts idea, you will need to go thorough the list of 
the paper-cuts,[0] and select 15-20 of them, preferably related to the 
same or similar part(s) of the code-base. Write a draft with them, and 
ask for input/opinion from me or Samuel Mehrbrodt.


For the "Additions - Tight integration of extensions like GHNS!" idea, 
you will need to investigate the current situation of the extensions 
website,[1] and the extension manager, go through the initial idea and 
the blog post[2] by Heiko Tietze, try to refine the idea, and come up 
with a final design. Attending design meetings[3], and also discussing 
the idea with Heiko Tietze and me would help a lot. Beware that this is 
a very nice project idea, but might need some preliminary work to give 
it a final shape, preferably before submitting your final proposal. 
Otherwise, it might cause you to lose some time at the beginning of the 
GSoC timeline.






I would be grateful if you can tell me if there's anything else that I 
could do which would be appreciated. Any further guidance or inputs 
would certainly be of great help.



If you are going to go with the 100-paper-cuts idea, here is a nice 
easyhack of 'interesting' level: 
https://bugs.documentfoundation.org/show_bug.cgi?id=115527


Any other 'interesting' easyhack, that you feel interested, would also 
be good.







Thank you!



Best,
Muhammet


[0] https://nextcloud.documentfoundation.org/s/zraEHZxyCKBTNY7
[1] https://extensions.libreoffice.org
[2] 
https://design.blog.documentfoundation.org/2016/11/11/additions-to-libreoffice/

[3] https://pad.documentfoundation.org/p/design

--
Consultant Software Engineer
Collabora Productivity
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

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

2019-03-28 Thread Jan-Marek Glogowski (via logerrit)
 vcl/unx/gtk/gtkinst.cxx |   14 ++
 1 file changed, 6 insertions(+), 8 deletions(-)

New commits:
commit 22f5afb78aeaf6e5e9a4fb00d74833d73cef5bbc
Author: Jan-Marek Glogowski 
AuthorDate: Sat Mar 23 00:44:50 2019 +0100
Commit: Jan-Marek Glogowski 
CommitDate: Fri Mar 29 03:01:30 2019 +0100

GTK use SalYieldMutex lock arguments

The acquire and release functions already provide arguments to
release and re-acquire the lock, so use these. Also moves the
n-1 lock handling from release into acquire. This way release
doesn't need any special handling, which acquire already does.

Change-Id: If2fc92beb8e3ea1f5c078da4d8dde3ce9c774c6f
Reviewed-on: https://gerrit.libreoffice.org/69574
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/vcl/unx/gtk/gtkinst.cxx b/vcl/unx/gtk/gtkinst.cxx
index 64604ea3f92a..f18dc9457fd5 100644
--- a/vcl/unx/gtk/gtkinst.cxx
+++ b/vcl/unx/gtk/gtkinst.cxx
@@ -313,20 +313,18 @@ void GtkYieldMutex::ThreadsEnter()
 if (!yieldCounts.empty()) {
 auto n = yieldCounts.top();
 yieldCounts.pop();
-for (; n != 0; --n) {
-acquire();
-}
+assert(n > 0);
+n--;
+if (n > 0)
+acquire(n);
 }
 }
 
 void GtkYieldMutex::ThreadsLeave()
 {
 assert(m_nCount != 0);
-auto n = m_nCount - 1;
-yieldCounts.push(n);
-for (sal_uIntPtr i = 0; i != n + 1; ++i) {
-release();
-}
+yieldCounts.push(m_nCount);
+release(true);
 }
 
 std::unique_ptr GtkInstance::CreateVirtualDevice( 
SalGraphics *pG,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: include/test qadevOOo/objdsc sc/qa test/source

2019-03-28 Thread Jens Carl (via logerrit)
 include/test/container/xnamed.hxx  |2 +
 qadevOOo/objdsc/sc/com.sun.star.comp.office.ScSheetLinkObj.csv |2 -
 sc/qa/extras/scsheetlinkobj.cxx|7 +
 test/source/container/xnamed.cxx   |   14 
++
 4 files changed, 23 insertions(+), 2 deletions(-)

New commits:
commit d757b121e3f0f5de03da1be430ed51bf830dce67
Author: Jens Carl 
AuthorDate: Fri Mar 29 00:30:18 2019 +
Commit: Jens Carl 
CommitDate: Fri Mar 29 02:47:05 2019 +0100

tdf#45904 Move XNamed Java tests to C++

Move XNamed Java tests to C++ for ScSheetLinkObj.

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

diff --git a/include/test/container/xnamed.hxx 
b/include/test/container/xnamed.hxx
index 1b1a762ef8b4..de8618ce4436 100644
--- a/include/test/container/xnamed.hxx
+++ b/include/test/container/xnamed.hxx
@@ -30,6 +30,8 @@ public:
 
 void testGetName();
 void testSetName();
+// special case, here name is equal to links URL
+void testSetNameByScSheetLinkObj();
 void testSetNameThrowsException();
 
 virtual css::uno::Reference< css::uno::XInterface > init() = 0;
diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScSheetLinkObj.csv 
b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScSheetLinkObj.csv
index 2d72f6819568..63be54e69d85 100644
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScSheetLinkObj.csv
+++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScSheetLinkObj.csv
@@ -1,5 +1,3 @@
-"ScSheetLinkObj";"com::sun::star::container::XNamed";"getName()"
-"ScSheetLinkObj";"com::sun::star::container::XNamed";"setName()"
 "ScSheetLinkObj";"com::sun::star::beans::XPropertySet";"getPropertySetInfo()"
 "ScSheetLinkObj";"com::sun::star::beans::XPropertySet";"setPropertyValue()"
 "ScSheetLinkObj";"com::sun::star::beans::XPropertySet";"getPropertyValue()"
diff --git a/sc/qa/extras/scsheetlinkobj.cxx b/sc/qa/extras/scsheetlinkobj.cxx
index 2819c915b6f0..5239a3288cee 100644
--- a/sc/qa/extras/scsheetlinkobj.cxx
+++ b/sc/qa/extras/scsheetlinkobj.cxx
@@ -8,6 +8,7 @@
  */
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -31,6 +32,7 @@ namespace sc_apitest
 {
 class ScSheetLinkObj : public CalcUnoApiTest,
public apitest::SheetLink,
+   public apitest::XNamed,
public apitest::XRefreshable
 {
 public:
@@ -46,6 +48,10 @@ public:
 // SheetLink
 CPPUNIT_TEST(testSheetLinkProperties);
 
+// XNamed
+CPPUNIT_TEST(testGetName);
+CPPUNIT_TEST(testSetNameByScSheetLinkObj);
+
 // XRefreshable
 CPPUNIT_TEST(testRefreshListener);
 
@@ -57,6 +63,7 @@ private:
 
 ScSheetLinkObj::ScSheetLinkObj()
 : CalcUnoApiTest("/sc/qa/extras/testdocuments")
+, 
XNamed(m_directories.getURLFromSrc("/sc/qa/extras/testdocuments/ScSheetLinkObj.ods"))
 {
 }
 
diff --git a/test/source/container/xnamed.cxx b/test/source/container/xnamed.cxx
index c8234f6dde4f..3b8023b6bc95 100644
--- a/test/source/container/xnamed.cxx
+++ b/test/source/container/xnamed.cxx
@@ -8,6 +8,7 @@
  */
 
 #include 
+#include 
 
 #include 
 #include 
@@ -40,6 +41,19 @@ void XNamed::testSetName()
 CPPUNIT_ASSERT_EQUAL(m_aTestName, xNamed->getName());
 }
 
+void XNamed::testSetNameByScSheetLinkObj()
+{
+uno::Reference xNamed(init(), uno::UNO_QUERY_THROW);
+OUString aTestName(m_aTestName.replaceAll("ScSheetLinkObj", 
"NewScSheetLinkObj"));
+
+xNamed->setName(aTestName);
+CPPUNIT_ASSERT_EQUAL(aTestName, xNamed->getName());
+
+// restore old name
+xNamed->setName(m_aTestName);
+CPPUNIT_ASSERT_EQUAL(m_aTestName, xNamed->getName());
+}
+
 void XNamed::testSetNameThrowsException()
 {
 uno::Reference xNamed(init(), uno::UNO_QUERY_THROW);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-03-28 Thread Jens Carl (via logerrit)
 qadevOOo/objdsc/sc/com.sun.star.comp.office.ScSheetLinkObj.csv |3 -
 sc/qa/extras/scsheetlinkobj.cxx|   30 
+-
 sc/qa/extras/testdocuments/ScSheetLinkObj.ods  |binary
 3 files changed, 17 insertions(+), 16 deletions(-)

New commits:
commit 8d45d5ee399d0148672e79c379f5d29e1c8ba6f3
Author: Jens Carl 
AuthorDate: Thu Mar 28 22:21:59 2019 +
Commit: Jens Carl 
CommitDate: Fri Mar 29 01:36:42 2019 +0100

tdf#45904 Move XRefreshable Java tests to C++

Move XRefreshable Java tests to C++ for ScSheetLinkObj.

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

diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScSheetLinkObj.csv 
b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScSheetLinkObj.csv
index fb11276d69cb..2d72f6819568 100644
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScSheetLinkObj.csv
+++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScSheetLinkObj.csv
@@ -1,6 +1,3 @@
-"ScSheetLinkObj";"com::sun::star::util::XRefreshable";"refresh()"
-"ScSheetLinkObj";"com::sun::star::util::XRefreshable";"addRefreshListener()"
-"ScSheetLinkObj";"com::sun::star::util::XRefreshable";"removeRefreshListener()"
 "ScSheetLinkObj";"com::sun::star::container::XNamed";"getName()"
 "ScSheetLinkObj";"com::sun::star::container::XNamed";"setName()"
 "ScSheetLinkObj";"com::sun::star::beans::XPropertySet";"getPropertySetInfo()"
diff --git a/sc/qa/extras/scsheetlinkobj.cxx b/sc/qa/extras/scsheetlinkobj.cxx
index fbad33a9f18c..2819c915b6f0 100644
--- a/sc/qa/extras/scsheetlinkobj.cxx
+++ b/sc/qa/extras/scsheetlinkobj.cxx
@@ -9,6 +9,8 @@
 
 #include 
 #include 
+#include 
+#include 
 
 #include 
 #include 
@@ -24,12 +26,12 @@
 #include 
 
 using namespace css;
-using namespace css::uno;
-using namespace com::sun::star;
 
 namespace sc_apitest
 {
-class ScSheetLinkObj : public CalcUnoApiTest, public apitest::SheetLink
+class ScSheetLinkObj : public CalcUnoApiTest,
+   public apitest::SheetLink,
+   public apitest::XRefreshable
 {
 public:
 ScSheetLinkObj();
@@ -44,6 +46,9 @@ public:
 // SheetLink
 CPPUNIT_TEST(testSheetLinkProperties);
 
+// XRefreshable
+CPPUNIT_TEST(testRefreshListener);
+
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -57,18 +62,17 @@ ScSheetLinkObj::ScSheetLinkObj()
 
 uno::Reference ScSheetLinkObj::init()
 {
-uno::Reference xDoc(mxComponent, 
UNO_QUERY_THROW);
+uno::Reference xDoc(mxComponent, 
uno::UNO_QUERY_THROW);
 
-uno::Reference xSheets(xDoc->getSheets(), 
UNO_QUERY_THROW);
-uno::Reference xIA(xSheets, UNO_QUERY_THROW);
-uno::Reference xSheet(xIA->getByIndex(0), 
UNO_QUERY_THROW);
+uno::Reference xSheets(xDoc->getSheets(), 
uno::UNO_QUERY_THROW);
+uno::Reference xIA(xSheets, uno::UNO_QUERY_THROW);
+uno::Reference xSheet(xIA->getByIndex(0), 
uno::UNO_QUERY_THROW);
 
-uno::Reference xSL(xSheet, UNO_QUERY_THROW);
-OUString aFileURL;
-createFileURL("ScSheetLinkObj.ods", aFileURL);
-xSL->link(aFileURL, "Sheet1", "", "", sheet::SheetLinkMode_VALUE);
+uno::Reference xSL(xSheet, uno::UNO_QUERY_THROW);
+
xSL->link(m_directories.getURLFromSrc("/sc/qa/extras/testdocuments/ScSheetLinkObj.ods"),
+  "Sheet1", "", "", sheet::SheetLinkMode_VALUE);
 
-uno::Reference xPropSet(xDoc, UNO_QUERY_THROW);
+uno::Reference xPropSet(xDoc, uno::UNO_QUERY_THROW);
 uno::Reference sheetLinks;
 CPPUNIT_ASSERT(xPropSet->getPropertyValue("SheetLinks") >>= sheetLinks);
 CPPUNIT_ASSERT(sheetLinks.is());
@@ -94,7 +98,7 @@ void ScSheetLinkObj::tearDown()
 
 CPPUNIT_TEST_SUITE_REGISTRATION(ScSheetLinkObj);
 
-} // end namespace
+} // namespace sc_apitest
 
 CPPUNIT_PLUGIN_IMPLEMENT();
 
diff --git a/sc/qa/extras/testdocuments/ScSheetLinkObj.ods 
b/sc/qa/extras/testdocuments/ScSheetLinkObj.ods
new file mode 100644
index ..7f09e0d978eb
Binary files /dev/null and b/sc/qa/extras/testdocuments/ScSheetLinkObj.ods 
differ
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: include/test qadevOOo/Jar_OOoRunner.mk qadevOOo/objdsc qadevOOo/tests sc/qa test/Library_subsequenttest.mk test/source

2019-03-28 Thread Jens Carl (via logerrit)
 include/test/drawing/xshapes.hxx  |   43 +++
 qadevOOo/Jar_OOoRunner.mk |1 
 qadevOOo/objdsc/sc/com.sun.star.comp.office.ScDrawPageObj.csv |2 
 qadevOOo/tests/java/mod/_sc/ScDrawPageObj.java|  130 --
 sc/qa/extras/scdrawpageobj.cxx|9 
 sc/qa/unoapi/sc_4.sce |1 
 test/Library_subsequenttest.mk|1 
 test/source/drawing/xshapes.cxx   |   38 ++
 8 files changed, 90 insertions(+), 135 deletions(-)

New commits:
commit b99ea0ff33b78ba76d1ae436895efac490252e0f
Author: Jens Carl 
AuthorDate: Thu Mar 28 21:24:35 2019 +
Commit: Jens Carl 
CommitDate: Fri Mar 29 00:45:46 2019 +0100

tdf#45904 Move XShapes Java tests to C++

Move XShapes Java tests to C++ for ScDrawPageObj.

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

diff --git a/include/test/drawing/xshapes.hxx b/include/test/drawing/xshapes.hxx
new file mode 100644
index ..f04131dc41f7
--- /dev/null
+++ b/include/test/drawing/xshapes.hxx
@@ -0,0 +1,43 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_TEST_DRAWING_XSHAPES_HXX
+#define INCLUDED_TEST_DRAWING_XSHAPES_HXX
+
+#include 
+#include 
+
+#include 
+
+#include 
+
+namespace apitest
+{
+class OOO_DLLPUBLIC_TEST XShapes
+{
+public:
+virtual css::uno::Reference init() = 0;
+void setShape(const css::uno::Reference& r_xShape)
+{
+m_xShape = r_xShape;
+}
+
+void testAddRemove();
+
+protected:
+~XShapes() {}
+
+private:
+css::uno::Reference m_xShape;
+};
+} // namespace apitest
+
+#endif // INCLUDED_TEST_DRAWING_XSHAPES_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk
index 4bc4edde3ba3..3cb59e2c61de 100644
--- a/qadevOOo/Jar_OOoRunner.mk
+++ b/qadevOOo/Jar_OOoRunner.mk
@@ -961,7 +961,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
 qadevOOo/tests/java/mod/_sc/ScDatabaseRangeObj \
 qadevOOo/tests/java/mod/_sc/ScDataPilotItemObj \
 qadevOOo/tests/java/mod/_sc/ScDocumentConfiguration \
-qadevOOo/tests/java/mod/_sc/ScDrawPageObj \
 qadevOOo/tests/java/mod/_sc/ScHeaderFieldObj \
 qadevOOo/tests/java/mod/_sc/ScHeaderFieldsObj \
 qadevOOo/tests/java/mod/_sc/ScHeaderFooterTextCursor \
diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScDrawPageObj.csv 
b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScDrawPageObj.csv
deleted file mode 100644
index b39d7b6062be..
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScDrawPageObj.csv
+++ /dev/null
@@ -1,2 +0,0 @@
-"ScDrawPageObj";"com::sun::star::drawing::XShapes";"add()"
-"ScDrawPageObj";"com::sun::star::drawing::XShapes";"remove()"
diff --git a/qadevOOo/tests/java/mod/_sc/ScDrawPageObj.java 
b/qadevOOo/tests/java/mod/_sc/ScDrawPageObj.java
deleted file mode 100644
index 0619ca7533c4..
--- a/qadevOOo/tests/java/mod/_sc/ScDrawPageObj.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-package mod._sc;
-
-import java.io.PrintWriter;
-
-import lib.TestCase;
-import lib.TestEnvironment;
-import lib.TestParameters;
-import util.DrawTools;
-import util.InstCreator;
-import util.SOfficeFactory;
-import util.ShapeDsc;
-
-import com.sun.star.drawing.XDrawPage;
-import com.sun.star.drawing.XDrawPages;
-import com.sun.star.drawing.XDrawPagesSupplier;
-import com.sun.star.drawing.XShape;
-import com.sun.star.lang.XComponent;
-import com.sun.star.sheet.XSpreadsheetDocument;
-import com.sun.star.uno.AnyConverter;
-import com.sun.star.uno.Type;
-impo

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

2019-03-28 Thread Winfried Donkers (via logerrit)
 sc/qa/unit/data/functions/mathematical/fods/rounddown.fods |   19 ++
 sc/qa/unit/data/functions/mathematical/fods/roundup.fods   |   19 ++
 sc/source/core/inc/interpre.hxx|1 
 sc/source/core/tool/interpr2.cxx   |   37 ++---
 4 files changed, 66 insertions(+), 10 deletions(-)

New commits:
commit edcbe8c4e02a67c74ec6f85f28899431dbfa0765
Author: Winfried Donkers 
AuthorDate: Tue Mar 26 16:27:09 2019 +0100
Commit: Eike Rathke 
CommitDate: Thu Mar 28 23:18:37 2019 +0100

tdf#124286 fix annoying rounding error.

In case of ROUNDDOWN and ROUNDUP, it is possible that seemingly clear 
decimal
values are rounded unexpectedly (from the user's POV). This is caused by 
the i
decimal to binary to decimal conversions.
By rounding to 12 significanr digits before calling the round-down of -up
function, most of these unexpected roundings are eliminated.

Change-Id: Ia19181383b77e1ff40a067c4a1cea1ece0955871
Reviewed-on: https://gerrit.libreoffice.org/69762
Tested-by: Jenkins
Reviewed-by: Eike Rathke 

diff --git a/sc/qa/unit/data/functions/mathematical/fods/rounddown.fods 
b/sc/qa/unit/data/functions/mathematical/fods/rounddown.fods
index 5726eea4c9d5..0389f6348ef1 100644
--- a/sc/qa/unit/data/functions/mathematical/fods/rounddown.fods
+++ b/sc/qa/unit/data/functions/mathematical/fods/rounddown.fods
@@ -2123,6 +2123,23 @@
  
 
 
+ 
+  0.940
+ 
+ 
+  0.94
+ 
+ 
+  TRUE
+ 
+ 
+  =ROUNDDOWN(31415.92654, 3)
+ 
+ 
+ 
+ 
+
+
  
  
  
@@ -2408,4 +2425,4 @@

   
  
-
\ No newline at end of file
+
diff --git a/sc/qa/unit/data/functions/mathematical/fods/roundup.fods 
b/sc/qa/unit/data/functions/mathematical/fods/roundup.fods
index d1a56f7491cf..3fa289d4a2fc 100644
--- a/sc/qa/unit/data/functions/mathematical/fods/roundup.fods
+++ b/sc/qa/unit/data/functions/mathematical/fods/roundup.fods
@@ -2075,6 +2075,23 @@
  
 
 
+ 
+  0.060
+ 
+ 
+  0.06
+ 
+ 
+  TRUE
+ 
+ 
+  =ROUNDUP(8.06-8,2)
+ 
+ 
+ 
+ 
+
+
  
  
  
@@ -2360,4 +2377,4 @@

   
  
-
\ No newline at end of file
+
diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx
index 3fd3dcf7668c..398fe707f86f 100644
--- a/sc/source/core/inc/interpre.hxx
+++ b/sc/source/core/inc/interpre.hxx
@@ -776,6 +776,7 @@ private:
 void ScConvertOOo();
 void ScEuroConvert();
 void ScRoundSignificant();
+static void RoundSignificant( double fX, double fDigits, double &fRes );
 
 // financial functions
 void ScNPV();
diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index b47acaddaf72..b8e4baef418f 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -983,10 +983,25 @@ void ScInterpreter::RoundNumber( rtl_math_RoundingMode 
eMode )
 else
 {
 sal_Int16 nDec = GetInt16();
+double fX = GetDouble();
 if ( nGlobalError != FormulaError::NONE || nDec < -20 || nDec > 20 
)
 PushIllegalArgument();
 else
-fVal = ::rtl::math::round( GetDouble(), nDec, eMode );
+{
+if ( ( eMode == rtl_math_RoundingMode_Down ||
+   eMode == rtl_math_RoundingMode_Up ) &&
+ nDec < 12 && fmod( fX, 1.0 ) != 0.0 )
+{
+// tdf124286 : round to 12 significant digits before 
rounding
+// down or up to avoid unexpected rounding 
errors
+// caused by decimal -> binary -> decimal 
conversion
+double fRes;
+RoundSignificant( fX, 12, fRes );
+fVal = ::rtl::math::round( fRes, nDec, eMode );
+}
+else
+fVal = ::rtl::math::round( fX, nDec, eMode );
+}
 }
 PushDouble(fVal);
 }
@@ -1007,6 +1022,17 @@ void ScInterpreter::ScRoundUp()
 RoundNumber( rtl_math_RoundingMode_Up );
 }
 
+void ScInterpreter::RoundSignificant( double fX, double fDigits, double &fRes )
+{
+bool bNegVal = ( fX < 0 );
+if ( bNegVal )
+fX *= -1.0;
+double fTemp = ::rtl::math::approxFloor( log10( fX ) ) + 1.0 - fDigits;
+fRes = ::rtl::math::round( pow(10.0, -fTemp ) * fX ) * pow( 10.0, fTemp );
+if ( bNegVal )
+fRes *= -1.0;
+}
+
 // tdf#106931
 void ScInterpreter::ScRoundSignificant()
 {
@@ -1024,13 +1050,8 @@ void ScInterpreter::ScRoundSignificant()
 PushDouble( 0.0 );
 else
 {
-bool bNegVal = ( fX < 0 );
-if ( bNegVal )
-fX *= -1.0;
-double fTemp = ::rtl::math::approxFloor( log10( fX ) ) + 1.0 - 
fDigits;
-double f

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

2019-03-28 Thread Dennis Francis (via logerrit)
 sc/inc/column.hxx   |5 +--
 sc/source/core/data/column3.cxx |   66 +++-
 2 files changed, 55 insertions(+), 16 deletions(-)

New commits:
commit e7d0785a7d2a07e64dc58dee4f1b072a72e32aa5
Author: Dennis Francis 
AuthorDate: Tue Mar 26 16:50:44 2019 +0530
Commit: Eike Rathke 
CommitDate: Thu Mar 28 22:43:28 2019 +0100

tdf#120660: Populate rNewSharedRows even if no FC...

at specified position. At least in case of ScUndoPaste, during
undo operation, the content from changed area in main-document
is removed before actual undo-paste, so when cloned formula-cell
from undo-doc is inserted to main-doc, there is no "old" cell
to detach, so "rNewSharedRows" is not populated which is needed
for proper re-establishment of listeners if there are formula/
formula-groups adjacent to insertion position.

Change-Id: Id2bfb65a2a7a5abb03effbdcc4405015fddc401c
Next: fix the vector version of this case and write unit tests.
Reviewed-on: https://gerrit.libreoffice.org/69737
Tested-by: Jenkins
Reviewed-by: Eike Rathke 

diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index 15eb10b70238..b836fabef770 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -702,9 +702,10 @@ public:
 boolReservePatternCount( SCSIZE nReserve );
 private:
 
-sc::CellStoreType::iterator GetPositionToInsert( SCROW nRow, 
std::vector& rNewSharedRows );
+sc::CellStoreType::iterator GetPositionToInsert( SCROW nRow, 
std::vector& rNewSharedRows,
+ bool bInsertFormula );
 sc::CellStoreType::iterator GetPositionToInsert( const 
sc::CellStoreType::iterator& it, SCROW nRow,
- std::vector& 
rNewSharedRows );
+ std::vector& 
rNewSharedRows, bool bInsertFormula );
 
 void AttachNewFormulaCell(
 const sc::CellStoreType::iterator& itPos, SCROW nRow, ScFormulaCell& 
rCell,
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index 14c1c1424237..8e728cbe2916 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -256,9 +256,10 @@ void ScColumn::DeleteRow( SCROW nStartRow, SCSIZE nSize, 
std::vector*
 CellStorageModified();
 }
 
-sc::CellStoreType::iterator ScColumn::GetPositionToInsert( SCROW nRow, 
std::vector& rNewSharedRows )
+sc::CellStoreType::iterator ScColumn::GetPositionToInsert( SCROW nRow, 
std::vector& rNewSharedRows,
+bool bInsertFormula )
 {
-return GetPositionToInsert(maCells.begin(), nRow, rNewSharedRows);
+return GetPositionToInsert(maCells.begin(), nRow, rNewSharedRows, 
bInsertFormula);
 }
 
 void ScColumn::JoinNewFormulaCell(
@@ -534,17 +535,54 @@ void ScColumn::DetachFormulaCells( 
sc::EndListeningContext& rCxt, SCROW nRow1, S
 sc::ProcessFormula(it, maCells, nRow1, nRow2, aFunc);
 }
 
-sc::CellStoreType::iterator ScColumn::GetPositionToInsert( const 
sc::CellStoreType::iterator& it, SCROW nRow,
+static void lcl_AddFormulaGroupBoundaries(const 
sc::CellStoreType::position_type& rPos,
 std::vector& rNewSharedRows )
 {
+sc::CellStoreType::iterator itRet = rPos.first;
+if (itRet->type != sc::element_type_formula)
+return;
+
+ScFormulaCell& rFC = *sc::formula_block::at(*itRet->data, rPos.second);
+if ( rFC.IsShared() )
+{
+const SCROW nSharedTopRow = rFC.GetSharedTopRow();
+const SCROW nSharedLength = rFC.GetSharedLength();
+rNewSharedRows.push_back( nSharedTopRow);
+rNewSharedRows.push_back( nSharedTopRow + nSharedLength - 1);
+}
+else
+{
+const SCROW nRow = rFC.aPos.Row();
+rNewSharedRows.push_back( nRow);
+rNewSharedRows.push_back( nRow);
+}
+}
+
+sc::CellStoreType::iterator ScColumn::GetPositionToInsert( const 
sc::CellStoreType::iterator& it, SCROW nRow,
+std::vector& rNewSharedRows, bool bInsertFormula )
+{
 // See if we are overwriting an existing formula cell.
 sc::CellStoreType::position_type aPos = maCells.position(it, nRow);
 sc::CellStoreType::iterator itRet = aPos.first;
+
 if (itRet->type == sc::element_type_formula)
 {
 ScFormulaCell& rCell = *sc::formula_block::at(*itRet->data, 
aPos.second);
 DetachFormulaCell(aPos, rCell, rNewSharedRows);
 }
+else if (bInsertFormula && !GetDoc()->IsClipOrUndo())
+{
+if (nRow > 0)
+{
+sc::CellStoreType::position_type aPosBefore = 
maCells.position(maCells.begin(), nRow-1);
+lcl_AddFormulaGroupBoundaries(aPosBefore, rNewSharedRows);
+}
+if (nRow < MAXROW)
+{
+sc::CellStoreType::position_type aPosAfter = 
maCells.position(maCells.begin(), nRow+1);
+lcl_AddFormulaGroupBoundaries(aPosAfter, rNewSharedRows);
+}
+}
 
 return itRet;
 }
@@ -2085,7 +2123,7

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

2019-03-28 Thread Jens Carl (via logerrit)
 include/test/helper/shape.hxx |   14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

New commits:
commit ee92196179d7697a514e55774be09cbf60f2c466
Author: Jens Carl 
AuthorDate: Thu Mar 28 20:12:35 2019 +
Commit: Jens Carl 
CommitDate: Thu Mar 28 22:18:48 2019 +0100

Fix header guard and improve comments

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

diff --git a/include/test/helper/shape.hxx b/include/test/helper/shape.hxx
index 9f8bd9e8b73b..e4322bec1357 100644
--- a/include/test/helper/shape.hxx
+++ b/include/test/helper/shape.hxx
@@ -7,8 +7,8 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#ifndef INCLUDED_TEST_HELPER_SHAPEFACTORY_HXX
-#define INCLUDED_TEST_HELPER_SHAPEFACTORY_HXX
+#ifndef INCLUDED_TEST_HELPER_SHAPE_HXX
+#define INCLUDED_TEST_HELPER_SHAPE_HXX
 
 #include 
 #include 
@@ -33,7 +33,7 @@ namespace shape
  * @param nYThe y-position of the shape.
  * @param nHeight   The height of the shape.
  * @param nWidthThe width of the shape.
- * @return  The create XShape.
+ * @return  The created XShape.
  */
 css::uno::Reference
 OOO_DLLPUBLIC_TEST createEllipse(const 
css::uno::Reference& r_xComponent,
@@ -47,7 +47,7 @@ css::uno::Reference
  * @param nYThe y-position of the shape.
  * @param nHeight   The height of the shape.
  * @param nWidthThe width of the shape.
- * @return  The create XShape.
+ * @return  The created XShape.
  */
 css::uno::Reference
 OOO_DLLPUBLIC_TEST createLine(const 
css::uno::Reference& r_xComponent,
@@ -61,7 +61,7 @@ css::uno::Reference
  * @param nYThe y-position of the shape.
  * @param nHeight   The height of the shape.
  * @param nWidthThe width of the shape.
- * @return  The create XShape.
+ * @return  The created XShape.
  */
 css::uno::Reference OOO_DLLPUBLIC_TEST
 createRectangle(const css::uno::Reference& 
r_xComponent, const sal_Int32 nX,
@@ -75,7 +75,7 @@ createRectangle(const 
css::uno::Reference& r_xComponent,
  * @param nYThe y-position of the shape.
  * @param nHeight   The height of the shape.
  * @param nWidthThe width of the shape.
- * @return  The create XShape.
+ * @return  The created XShape.
  */
 css::uno::Reference
 OOO_DLLPUBLIC_TEST createShape(const 
css::uno::Reference& r_xComponent,
@@ -86,6 +86,6 @@ css::uno::Reference
 } // namespace helper
 } // namespace apitest
 
-#endif // INCLUDED_TEST_HELPER_SHAPEFACTORY_HXX
+#endif // INCLUDED_TEST_HELPER_SHAPE_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-03-28 Thread Caolán McNamara (via logerrit)
 vcl/inc/unx/gtk/gtkframe.hxx  |1 +
 vcl/unx/gtk/gtksalframe.cxx   |   16 
 vcl/unx/gtk/gtksalmenu.cxx|   14 ++
 vcl/unx/gtk3/gtk3gtkframe.cxx |   19 +++
 vcl/unx/gtk3/gtk3gtkinst.cxx  |8 
 5 files changed, 46 insertions(+), 12 deletions(-)

New commits:
commit d8064c1f50fca388d2701a9702be694330ff0bc5
Author: Caolán McNamara 
AuthorDate: Thu Mar 28 16:40:43 2019 +
Commit: Caolán McNamara 
CommitDate: Thu Mar 28 22:07:32 2019 +0100

mapped tooltip before attempting to show a menu is a problem

under wayland, see https://gitlab.gnome.org/GNOME/gtk/issues/1785

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

diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
index 9d4f458a75ae..f0d2bd96bc08 100644
--- a/vcl/inc/unx/gtk/gtkframe.hxx
+++ b/vcl/inc/unx/gtk/gtkframe.hxx
@@ -558,6 +558,7 @@ public:
 static sal_uInt16   GetKeyCode(guint nKeyVal);
 static guintGetKeyValFor(GdkKeymap* pKeyMap, guint16 
hardware_keycode, guint8 group);
 static sal_uInt16   GetKeyModCode(guint nState);
+static GdkEvent*makeFakeKeyPress(GtkWidget* pWidget);
 };
 
 #define OOO_TYPE_FIXED ooo_fixed_get_type()
diff --git a/vcl/unx/gtk/gtksalframe.cxx b/vcl/unx/gtk/gtksalframe.cxx
index cdb07829976e..cc95a9f94e51 100644
--- a/vcl/unx/gtk/gtksalframe.cxx
+++ b/vcl/unx/gtk/gtksalframe.cxx
@@ -3614,4 +3614,20 @@ sal_uIntPtr GtkSalFrame::GetNativeWindowHandle()
 return widget_get_xid(m_pWindow);
 }
 
+GdkEvent* GtkSalFrame::makeFakeKeyPress(GtkWidget* pWidget)
+{
+GdkEvent *event = gdk_event_new(GDK_KEY_PRESS);
+event->key.window = 
GDK_WINDOW(g_object_ref(gtk_widget_get_window(pWidget)));
+event->key.send_event = 1 /* TRUE */;
+event->key.time = gtk_get_current_event_time();
+event->key.state = 0;
+event->key.keyval = 0;
+event->key.length = 0;
+event->key.string = nullptr;
+event->key.hardware_keycode = 0;
+event->key.group = 0;
+event->key.is_modifier = false;
+return event;
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/gtk/gtksalmenu.cxx b/vcl/unx/gtk/gtksalmenu.cxx
index 27ba8096bce8..2f85e0710043 100644
--- a/vcl/unx/gtk/gtksalmenu.cxx
+++ b/vcl/unx/gtk/gtksalmenu.cxx
@@ -771,18 +771,8 @@ bool GtkSalMenu::TakeFocus()
 //activated via the keyboard. Doesn't do anything except cause the gtk
 //menubar "keyboard_mode" member to get set to true, so typically mnemonics
 //are shown which will serve as indication that the menubar has focus
-//(given that we wnt to show it with no menus popped down)
-GdkEvent *event = gdk_event_new(GDK_KEY_PRESS);
-event->key.window = 
GDK_WINDOW(g_object_ref(gtk_widget_get_window(mpMenuBarWidget)));
-event->key.send_event = 1 /* TRUE */;
-event->key.time = gtk_get_current_event_time();
-event->key.state = 0;
-event->key.keyval = 0;
-event->key.length = 0;
-event->key.string = nullptr;
-event->key.hardware_keycode = 0;
-event->key.group = 0;
-event->key.is_modifier = false;
+//(given that we want to show it with no menus popped down)
+GdkEvent *event = GtkSalFrame::makeFakeKeyPress(mpMenuBarWidget);
 gtk_widget_event(mpMenuBarWidget, event);
 gdk_event_free(event);
 
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index b1311e207386..ed9895dabdd2 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -4374,4 +4374,23 @@ void 
GtkSalFrame::nopaint_container_resize_children(GtkContainer *pContainer)
 m_bSalObjectSetPosSize = false;
 }
 
+GdkEvent* GtkSalFrame::makeFakeKeyPress(GtkWidget* pWidget)
+{
+GdkEvent *event = gdk_event_new(GDK_KEY_PRESS);
+event->key.window = 
GDK_WINDOW(g_object_ref(gtk_widget_get_window(pWidget)));
+
+GdkSeat *seat = 
gdk_display_get_default_seat(gtk_widget_get_display(pWidget));
+gdk_event_set_device(event, gdk_seat_get_keyboard(seat));
+event->key.send_event = 1 /* TRUE */;
+event->key.time = gtk_get_current_event_time();
+event->key.state = 0;
+event->key.keyval = 0;
+event->key.length = 0;
+event->key.string = nullptr;
+event->key.hardware_keycode = 0;
+event->key.group = 0;
+event->key.is_modifier = false;
+return event;
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 06f0836df779..3b740f7a8985 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -4764,6 +4764,14 @@ public:
static_cast(rRect.GetWidth()), 
static_cast(rRect.GetHeight())};
 if (AllSettings::GetLayoutRTL())
 aRect.x = gtk_widget_get_allocated_width(pWidget

[Libreoffice-commits] core.git: extras/source include/sfx2 include/svx include/vcl sd/source sfx2/source sfx2/uiconfig solenv/bin svx/source sw/source vcl/source vcl/unx

2019-03-28 Thread Caolán McNamara (via logerrit)
 extras/source/glade/libreoffice-catalog.xml.in |7 
 include/sfx2/emojiviewitem.hxx |2 
 include/sfx2/inputdlg.hxx  |2 
 include/sfx2/recentdocsviewitem.hxx|9 
 include/sfx2/templatedlg.hxx   |   86 -
 include/sfx2/templatelocalview.hxx |  121 ++
 include/sfx2/templateviewitem.hxx  |2 
 include/sfx2/thumbnailview.hxx |  184 +++
 include/sfx2/thumbnailviewitem.hxx |6 
 include/svx/SvxPresetListBox.hxx   |2 
 include/svx/charmap.hxx|4 
 include/vcl/customweld.hxx |8 
 include/vcl/layout.hxx |6 
 include/vcl/weld.hxx   |   22 
 sd/source/ui/app/sdmod1.cxx|   11 
 sfx2/source/appl/appopen.cxx   |6 
 sfx2/source/appl/appserv.cxx   |4 
 sfx2/source/control/emojiviewitem.cxx  |2 
 sfx2/source/control/recentdocsviewitem.cxx |7 
 sfx2/source/control/templatelocalview.cxx  |  888 ++
 sfx2/source/control/templatesearchview.cxx |  143 +--
 sfx2/source/control/templateviewitem.cxx   |2 
 sfx2/source/control/thumbnailview.cxx  | 1176 -
 sfx2/source/control/thumbnailviewacc.cxx   |  560 +++
 sfx2/source/control/thumbnailviewacc.hxx   |  112 ++
 sfx2/source/control/thumbnailviewitem.cxx  |2 
 sfx2/source/dialog/inputdlg.cxx|2 
 sfx2/source/doc/templatedlg.cxx|  690 ++
 sfx2/source/inc/templatesearchview.hxx |   13 
 sfx2/source/inc/templatesearchviewitem.hxx |2 
 sfx2/uiconfig/ui/templatedlg.ui|  170 ++-
 solenv/bin/native-code.py  |2 
 svx/source/dialog/charmap.cxx  |4 
 svx/source/tbxctrls/SvxPresetListBox.cxx   |5 
 sw/source/uibase/uiview/view2.cxx  |4 
 vcl/source/app/customweld.cxx  |2 
 vcl/source/app/salvtables.cxx  |   76 +
 vcl/unx/gtk3/gtk3gtkinst.cxx   |  109 +-
 38 files changed, 3785 insertions(+), 668 deletions(-)

New commits:
commit 3e078e17ee2144fb976a7e6b9227152113cea0d4
Author: Caolán McNamara 
AuthorDate: Tue Mar 26 16:27:17 2019 +
Commit: Caolán McNamara 
CommitDate: Thu Mar 28 22:07:06 2019 +0100

weld SfxTemplateManagerDlg

like expert configuration change the gear menu not to display a down 
indicator

and use CommandEvent to distinguish mouse/non-mouse context menus

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

diff --git a/extras/source/glade/libreoffice-catalog.xml.in 
b/extras/source/glade/libreoffice-catalog.xml.in
index abeb0910a2dc..57106338489d 100644
--- a/extras/source/glade/libreoffice-catalog.xml.in
+++ b/extras/source/glade/libreoffice-catalog.xml.in
@@ -134,10 +134,6 @@
 generic-name="Gamma Grid Widget" 
parent="GtkDrawingArea"
 icon-name="widget-gtk-drawingarea"/>
 
-
-
 
@@ -437,9 +433,6 @@
 
-
 
  m_xHelp;
 
 public:
-InputDialog(weld::Window* pParent, const OUString &rLabelText);
+InputDialog(weld::Widget* pParent, const OUString &rLabelText);
 OUString GetEntryText() const;
 void SetEntryText(const OUString& rStr);
 void HideHelpBtn();
diff --git a/include/sfx2/recentdocsviewitem.hxx 
b/include/sfx2/recentdocsviewitem.hxx
index 8320d4710d81..2ee90de19f03 100644
--- a/include/sfx2/recentdocsviewitem.hxx
+++ b/include/sfx2/recentdocsviewitem.hxx
@@ -12,10 +12,15 @@
 
 #include 
 
+namespace sfx2
+{
+class RecentDocsView;
+}
+
 class RecentDocsViewItem final : public ThumbnailViewItem
 {
 public:
-RecentDocsViewItem(ThumbnailView &rView, const OUString &rURL,
+RecentDocsViewItem(sfx2::RecentDocsView &rView, const OUString &rURL,
 const OUString &rTitle, const BitmapEx& rThumbnail, sal_uInt16 nId, 
long nThumbnailSize);
 
 /** Updates own highlight status based on the aPoint position.
@@ -38,6 +43,8 @@ public:
 void OpenDocument();
 
 private:
+sfx2::RecentDocsView& mrParentView;
+
 /// Return area where is the icon to remove document from the recent 
documents.
 tools::Rectangle getRemoveIconArea() const;
 
diff --git a/include/sfx2/templatedlg.hxx b/include/sfx2/templatedlg.hxx
index 7f730c50161d..5e8a12853419 100644
--- a/include/sfx2/templatedlg.hxx
+++ b/include/sfx2/templatedlg.hxx
@@ -38,18 +38,16 @@ namespace com {
 }   }   }
 }
 
-class SFX2_DLLPUBLIC SfxTemplateManagerDlg : public ModalDialog
+class SFX2_DLLPUBLIC SfxTemplateManagerDlg : public 
weld::GenericDialogController
 {
 typedef bool (*selection_cmp_fn)(const ThumbnailViewItem*

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

2019-03-28 Thread Jens Carl (via logerrit)
 test/inc/helper/form.hxx|   17 -
 test/source/helper/form.cxx |   25 +++--
 test/source/view/xcontrolaccess.cxx |5 +++--
 3 files changed, 30 insertions(+), 17 deletions(-)

New commits:
commit 1e2868296730d3548574f61a3c6e323aa5c0598a
Author: Jens Carl 
AuthorDate: Wed Mar 27 19:34:16 2019 +
Commit: Jens Carl 
CommitDate: Thu Mar 28 19:55:35 2019 +0100

Be consistent with namespaces and parameter order for UNO Api helpers

Have this file the same namespaces as the new introduced helpers in
include/test/helper/shape.hxx and also change the order of the parameter
be the same to avoid confusion.

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

diff --git a/test/inc/helper/form.hxx b/test/inc/helper/form.hxx
index 173306b118c8..271f06be0b7e 100644
--- a/test/inc/helper/form.hxx
+++ b/test/inc/helper/form.hxx
@@ -22,19 +22,26 @@
 
 namespace apitest
 {
+namespace helper
+{
+namespace form
+{
 /** @brief Create a XControlShape
  *
  * @param r_xComponent  The document.
- * @param nHeight   The height of the shape.
- * @param nWidthThe width of the shape.
+ * @param r_aKind   The kind of the shape.
  * @param nXThe x-position of the shape.
  * @param nYThe y-position of the shape.
- * @param r_aKind   The kind of the shape.
+ * @param nHeight   The height of the shape.
+ * @param nWidthThe width of the shape.
+ * @return  The create XControlShape.
  */
 css::uno::Reference OOO_DLLPUBLIC_TEST 
createControlShape(
-const css::uno::Reference& r_xComponent, const 
sal_Int32 nHeight,
-const sal_Int32 nWidth, const sal_Int32 nX, const sal_Int32 nY, const 
OUString& r_aKind);
+const css::uno::Reference& r_xComponent, const 
OUString& r_aKind,
+const sal_Int32 nX, const sal_Int32 nY, const sal_Int32 nHeight, const 
sal_Int32 nWidth);
 
+} // namespace form
+} // namespace helper
 } // namespace apitest
 
 #endif // INCLUDED_TEST_INC_HELPER_FORM_HXX
diff --git a/test/source/helper/form.cxx b/test/source/helper/form.cxx
index 47da3565f79d..610bd43f1a51 100644
--- a/test/source/helper/form.cxx
+++ b/test/source/helper/form.cxx
@@ -8,6 +8,8 @@
  */
 
 #include 
+#include 
+#include 
 
 #include 
 #include 
@@ -16,19 +18,20 @@
 #include 
 #include 
 
+#include 
 #include 
 
-#include 
-#include 
-
 using namespace css;
 
 namespace apitest
 {
-uno::Reference
-createControlShape(const uno::Reference& r_xComponent, const 
sal_Int32 nHeight,
-   const sal_Int32 nWidth, const sal_Int32 nX, const sal_Int32 
nY,
-   const OUString& r_aKind)
+namespace helper
+{
+namespace form
+{
+uno::Reference OOO_DLLPUBLIC_TEST createControlShape(
+const uno::Reference& r_xComponent, const OUString& 
r_aKind,
+const sal_Int32 nX, const sal_Int32 nY, const sal_Int32 nHeight, const 
sal_Int32 nWidth)
 {
 uno::Reference xMSF(r_xComponent, 
uno::UNO_QUERY_THROW);
 
@@ -38,9 +41,8 @@ createControlShape(const uno::Reference& 
r_xComponent, const s
 uno::Reference aComponent(
 xMSF->createInstance("com.sun.star.form.component." + r_aKind), 
uno::UNO_QUERY_THROW);
 uno::Reference xPropertySet(aComponent, 
uno::UNO_QUERY_THROW);
-uno::Any aValue;
-aValue <<= "com.sun.star.form.control." + r_aKind;
-xPropertySet->setPropertyValue("DefaultControl", aValue);
+xPropertySet->setPropertyValue("DefaultControl",
+   uno::makeAny("com.sun.star.form.control." + 
r_aKind));
 uno::Reference xControlModel(aComponent, 
uno::UNO_QUERY_THROW);
 
 xControlShape->setSize(awt::Size(nHeight, nWidth));
@@ -50,6 +52,9 @@ createControlShape(const uno::Reference& 
r_xComponent, const s
 
 return xControlShape;
 }
+
+} // namespace form
+} // namespace helper
 } // namespace apitest
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/test/source/view/xcontrolaccess.cxx 
b/test/source/view/xcontrolaccess.cxx
index 29ca1fa339aa..5f00e88a5f63 100644
--- a/test/source/view/xcontrolaccess.cxx
+++ b/test/source/view/xcontrolaccess.cxx
@@ -21,10 +21,11 @@
 #include 
 #include 
 
+#include 
+
 #include 
 
 using namespace css;
-using namespace css::uno;
 
 namespace apitest
 {
@@ -39,7 +40,7 @@ void XControlAccess::testGetControl()
 
 uno::Reference xShapes(xDP, uno::UNO_QUERY_THROW);
 uno::Reference xShape(
-createControlShape(xComponent, 100, 100, 1, 5, 
"CommandButton"),
+helper::form::createControlShape(xComponent, "CommandButton", 1, 
5, 100, 100),
 uno::UNO_QUERY_THROW);
 
 xShapes->add(xShape);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commi

Re: [Libreoffice-qa] minutes of ESC call ...

2019-03-28 Thread Markus Mohrhard
Hey Michael, all,

On Fri, Mar 29, 2019 at 12:44 AM Michael Meeks 
wrote:

> Hi Markus,
>
> On 28/03/2019 16:13, Markus Mohrhard wrote:
> > so in general the fastest way to get some feedback might be to ping me
> > directly and give me some time to look into such issues. While I still
> > have quite bad internet and can't do any uploads of symbol information I
> > can still at least quickly inspect the problem.
>
> That would be wonderful ! =)
>


This one was caused by a missing symbol extraction after symbol upload. I
could not find any reason in the log files that explains why the upload of
the symbols would succeed but the unziping of the uploaded file would fail.
As a result the symbol information for most of our own symbols were missing.

After a manual extraction I can see at least most of the libmerged symbols
being resolved when I call minidump_stackwalk manually on the server.
However, the mentioned symbol information issue still remains and in some
cases where the top level stack frame is in a system library we still miss
some resolved stack frames.

Regards,
Markus


> > One general problem that we have is that we have no recent windows debug
> > symbol information. I tried to move that service from my local machine
> > to the server during the Munich hackfest but did not manage to replicate
> > my setup well enough that valid symbol information are generated. Sadly
> > this has some knock-on effects as can be seen by some of the unresolved
> > crash reports. At least on Windows getting a backtrace requires that
> > enough of the stack pointers can be guessed from the dumped stack. This
> > relies to some to degree on the system symbol informations.
>
> Interesting.
>
> > As soon as I have a non-mobile internet connection again I'll either run
> > a full set of system symbol download on my machine or finish the work on
> > moving that service to the server.
>
> Much appreciated ! our top crasher is (obviously) the one without
> any
> symbol information that lurks in libmerged currently ;-)
>
> Regards,
>
> Michael.
>
> --
> michael.me...@collabora.com <><, GM Collabora Productivity
> Hangout: mejme...@gmail.com, Skype: mmeeks
> (M) +44 7795 666 147 - timezone usually UK / Europe
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Re: [Libreoffice-qa] minutes of ESC call ...

2019-03-28 Thread Michael Meeks
Hi Markus,

On 28/03/2019 16:13, Markus Mohrhard wrote:
> so in general the fastest way to get some feedback might be to ping me
> directly and give me some time to look into such issues. While I still
> have quite bad internet and can't do any uploads of symbol information I
> can still at least quickly inspect the problem.

That would be wonderful ! =)

> One general problem that we have is that we have no recent windows debug
> symbol information. I tried to move that service from my local machine
> to the server during the Munich hackfest but did not manage to replicate
> my setup well enough that valid symbol information are generated. Sadly
> this has some knock-on effects as can be seen by some of the unresolved
> crash reports. At least on Windows getting a backtrace requires that
> enough of the stack pointers can be guessed from the dumped stack. This
> relies to some to degree on the system symbol informations.

Interesting.

> As soon as I have a non-mobile internet connection again I'll either run
> a full set of system symbol download on my machine or finish the work on
> moving that service to the server.

Much appreciated ! our top crasher is (obviously) the one without any
symbol information that lurks in libmerged currently ;-)

Regards,

Michael.

-- 
michael.me...@collabora.com <><, GM Collabora Productivity
Hangout: mejme...@gmail.com, Skype: mmeeks
(M) +44 7795 666 147 - timezone usually UK / Europe
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

[Libreoffice-commits] core.git: Branch 'feature/item_refactor' - 0 commits -

2019-03-28 Thread (via logerrit)
Rebased ref, commits from common ancestor:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Changes to 'feature/item_refactor2'

2019-03-28 Thread Armin Le Grand (via logerrit)
New branch 'feature/item_refactor2' available with the following commits:
commit 8cb2a04d6c2f6a93a32c642cbeaeab71037fc622
Author: Armin Le Grand 
Date:   Thu Mar 28 17:15:06 2019 +0100

WIP: continued replacement Item::IBase, ::ISet stuff

Completely changed SbxItem to new mechanisms, to do
so created Item::Sbx implementation, adapted all usages
of SbxItem and added quirte some mechanisms to do so.
Gloal was to completely run (unchanged) wothout the original
SbxItem - that was achieved and can be seen as proof of concept
and example how to acto in doing so.
Adapted ::StateChanged to include a Item::ItemBase::SharedPtr
to an Item for future compatibility - will/should be completely
changed when transition is done.
Added to SfxItemSet which is still used as transport mechanism
the ability to get on-demands of ::ItemSet and ::SlotSet to have
a source/target for the new Items.
Adapted the IDLC compiler to be able to generate needed new stuff
on demand, together with new SlotItems as alternative to
SfxPoolItems. Currently both in place, the latter can go after
transition. Check for CreateSlotItem.
Needed to add a static ::CreateFromAny with an array of arguments
to keep new ::Item implementations read-only, adapted usages.
Added a new ExecuteList method that uses SlotItems/SlotSets.
Added some I2TM tags which I will use to mark stuff in transit as
a uniquely greppable tag (temporary).

Change-Id: If98d20fc08abe9cd6e186c233f2c90883c5e47d3

commit e0e5ac22619c5e3b5b64a1ef243066089ddf7f5b
Author: Armin Le Grand 
Date:   Thu Mar 28 10:48:56 2019 +0100

WIP: continued replacement Item::IBase, ::ISet stuff

Added SlotSet stuff
Adapted ::StateChanged to hand around SlotItem info
Adapted SlotItem creation
CreateItem -> CreateSfxPoolItem
Added CreateSlotItem handling where CreateSfxPoolItem
did something - not complete
Note: May change all that to use StateAndItem due to
StateChanged also using/needing a SfxItemState, but better
to do that when Items are transfered.
Note: SlotItem in ::StateChanged is not yet used anywhere,
but will replace SfxPoolItem there in the long run

Change-Id: Ie11e07ecb814ce46bafa17cb9b97d58c090cab85

commit c721df42bb2d04a594b453d1ac5c39a7a77c
Author: Armin Le Grand 
Date:   Wed Mar 20 13:57:39 2019 +0100

WIP: Started replacement Item::IBase, ::ISet stuff

To have a base for replacing SfxItem* stuff in the long term
I started to implement some basic stuff, please see comments in
new part tree item and includes and testfiles to see how it
works. Extended docu will be done during (hopefully) progressing

Change-Id: I59245f9ed0897943e72bfd53f8d1136a30f2db16

commit 91fe1f2de88ace126feff269a4d0b2749512292b
Author: Armin Le Grand 
Date:   Wed Mar 20 13:57:39 2019 +0100

WIP: Started replacement Item::IBase, ::ISet stuff

To have a base for replacing SfxItem* stuff in the long term
I started to implement some basic stuff, please see comments in
new part tree item and includes and testfiles to see how it
works. Extended docu will be done during (hopefully) progressing

Change-Id: I59245f9ed0897943e72bfd53f8d1136a30f2db16

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

Re: [Libreoffice-qa] minutes of ESC call ...

2019-03-28 Thread Markus Mohrhard
Hey,


* Crash Reporting (Xisco)
>   + http://crashreport.libreoffice.org/stats/version/6.1.4.2
> + 837 (+46)
>   + http://crashreport.libreoffice.org/stats/version/6.1.5.2
> + 875 634 (+241)
>   + http://crashreport.libreoffice.org/stats/version/6.2.0.3
> + 1295 (+59)
>   + http://crashreport.libreoffice.org/stats/version/6.2.1.2
> + 1227 (+79)
>   + http://crashreport.libreoffice.org/stats/version/6.2.2.2
> + 724 (-)
>   + looks good for latest version, still have a symbol issue
>   + not a generic issue with all reports (Christian)
> + just a display issue – all on the same category
> + all current versions should be handled correctly.
> + when searching for crash reports in libmerged: plenty have
>   symbols resolved.
> + problem is 6.2.2.2 (Michael)
>
> http://crashreport.libreoffice.org/stats/crash_details/49887f06-5a2e-49ad-baf0-9e542d00c08e
>+ 322 of these for 6.2.2.2 alone
>+ are these just the not-yet-processed ones ? (Miklos)
>   + as in those are from today.
>+ from the 25th first sampled: (Michael)
>
> http://crashreport.libreoffice.org/stats/crash_details/f58d07b9-4e38-480a-b0a4-8f92a2a4170e
> AI:+ take a look at it (Christian)
>
>
so in general the fastest way to get some feedback might be to ping me
directly and give me some time to look into such issues. While I still have
quite bad internet and can't do any uploads of symbol information I can
still at least quickly inspect the problem.

One general problem that we have is that we have no recent windows debug
symbol information. I tried to move that service from my local machine to
the server during the Munich hackfest but did not manage to replicate my
setup well enough that valid symbol information are generated. Sadly this
has some knock-on effects as can be seen by some of the unresolved crash
reports. At least on Windows getting a backtrace requires that enough of
the stack pointers can be guessed from the dumped stack. This relies to
some to degree on the system symbol informations.

As soon as I have a non-mobile internet connection again I'll either run a
full set of system symbol download on my machine or finish the work on
moving that service to the server.

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

[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-1' - 80 commits - configure.ac cui/source dbaccess/source desktop/source download.lst editeng/source external/apr external/cairo extern

2019-03-28 Thread Thorsten Behrens (via logerrit)
Rebased ref, commits from common ancestor:
commit 26edd27f129b0f5948825c5dd434f612e27619eb
Author: Thorsten Behrens 
AuthorDate: Wed Jul 18 18:06:44 2018 +0200
Commit: Thorsten Behrens 
CommitDate: Thu Mar 28 16:48:48 2019 +0100

Default OpenGL to off on all platforms

Change-Id: Ide04d3b37b9fabb64d514fd87acbdfe9e49e6727

diff --git a/officecfg/registry/data/org/openoffice/Office/Common.xcu 
b/officecfg/registry/data/org/openoffice/Office/Common.xcu
index 26d1ba053a1e..1e001efd4a12 100644
--- a/officecfg/registry/data/org/openoffice/Office/Common.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Common.xcu
@@ -59,9 +59,7 @@
   
   
 
-  false
-  false
-  true
+  false
 
   
   
commit 9113c297808e3b00a0f97fee485b379b3fa1db95
Author: Samuel Mehrbrodt 
AuthorDate: Thu Jan 12 16:46:45 2017 +0100
Commit: Thorsten Behrens 
CommitDate: Thu Mar 28 16:48:48 2019 +0100

Disable crash reporter UI

Change-Id: I8106ec674080ede7072581dab2e6700040de5828
(cherry picked from commit b981aa30c3eb5ddd0cf6c35e4c37ab687667f71b)

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index c83d424f8a30..e7a4f82ba081 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -913,7 +913,8 @@ bool crashReportInfoExists()
 #if HAVE_FEATURE_BREAKPAD
 void handleCrashReport()
 {
-static const char SERVICENAME_CRASHREPORT[] = 
"com.sun.star.comp.svx.CrashReportUI";
+// Don't show the dialog since we don't offer upload - only want the dumps
+/*static const char SERVICENAME_CRASHREPORT[] = 
"com.sun.star.comp.svx.CrashReportUI";
 
 css::uno::Reference< css::uno::XComponentContext > xContext = 
::comphelper::getProcessComponentContext();
 
@@ -927,7 +928,7 @@ void handleCrashReport()
 css::util::URL aURL;
 css::uno::Any aRet = xRecoveryUI->dispatchWithReturnValue(aURL, 
css::uno::Sequence< css::beans::PropertyValue >());
 bool bRet = false;
-aRet >>= bRet;
+aRet >>= bRet;*/
 }
 #endif
 
commit 2e273fe7ca8d852e3d1999557ae02c43855c0ddd
Author: Katarina Behrens 
AuthorDate: Wed Feb 10 14:42:18 2016 +0100
Commit: Thorsten Behrens 
CommitDate: Thu Mar 28 16:48:48 2019 +0100

Branded images for msi installer

The sizes are 122 x 234, 374 x 44 installed units respectively, according to

http://msdn.microsoft.com/de-de/library/windows/desktop/aa369490%28v=vs.85%29.aspx

it is 163x312, 499x58 pixels at 96 dpi. I bumped dpi to 120 and it still 
looks pixelated,
but it's as good as it gets.

For better results, we need different graphics, with less fine details 
given the very limited
space

Change-Id: I4a7eafed16fd79f377d27afa8151cfab614b464b

diff --git 
a/instsetoo_native/inc_common/windows/msi_templates/Binary/Banner.bmp 
b/instsetoo_native/inc_common/windows/msi_templates/Binary/Banner.bmp
index 5a163cf86c23..471eea4c22e6 100644
Binary files 
a/instsetoo_native/inc_common/windows/msi_templates/Binary/Banner.bmp and 
b/instsetoo_native/inc_common/windows/msi_templates/Binary/Banner.bmp differ
diff --git a/instsetoo_native/inc_common/windows/msi_templates/Binary/Image.bmp 
b/instsetoo_native/inc_common/windows/msi_templates/Binary/Image.bmp
index b4210d131ba2..2703670952bd 100644
Binary files 
a/instsetoo_native/inc_common/windows/msi_templates/Binary/Image.bmp and 
b/instsetoo_native/inc_common/windows/msi_templates/Binary/Image.bmp differ
commit c2ea4faa7e77d66b8e9c00dd7b71dca97227dfea
Author: Katarina Behrens 
AuthorDate: Tue Feb 9 11:09:30 2016 +0100
Commit: Thorsten Behrens 
CommitDate: Thu Mar 28 16:48:48 2019 +0100

Branded application icons

sadly, this doesn't replace Windows taskbar icon, that must be living 
somewhere
else. It works on Linux though.

 Conflicts:
icon-themes/galaxy/res/main128.png
icon-themes/galaxy/res/mainapp_16.png
icon-themes/galaxy/res/mainapp_16_8.png
icon-themes/galaxy/res/mainapp_32.png
icon-themes/galaxy/res/mainapp_32_8.png
icon-themes/galaxy/res/mainapp_48_8.png

Change-Id: I028fc68d96f02113622c5e1ec3ed830ac797be0b

diff --git a/icon-themes/galaxy/res/main128.png 
b/icon-themes/galaxy/res/main128.png
new file mode 100644
index ..818b7330c25b
Binary files /dev/null and b/icon-themes/galaxy/res/main128.png differ
diff --git a/icon-themes/galaxy/res/mainapp_48_8.png 
b/icon-themes/galaxy/res/mainapp_48_8.png
new file mode 100644
index ..562ea23e89c2
Binary files /dev/null and b/icon-themes/galaxy/res/mainapp_48_8.png differ
diff --git a/icon-themes/tango/res/mainapp_16.png 
b/icon-themes/tango/res/mainapp_16.png
index 4a96735b6bb6..13945eeadfd4 100644
Binary files a/icon-themes/tango/res/mainapp_16.png and 
b/icon-themes/tango/res/mainapp_16.png differ
diff --git a/icon-themes/tango/res/mainapp_16_8.png 
b/icon-themes/tango/res/mainapp_16_8.png
index 94abb952996b..13945eeadfd4 100644

minutes of ESC call ...

2019-03-28 Thread Michael Meeks
* Present:
+ Caolan, Miklos, Michael M, Michael W, Heiko, Kendy, Christian,
  Olivier, Xisco

* Completed Action Items:
+ commit access for Grzegorz Araminowicz (Miklos)
+ next time we see write_tests5 fail - chop out that sub-test (Miklos)
  [ keeping an eye on it ]

* Pending Action Items:
+ talk to Tor / Nicolas if avoiding UNCONFIRMED for iOS makes sense (Miklos)
  [ number to zero – so perhaps solved ? ]
+ add monitoring for build bot daily failure rates (Christian)
  [ not applied yet, but monitoring jenkins build slaves due to
connectivity issues at Manitu ]
+ review/update GSOC ideas page! (Mentors)
  + https://wiki.documentfoundation.org/Development/GSoC/Ideas
+ looking for mentor for idea “Calc Functions Sidebar” (Heiko)
  + 
https://lists.freedesktop.org/archives/libreoffice/2019-March/082315.html
  + mentors much appreciated.

* Release Engineering update (Christian)
+ 6.2.3 rc1 → tagging this evening.
+ 6.1.6 rc1: April 9 week after next.
+ 6.3 alpha1: early May
+ Remotes → no updates
+ Android viewer
   + Maven repo is being updated (Christian)
+ Online:

* Documentation (Olivier)
+ New Help
+ Fixes support for IE11 (buovjaga, himajin10)
+ Added module name to Contents links (ohallot)
+ housekeeping (A. Gelmini)
+ Helpcontent2
+ No news
+ Guides
+ more chapters reviewed for Calc Guide
+ Ch 7 (ohallot)
+ Ch 2 (D. Barton)
+ Ch 6 (Jean Weber)
+ Need a new chapter for Calc Statistics
+ anyone interested?

* UX Update (Heiko)
+ Bugzilla (topicUI) statistics
246(246) (topicUI) bugs open, 226(226) (needsUXEval) needs to be 
evaluated by the UXteam
+ Updates:
BZ changes   1 week   1 month   3 months   12 months  
 added  5(1) 14(0) 30(3)   79(1)  
 commented 54(-3)   166(-9)   442(20)1376(-7) 
   removed  0(-1) 5(-1) 9(1)   20(0)  
  resolved  8(0) 24(5) 59(8)  132(4)  
+ top 10 contributors:
  Tietze, Heiko made 73 changes in 1 month, and 558 changes in 1 year
  Xisco Faulí made 36 changes in 1 month, and 254 changes in 1 year
  Dieter Praas made 26 changes in 1 month, and 145 changes in 1 year
  Roman Kuznetsov made 25 changes in 1 month, and 133 changes in 1 year
  Foote, V Stuart made 23 changes in 1 month, and 206 changes in 1 year
  Mehrbrodt, Samuel made 20 changes in 1 month, and 73 changes in 1 year
  Thomas Lendo made 13 changes in 1 month, and 250 changes in 1 year
  Jim Raykowski made 12 changes in 1 month, and 30 changes in 1 year
  和尚蟹 made 9 changes in 1 month, and 21 changes in 1 year
  Alexander Farrow made 8 changes in 1 month, and 8 changes in 1 year

+ New needsUXEval between Mar/20-28

   * Sidebar Separator lines
 + https://bugs.documentfoundation.org/show_bug.cgi?id=124376
 => in discussion

   * Tabbed: Missing Some Required Functions from Previous Pop Up Toolbar 
 in Tabbed interface
 + https://bugs.documentfoundation.org/show_bug.cgi?id=122751
   * FRAME-DIALOG: Add an apply button
 + https://bugs.documentfoundation.org/show_bug.cgi?id=124278
 => accepted/forwarded

   * toggling settings - e.g. threaded calculations - need restart, 
 UI unclear about this
 + https://bugs.documentfoundation.org/show_bug.cgi?id=124323
   * Unable to use keyboard navigation to access Brochure radio button 
 in Print dialog
 + https://bugs.documentfoundation.org/show_bug.cgi?id=124249
 => WFM, NAB

* Crash Testing (Caolan)
+ 2(+0) import failure, 0(-2) export failures
  + suspect export failures are transient / intermittent.
+ coverity suspended – until it supports c++17
+ Google / ossfuzz:
  - 12 (+0) issues, 9 timeouts, 1 OOM
  + build got broken there, fixed now again
  + some deep stack issue.
+ ForcePoint, round 9
  + ?? a few minor issues lingering
+ CNA bits – got 1st batch of CVE numbers.

* Crash Reporting (Xisco)
  + http://crashreport.libreoffice.org/stats/version/6.1.4.2
+ 837 (+46)
  + http://crashreport.libreoffice.org/stats/version/6.1.5.2
+ 875 634 (+241)
  + http://crashreport.libreoffice.org/stats/version/6.2.0.3
+ 1295 (+59)
  + http://crashreport.libreoffice.org/stats/version/6.2.1.2
+ 1227 (+79)
  + http://crashreport.libreoffice.org/stats/version/6.2.2.2
+ 724 (-)
  + looks good for latest version, still have a symbol issue
  + not a generic issue with all reports (Christian)
+ just a display issue – all on the same category
+ all current versions should be handled correctly.
+ when searching for crash reports in libmerged: plenty have
  symbols resolved.
+ problem is 6.2.2.2 (Michael)
ht

[Libreoffice-commits] online.git: ios/Mobile

2019-03-28 Thread Libreoffice Gerrit user
 ios/Mobile/AppDelegate.h   |1 -
 ios/Mobile/AppDelegate.mm  |6 --
 ios/Mobile/TemplateCollectionViewController.mm |5 +
 3 files changed, 5 insertions(+), 7 deletions(-)

New commits:
commit e2f48faf1441d88e545ff87b42a90a14bfcc04ac
Author: Tor Lillqvist 
AuthorDate: Thu Mar 28 17:04:58 2019 +0200
Commit: Tor Lillqvist 
CommitDate: Thu Mar 28 17:28:26 2019 +0200

tdf#123742: Fix lifecycle issues for the "Office" object

Because of the use of std::shared_ptr in lokit_main(), the (singleton)
lok::Office (or LibLibreOffice_Impl) object gets destroyed when
lokit_main() exits. We shouldn't keep our own copy of a raw pointer to
it around. Just call lok_init_2() to get the pointer where we need it.
We don't need to call lok_init_2() already in -[AppDelegate
application:didFinishLaunchingWithOptions:].

diff --git a/ios/Mobile/AppDelegate.h b/ios/Mobile/AppDelegate.h
index d9c6c00cc..58c09bf46 100644
--- a/ios/Mobile/AppDelegate.h
+++ b/ios/Mobile/AppDelegate.h
@@ -17,7 +17,6 @@
 @end
 
 extern NSString *app_locale;
-extern LibreOfficeKit *lo_kit;
 
 // vim:set shiftwidth=4 softtabstop=4 expandtab:
 
diff --git a/ios/Mobile/AppDelegate.mm b/ios/Mobile/AppDelegate.mm
index 001f0f5c7..b67caf194 100644
--- a/ios/Mobile/AppDelegate.mm
+++ b/ios/Mobile/AppDelegate.mm
@@ -27,7 +27,6 @@
 static LOOLWSD *loolwsd = nullptr;
 
 NSString *app_locale;
-LibreOfficeKit *lo_kit;
 
 static void download(NSURL *source, NSURL *destination) {
 [[[NSURLSession sharedSession] downloadTaskWithURL:source
@@ -184,11 +183,6 @@ static void updateTemplates(NSData *data, NSURLResponse 
*response)
 }
 }
 
-// Initialize LibreOfficeKit.
-
-lo_kit = lok_init_2(nullptr, nullptr);
-lo_kit->pClass->registerCallback(lo_kit, [](int, const char *, void*){}, 
nullptr);
-
 fakeSocketSetLoggingCallback([](const std::string& line)
  {
  LOG_TRC_NOFILE(line);
diff --git a/ios/Mobile/TemplateCollectionViewController.mm 
b/ios/Mobile/TemplateCollectionViewController.mm
index c5da8ef05..a31f3a655 100644
--- a/ios/Mobile/TemplateCollectionViewController.mm
+++ b/ios/Mobile/TemplateCollectionViewController.mm
@@ -8,6 +8,8 @@
 
 #import "svtools/strings.hrc"
 
+#import 
+
 #import "AppDelegate.h"
 #import "L10n.h"
 #import "TemplateCollectionViewController.h"
@@ -136,8 +138,11 @@ static NSString *mapTemplateExtensionToActual(NSString 
*templateName) {
 NSURL *newURL = [cacheDirectory 
URLByAppendingPathComponent:mapTemplateExtensionToActual(selectedTemplate.lastPathComponent)
 isDirectory:NO];
 
+LibreOfficeKit *lo_kit = lok_init_2(nullptr, nullptr);
+
 // Load the template into LibreOffice core, save as the corresponding 
document type (with the
 // same basename), and then proceed to edit that.
+
 LibreOfficeKitDocument *doc = lo_kit->pClass->documentLoad(lo_kit, 
[[selectedTemplate absoluteString] UTF8String]);
 doc->pClass->saveAs(doc, [[newURL absoluteString] UTF8String], nullptr, 
nullptr);
 doc->pClass->destroy(doc);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - ios/Mobile

2019-03-28 Thread Libreoffice Gerrit user
 ios/Mobile/AppDelegate.h   |1 -
 ios/Mobile/AppDelegate.mm  |6 --
 ios/Mobile/TemplateCollectionViewController.mm |5 +
 3 files changed, 5 insertions(+), 7 deletions(-)

New commits:
commit 66d22cf05b45c879be6f6a45e2289843b61079a6
Author: Tor Lillqvist 
AuthorDate: Thu Mar 28 17:04:58 2019 +0200
Commit: Tor Lillqvist 
CommitDate: Thu Mar 28 17:24:23 2019 +0200

tdf#123742: Fix lifecycle issues for the "Office" object

Because of the use of std::shared_ptr in lokit_main(), the (singleton)
lok::Office (or LibLibreOffice_Impl) object gets destroyed when
lokit_main() exits. We shouldn't keep our own copy of a raw pointer to
it around. Just call lok_init_2() to get the pointer where we need it.
We don't need to call lok_init_2() already in -[AppDelegate
application:didFinishLaunchingWithOptions:].

diff --git a/ios/Mobile/AppDelegate.h b/ios/Mobile/AppDelegate.h
index d9c6c00cc..58c09bf46 100644
--- a/ios/Mobile/AppDelegate.h
+++ b/ios/Mobile/AppDelegate.h
@@ -17,7 +17,6 @@
 @end
 
 extern NSString *app_locale;
-extern LibreOfficeKit *lo_kit;
 
 // vim:set shiftwidth=4 softtabstop=4 expandtab:
 
diff --git a/ios/Mobile/AppDelegate.mm b/ios/Mobile/AppDelegate.mm
index 001f0f5c7..b67caf194 100644
--- a/ios/Mobile/AppDelegate.mm
+++ b/ios/Mobile/AppDelegate.mm
@@ -27,7 +27,6 @@
 static LOOLWSD *loolwsd = nullptr;
 
 NSString *app_locale;
-LibreOfficeKit *lo_kit;
 
 static void download(NSURL *source, NSURL *destination) {
 [[[NSURLSession sharedSession] downloadTaskWithURL:source
@@ -184,11 +183,6 @@ static void updateTemplates(NSData *data, NSURLResponse 
*response)
 }
 }
 
-// Initialize LibreOfficeKit.
-
-lo_kit = lok_init_2(nullptr, nullptr);
-lo_kit->pClass->registerCallback(lo_kit, [](int, const char *, void*){}, 
nullptr);
-
 fakeSocketSetLoggingCallback([](const std::string& line)
  {
  LOG_TRC_NOFILE(line);
diff --git a/ios/Mobile/TemplateCollectionViewController.mm 
b/ios/Mobile/TemplateCollectionViewController.mm
index c5da8ef05..a31f3a655 100644
--- a/ios/Mobile/TemplateCollectionViewController.mm
+++ b/ios/Mobile/TemplateCollectionViewController.mm
@@ -8,6 +8,8 @@
 
 #import "svtools/strings.hrc"
 
+#import 
+
 #import "AppDelegate.h"
 #import "L10n.h"
 #import "TemplateCollectionViewController.h"
@@ -136,8 +138,11 @@ static NSString *mapTemplateExtensionToActual(NSString 
*templateName) {
 NSURL *newURL = [cacheDirectory 
URLByAppendingPathComponent:mapTemplateExtensionToActual(selectedTemplate.lastPathComponent)
 isDirectory:NO];
 
+LibreOfficeKit *lo_kit = lok_init_2(nullptr, nullptr);
+
 // Load the template into LibreOffice core, save as the corresponding 
document type (with the
 // same basename), and then proceed to edit that.
+
 LibreOfficeKitDocument *doc = lo_kit->pClass->documentLoad(lo_kit, 
[[selectedTemplate absoluteString] UTF8String]);
 doc->pClass->saveAs(doc, [[newURL absoluteString] UTF8String], nullptr, 
nullptr);
 doc->pClass->destroy(doc);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: vcl/CppunitTest_vcl_jpeg_read_write_test.mk vcl/qa

2019-03-28 Thread Luboš Luňák (via logerrit)
 vcl/CppunitTest_vcl_jpeg_read_write_test.mk   |1 
 vcl/qa/cppunit/jpeg/JpegWriterTest.cxx|   88 ++
 vcl/qa/cppunit/jpeg/data/8BitNonGrayscale.gif |binary
 3 files changed, 89 insertions(+)

New commits:
commit c61623028b79f918d0ed2bc2ca47db17e68a26cb
Author: Luboš Luňák 
AuthorDate: Wed Mar 27 11:47:06 2019 +0100
Commit: Tomaž Vajngerl 
CommitDate: Thu Mar 28 15:44:19 2019 +0100

check that jpeg export of 8bit non-grayscale works

This checks what I fixed in 1893024c54ab173ec6262d77a05cad285c17a617
(related to tdf#116888).

Change-Id: I721017fd037d62ba75cbc962fdd9316e02085624
Reviewed-on: https://gerrit.libreoffice.org/69819
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/vcl/CppunitTest_vcl_jpeg_read_write_test.mk 
b/vcl/CppunitTest_vcl_jpeg_read_write_test.mk
index e741916bba0f..88385872b311 100644
--- a/vcl/CppunitTest_vcl_jpeg_read_write_test.mk
+++ b/vcl/CppunitTest_vcl_jpeg_read_write_test.mk
@@ -11,6 +11,7 @@ $(eval $(call 
gb_CppunitTest_CppunitTest,vcl_jpeg_read_write_test))
 
 $(eval $(call gb_CppunitTest_add_exception_objects,vcl_jpeg_read_write_test, \
 vcl/qa/cppunit/jpeg/JpegReaderTest \
+vcl/qa/cppunit/jpeg/JpegWriterTest \
 ))
 
 $(eval $(call 
gb_CppunitTest_use_external,vcl_jpeg_read_write_test,boost_headers))
diff --git a/vcl/qa/cppunit/jpeg/JpegWriterTest.cxx 
b/vcl/qa/cppunit/jpeg/JpegWriterTest.cxx
new file mode 100644
index ..a81d0c478ff9
--- /dev/null
+++ b/vcl/qa/cppunit/jpeg/JpegWriterTest.cxx
@@ -0,0 +1,88 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+static OUString const gaDataUrl("/vcl/qa/cppunit/jpeg/data/");
+
+class JpegWriterTest : public test::BootstrapFixtureBase
+{
+OUString getFullUrl(const OUString& sFileName)
+{
+return m_directories.getURLFromSrc(gaDataUrl) + sFileName;
+}
+
+BitmapEx load(const OUString& aURL);
+BitmapEx roundtripJPG(const BitmapEx& bitmap);
+BitmapEx roundtripJPG(const OUString& aURL);
+
+public:
+void testWrite8BitNonGrayscale();
+
+CPPUNIT_TEST_SUITE(JpegWriterTest);
+CPPUNIT_TEST(testWrite8BitNonGrayscale);
+CPPUNIT_TEST_SUITE_END();
+};
+
+BitmapEx JpegWriterTest::load(const OUString& aURL)
+{
+GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
+Graphic aGraphic;
+SvFileStream aFileStream(aURL, StreamMode::READ);
+ErrCode bResult = rFilter.ImportGraphic(aGraphic, aURL, aFileStream);
+CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE, bResult);
+return aGraphic.GetBitmapEx();
+}
+
+BitmapEx JpegWriterTest::roundtripJPG(const OUString& aURL) { return 
roundtripJPG(load(aURL)); }
+
+BitmapEx JpegWriterTest::roundtripJPG(const BitmapEx& bitmap)
+{
+SvMemoryStream stream;
+GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
+sal_uInt16 exportFormatJPG = 
rFilter.GetExportFormatNumberForShortName(JPG_SHORTNAME);
+Graphic aExportGraphic(bitmap);
+ErrCode bResult = rFilter.ExportGraphic(aExportGraphic, "memory", stream, 
exportFormatJPG);
+CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE, bResult);
+stream.Seek(0);
+Graphic aImportGraphic;
+sal_uInt16 importFormatJPG = 
rFilter.GetImportFormatNumberForShortName(JPG_SHORTNAME);
+bResult = rFilter.ImportGraphic(aImportGraphic, "memory", stream, 
importFormatJPG);
+CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE, bResult);
+return aImportGraphic.GetBitmapEx();
+}
+
+void JpegWriterTest::testWrite8BitNonGrayscale()
+{
+Bitmap bitmap = 
roundtripJPG(getFullUrl("8BitNonGrayscale.gif")).GetBitmap();
+Bitmap::ScopedReadAccess access(bitmap);
+const ScanlineFormat format = access->GetScanlineFormat();
+// Check that it's still 8bit grayscale.
+CPPUNIT_ASSERT_EQUAL(ScanlineFormat::N8BitPal, format);
+// The original image has grayscale palette, just with entries in a 
different order,
+// so do not check for non-grayscale, the roundtrip apparently fixes that. 
What's important
+// is the content.
+// CPPUNIT_ASSERT(!bitmap.HasGreyPalette());
+// Check that the content is valid.
+CPPUNIT_ASSERT_EQUAL(BitmapColor(COL_WHITE), access->GetColor(0, 0));
+CPPUNIT_ASSERT_EQUAL(BitmapColor(COL_WHITE), access->GetColor(0, 
access->Width() - 1));
+CPPUNIT_ASSERT_EQUAL(BitmapColor(COL_WHITE), 
access->GetColor(access->Height() - 1, 0));
+CPPUNIT_ASSERT_EQUAL(BitmapColor(COL_BLACK),
+ access->GetColor(access->Height() - 1, 
access->Width() - 1));
+}
+
+CPPUNIT_TEST_SUITE_REGISTRATION(JpegWriterTest);
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/v

Minutes from the UX/design meeting 2019-Mar-28

2019-03-28 Thread Heiko Tietze
Present: Franklin, Cor, Heiko

Tickets 

 * Please change the "paragraph symbol" of "Traditional Chinese version" to "↵"
   + https://bugs.documentfoundation.org/show_bug.cgi?id=121177
   + tend to close as WF because the pilcrow is standardized and used not only
 the document but also at many places such as icons and 
 Tools > Options > Writer > Formatting Aids (Heiko)
   + not needed to be changed (Franklin)
   + unclear how other programs deal with the topic
   + would require an additional option that increase the complexity
   => resolve as WFM

 * Open Wiki page with information on new or changed behavior...
   + https://bugs.documentfoundation.org/show_bug.cgi?id=89660
   => make this a duplicate of 69042
 * Add a "Release Notes/What's New" window to be shown upon first run
   + https://bugs.documentfoundation.org/show_bug.cgi?id=69042
   + new release, copy of /link to release notes
   => go for it
 * Implementing a 'Welcome' dialog on first launch (creation of new user 
profile)
   + https://bugs.documentfoundation.org/show_bug.cgi?id=91441
   + first start, ideally more design oriented and in a wizard style
   + was removed because users considered it as annoying (see bug)
   => resolve as WF
 * Tip-of-the-day dialog
   + every start, content of https://pad.documentfoundation.org/p/marketing 
#388ff
   + https://gerrit.libreoffice.org/#/c/69498/
   + dialog works, review pending; when done marketing/documentation should get 
involved to improve the list of tips
   + ideally we have the list in the wiki (Franklin)
   => work in progress

 * toggeling settings - e.g. threaded calculations - need restart, UI unclear 
about this
   + https://bugs.documentfoundation.org/show_bug.cgi?id=124323
   + same is also true for T>O>View>Graphics Output, for example
   + message box, tooltip, infobar, static text, footnote...
   + on macOS we have a tooltip (Requires restart) and a message box restart 
now/later,
 but that's not working on Linux, neither it's shown for Calc - 
multithreading
   => fix the bug (and maybe change to presentation to restart from a dialog to 
a static text next to help)

 * Print (selected) pages radio button as layout
   + https://bugs.documentfoundation.org/show_bug.cgi?id=122707
   + layout follows functionality and that's missing
   => keep it and have the discussion on an extra ticket

 * Rework of Options dialog
   * Requirements/Tickets: 
https://nextcloud.documentfoundation.org/s/RyJoZ8Nt6bNfSmt
 + request on BZ to make clear where the setting applies (general like 
OpenGL, per module like units, 
   per document like Grids)
 + simplified dialog
 + apply the changes (without closing the dialog) and to reset to factory 
defaults (or previous configuration)
 + search for keyword
   + Categorization: https://nextcloud.documentfoundation.org/s/cPGtpCTJKTLRNBF
 + idea is to find out what property is basic and what is used by experts
 + large list of sections (bold headlines) assigned to persona
 + to avoid asking the community about all options we should narrow down 
the questionable items and do 
   the assignment first in the team - and get more input later on 
questionable items
   * Basic design: https://nextcloud.documentfoundation.org/s/6BqcybB3RdCNSHL
 + depending on the outcome of the steps before we can talk about the UI
 + Andreas: disagree with simple/advanced but proposing controls to expand 
the options; would be 
   nice to pick up the concepts from Writer; maybe a landing page
  => to backlog





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

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

2019-03-28 Thread Luboš Luňák (via logerrit)
 vcl/inc/opengl/salbmp.hxx |1 +
 vcl/opengl/salbmp.cxx |   17 +
 2 files changed, 14 insertions(+), 4 deletions(-)

New commits:
commit e299dd1dfbd67d0c662ca63df4a6eb43ea590a17
Author: Luboš Luňák 
AuthorDate: Tue Mar 26 13:56:11 2019 +0100
Commit: Tomaž Vajngerl 
CommitDate: Thu Mar 28 15:43:02 2019 +0100

make OpenGLSalBitmap deallocate user data properly

In OpenGLSalBitmap::AcquireBuffer(), if ReadTexture() failed, then
the data from AllocateUserData() didn't get deallocated and a next
call to OpenGLSalBitmap::AcquireBuffer() skipped the whole block
because it assumed the data was valid. Triggered while fixing tdf#116888.

Change-Id: Ibfe5c42d6b18748ca649d6b4242ef268c1b13a71
Reviewed-on: https://gerrit.libreoffice.org/69746
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/vcl/inc/opengl/salbmp.hxx b/vcl/inc/opengl/salbmp.hxx
index c45532434f98..bc4dc90b9605 100644
--- a/vcl/inc/opengl/salbmp.hxx
+++ b/vcl/inc/opengl/salbmp.hxx
@@ -93,6 +93,7 @@ private:
 
 GLuint  CreateTexture();
 boolAllocateUserData();
+voidDeallocateUserData();
 boolReadTexture();
 
 private:
diff --git a/vcl/opengl/salbmp.cxx b/vcl/opengl/salbmp.cxx
index d8a8454ca4e7..27d2e19e2734 100644
--- a/vcl/opengl/salbmp.cxx
+++ b/vcl/opengl/salbmp.cxx
@@ -258,7 +258,7 @@ void OpenGLSalBitmap::Destroy()
 
 VCL_GL_INFO("Destroy OpenGLSalBitmap texture:" << maTexture.Id());
 maTexture = OpenGLTexture();
-mpUserBuffer.reset();
+DeallocateUserData();
 }
 
 bool OpenGLSalBitmap::AllocateUserData()
@@ -292,8 +292,7 @@ bool OpenGLSalBitmap::AllocateUserData()
 if (!alloc)
 {
 SAL_WARN("vcl.opengl", "bad alloc " << mnBytesPerRow << "x" << 
mnHeight);
-mpUserBuffer.reset();
-mnBytesPerRow = 0;
+DeallocateUserData();
 }
 #ifdef DBG_UTIL
 else
@@ -306,6 +305,12 @@ bool OpenGLSalBitmap::AllocateUserData()
 return mpUserBuffer != nullptr;
 }
 
+void OpenGLSalBitmap::DeallocateUserData()
+{
+mpUserBuffer.reset();
+mnBytesPerRow = 0;
+}
+
 namespace {
 
 class ImplPixelFormat
@@ -763,7 +768,10 @@ BitmapBuffer* OpenGLSalBitmap::AcquireBuffer( 
BitmapAccessMode nMode )
 if( !AllocateUserData() )
 return nullptr;
 if( maTexture && !ReadTexture() )
+{
+DeallocateUserData();
 return nullptr;
+}
 }
 }
 
@@ -870,6 +878,7 @@ bool OpenGLSalBitmap::GetSystemData( BitmapSystemData& 
/*rData*/ )
 if( !AllocateUserData() || !ReadTexture() )
 {
 rBitmap.ReleaseBuffer( pBuffer, false );
+DeallocateUserData();
 return false;
 }
 }
@@ -955,7 +964,7 @@ bool OpenGLSalBitmap::ConvertToGreyscale()
 maPalette = Bitmap::GetGreyPalette(256);
 
 // AllocateUserData will handle the rest.
-mpUserBuffer.reset();
+DeallocateUserData();
 mbDirtyTexture = false;
 
 CHECK_GL_ERROR();
___
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

2019-03-28 Thread Luboš Luňák (via logerrit)
 vcl/opengl/salbmp.cxx|   10 --
 vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx |   36 +++
 vcl/qa/cppunit/bitmaprender/data/tdf116888.gif   |binary
 3 files changed, 43 insertions(+), 3 deletions(-)

New commits:
commit df82c812e6dbb08837816ef9868bf24b3767ca1a
Author: Luboš Luňák 
AuthorDate: Tue Mar 26 13:48:47 2019 +0100
Commit: Tomaž Vajngerl 
CommitDate: Thu Mar 28 15:42:33 2019 +0100

make ReadTexture() also handle 8-bit non-grayscale images (tdf#116888)

The missing case caused BitmapReadAccess to work with random data
(together with a follow-up bug that didn't deallocate data properly
after ReadTexture() failed).

Change-Id: I4546ee4ca85d6a0b01cc41636c257008c9f19587
Reviewed-on: https://gerrit.libreoffice.org/69745
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/vcl/opengl/salbmp.cxx b/vcl/opengl/salbmp.cxx
index dc7418799e34..d8a8454ca4e7 100644
--- a/vcl/opengl/salbmp.cxx
+++ b/vcl/opengl/salbmp.cxx
@@ -598,8 +598,8 @@ bool OpenGLSalBitmap::ReadTexture()
 #endif
 return true;
 }
-else if (mnBits == 1 || mnBits == 4)
-{   // convert buffers from 24-bit RGB to 1 or 4-bit buffer
+else if (mnBits == 1 || mnBits == 4 || mnBits == 8)
+{   // convert buffers from 24-bit RGB to 1,4 or 8-bit buffer
 std::vector aBuffer(mnWidth * mnHeight * 3);
 
 sal_uInt8* pBuffer = aBuffer.data();
@@ -614,9 +614,13 @@ bool OpenGLSalBitmap::ReadTexture()
 pWriter.reset(new ScanlineWriter(maPalette, 8));
 break;
 case 4:
-default:
 pWriter.reset(new ScanlineWriter(maPalette, 2));
 break;
+case 8:
+pWriter.reset(new ScanlineWriter(maPalette, 1));
+break;
+default:
+abort();
 }
 
 for (int y = 0; y < mnHeight; ++y)
diff --git a/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx 
b/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx
index eba78e717e24..531494205c14 100644
--- a/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx
+++ b/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx
@@ -39,11 +39,13 @@ public:
 void testTdf104141();
 void testTdf113918();
 void testDrawBitmap32();
+void testTdf116888();
 
 CPPUNIT_TEST_SUITE(BitmapRenderTest);
 CPPUNIT_TEST(testTdf104141);
 CPPUNIT_TEST(testTdf113918);
 CPPUNIT_TEST(testDrawBitmap32);
+CPPUNIT_TEST(testTdf116888);
 
 CPPUNIT_TEST_SUITE_END();
 };
@@ -126,6 +128,40 @@ void BitmapRenderTest::testDrawBitmap32()
 #endif
 }
 
+void BitmapRenderTest::testTdf116888()
+{
+// The image is a 8bit image with a non-grayscale palette. In OpenGL mode
+// pdf export of the image was broken, because 
OpenGLSalBitmap::ReadTexture()
+// didn't handle 8bit non-grayscale and moreover 
OpenGLSalBitmap::AcquireBuffer()
+// didn't properly release mpUserBuffer after ReadTexture() failure.
+GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
+Graphic aGraphic;
+const OUString aURL(getFullUrl("tdf116888.gif"));
+SvFileStream aFileStream(aURL, StreamMode::READ);
+ErrCode bResult = rFilter.ImportGraphic(aGraphic, aURL, aFileStream);
+CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE, bResult);
+Bitmap aBitmap = aGraphic.GetBitmapEx().GetBitmap();
+CPPUNIT_ASSERT(!aBitmap.IsEmpty());
+aBitmap.Scale(0.8, 0.8); // This scaling discards mpUserData,
+Bitmap::ScopedReadAccess pAccess(aBitmap); // forcing ReadTexture() here.
+// Check that there is mpUserBuffer content.
+CPPUNIT_ASSERT(pAccess);
+const ScanlineFormat eFormat = pAccess->GetScanlineFormat();
+CPPUNIT_ASSERT_EQUAL(ScanlineFormat::N8BitPal, eFormat);
+CPPUNIT_ASSERT(!aBitmap.HasGreyPalette());
+// HACK: Some rendering backends change white to #FEFEFE while scaling for 
some reason.
+// That is pretty much white too in practice, so adjust for that.
+BitmapColor white(COL_WHITE);
+if (pAccess->GetColor(0, 0) == Color(0xfe, 0xfe, 0xfe))
+white = Color(0xfe, 0xfe, 0xfe);
+// Check that the image contents are also valid.
+CPPUNIT_ASSERT_EQUAL(white, pAccess->GetColor(0, 0));
+CPPUNIT_ASSERT_EQUAL(white, pAccess->GetColor(0, pAccess->Width() - 1));
+CPPUNIT_ASSERT_EQUAL(white, pAccess->GetColor(pAccess->Height() - 1, 0));
+CPPUNIT_ASSERT_EQUAL(BitmapColor(COL_BLACK),
+ pAccess->GetColor(pAccess->Height() - 1, 
pAccess->Width() - 1));
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(BitmapRenderTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/vcl/qa/cppunit/bitmaprender/data/tdf116888.gif 
b/vcl/qa/cppunit/bitmaprender/data/tdf116888.gif
new file mode 100644
index ..2953109491c4
Binary files /dev/null and b/vcl/qa/cppunit/bitmaprender/data/tdf116888.gif 
differ
___
Libreoffice-commits mailing list
libreoffice-co

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

2019-03-28 Thread Tomaž Vajngerl (via logerrit)
 vcl/inc/listbox.hxx |4 ++
 vcl/inc/svdata.hxx  |2 +
 vcl/source/control/imp_listbox.cxx  |   53 +---
 vcl/source/control/listbox.cxx  |4 +-
 vcl/source/gdi/FileDefinitionWidgetDraw.cxx |1 
 5 files changed, 43 insertions(+), 21 deletions(-)

New commits:
commit ce9dab8c161e29769131cec741a6a9cceec8552d
Author: Tomaž Vajngerl 
AuthorDate: Thu Mar 28 17:43:29 2019 +0900
Commit: Tomaž Vajngerl 
CommitDate: Thu Mar 28 15:41:42 2019 +0100

tdf#124148 add configurable margin for the listbox pop-up list

This is needed to increase the area of lisbox entries in the
pop-up list so it is easier to select with touch.

Change-Id: Iedb910508de26c903dc3f50f645f567d4c988940
Reviewed-on: https://gerrit.libreoffice.org/69889
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/vcl/inc/listbox.hxx b/vcl/inc/listbox.hxx
index 52a9ab98dc47..1ee124423fc1 100644
--- a/vcl/inc/listbox.hxx
+++ b/vcl/inc/listbox.hxx
@@ -54,6 +54,8 @@ struct ImplEntryType
 ListBoxEntryFlags mnFlags;
 longmnHeight;
 
+long getHeightWithMargin() const;
+
 ImplEntryType( const OUString& rStr, const Image& rImage ) :
 maStr( rStr ),
 maImage( rImage ),
@@ -336,6 +338,7 @@ public:
 tools::Rectangle   GetBoundingRectangle( sal_Int32  nItem ) const;
 
 longGetEntryHeight() const  { return mnMaxHeight; }
+longGetEntryHeightWithMargin() const;
 longGetMaxEntryWidth() const{ return mnMaxWidth; }
 
 voidSetScrollHdl( const Link& rLink ) 
{ maScrollHdl = rLink; }
@@ -472,6 +475,7 @@ public:
 
 SizeCalcSize( sal_Int32  nMaxLines ) const  { 
return maLBWindow->CalcSize( nMaxLines ); }
 longGetEntryHeight() const  { return 
maLBWindow->GetEntryHeight(); }
+longGetEntryHeightWithMargin() const{ return 
maLBWindow->GetEntryHeightWithMargin(); }
 longGetMaxEntryWidth() const{ return 
maLBWindow->GetMaxEntryWidth(); }
 
 voidSetScrollHdl( const Link& rLink ) { 
maScrollHdl = rLink; }
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index c5b3482642a2..714c7c5a36e7 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -309,6 +309,8 @@ struct ImplSVNWFData
 // floating toolbars that can be redocked because there's no way to track
 // that the toolbar is over a dockable area.
 boolmbCanDetermineWindowPosition = true;
+
+int mnListBoxEntryMargin = 0;
 };
 
 struct BlendFrameCache
diff --git a/vcl/source/control/imp_listbox.cxx 
b/vcl/source/control/imp_listbox.cxx
index 5e72bcf85f55..35c2ee74d06b 100644
--- a/vcl/source/control/imp_listbox.cxx
+++ b/vcl/source/control/imp_listbox.cxx
@@ -310,7 +310,7 @@ long ImplEntryList::GetAddedHeight( sal_Int32 i_nEndIndex, 
sal_Int32 i_nBeginInd
 sal_Int32 nIndex = nStart;
 while( nIndex != LISTBOX_ENTRY_NOTFOUND && nIndex < nStop )
 {
-long nPosHeight = GetEntryPtr( nIndex )->mnHeight;
+long nPosHeight = GetEntryPtr( nIndex )->getHeightWithMargin();
 if (nHeight > ::std::numeric_limits::max() - nPosHeight)
 {
 SAL_WARN( "vcl", "ImplEntryList::GetAddedHeight: truncated");
@@ -328,7 +328,7 @@ long ImplEntryList::GetAddedHeight( sal_Int32 i_nEndIndex, 
sal_Int32 i_nBeginInd
 long ImplEntryList::GetEntryHeight( sal_Int32 nPos ) const
 {
 ImplEntryType* pImplEntry = GetEntry( nPos );
-return pImplEntry ? pImplEntry->mnHeight : 0;
+return pImplEntry ? pImplEntry->getHeightWithMargin() : 0;
 }
 
 OUString ImplEntryList::GetEntryText( sal_Int32 nPos ) const
@@ -561,7 +561,7 @@ void ImplListBoxWindow::ImplCalcMetrics()
 
 if( mnCurrentPos != LISTBOX_ENTRY_NOTFOUND )
 {
-Size aSz( GetOutputSizePixel().Width(), mpEntryList->GetEntryPtr( 
mnCurrentPos )->mnHeight );
+Size aSz( GetOutputSizePixel().Width(), mpEntryList->GetEntryPtr( 
mnCurrentPos )->getHeightWithMargin() );
 maFocusRect.SetSize( aSz );
 }
 }
@@ -604,6 +604,11 @@ struct ImplEntryMetrics
 longnImgHeight;
 };
 
+long ImplEntryType::getHeightWithMargin() const
+{
+return mnHeight + ImplGetSVData()->maNWFData.mnListBoxEntryMargin;
+}
+
 SalLayoutGlyphs* ImplEntryType::GetTextGlyphs(const OutputDevice* 
pOutputDevice)
 {
 if (maStrGlyphs.IsValid())
@@ -805,9 +810,10 @@ sal_Int32 ImplListBoxWindow::GetEntryPosForPoint( const 
Point& rPoint ) const
 
 sal_Int32 nSelect = mnTop;
 const ImplEntryType* pEntry = mpEntryList->GetEntryPtr( nSelect );
-while( pEntry && rPoint.Y() > pEntry->mnHeight + nY )
+long nEntryHeight = pEntry->getHeightWithMargin();
+while( pEntry && rPoint.Y() > nEntryHeight + nY )
 {
-nY += pEntry->mnHeight;
+nY += nEntryHeight;
   

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx

2019-03-28 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtk3gtkinst.cxx |   13 ++---
 1 file changed, 10 insertions(+), 3 deletions(-)

New commits:
commit e019441cb0507fd533fe7114c6a1ea17e2c10aa6
Author: Caolán McNamara 
AuthorDate: Mon Mar 25 14:45:45 2019 +
Commit: Christian Lohmaier 
CommitDate: Thu Mar 28 15:24:58 2019 +0100

Resolves: tdf#124234 page leave signal missing on move to overflow deck

we were emitting page-entered but not emitting the page-leave signal

Change-Id: I64131631016331cf102d08244982148ac8c3c69c
Reviewed-on: https://gerrit.libreoffice.org/69686
Tested-by: Jenkins
Tested-by: Xisco Faulí 
Reviewed-by: Christian Lohmaier 

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 95f6ccfa4c48..622ce023a8bd 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -3131,6 +3131,11 @@ private:
 return;
 }
 
+// check if we are allowed leave before attempting to resplit the 
notebooks
+bool bAllow = !m_aLeavePageHdl.IsSet() || 
m_aLeavePageHdl.Call(get_current_page_ident());
+if (!bAllow)
+return;
+
 disable_notify_events();
 
 // take the overflow pages, and put them back at the end of the normal 
one
@@ -3140,11 +3145,13 @@ private:
 std::swap(m_nStartTabCount, m_nEndTabCount);
 split_notebooks();
 
+gtk_notebook_set_current_page(m_pNotebook, nNewPage);
+
 enable_notify_events();
 
-// we want to call this outside enable_notify_events so that the main
-// notebook switch-page callback is triggered
-gtk_notebook_set_current_page(m_pNotebook, nNewPage);
+// trigger main notebook switch-page callback
+OString sNewIdent(get_page_ident(m_pNotebook, nNewPage));
+m_aEnterPageHdl.Call(sNewIdent);
 }
 
 static OString get_page_ident(GtkNotebook *pNotebook, guint nPage)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - sc/qa

2019-03-28 Thread Eike Rathke (via logerrit)
 sc/qa/unit/ucalc.hxx   |6 
 sc/qa/unit/ucalc_sharedformula.cxx |  730 +
 2 files changed, 736 insertions(+)

New commits:
commit a4bb79de7fa046aa540cc984e43baceff9304a11
Author: Eike Rathke 
AuthorDate: Sun Mar 17 19:58:12 2019 +0100
Commit: Christian Lohmaier 
CommitDate: Thu Mar 28 15:22:50 2019 +0100

Unit tests for tdf#121002 tdf#120013 tdf#123714 tdf#123736

 This is a combination of 4 commits.

Add unit tests for tdf#123736 and related unshared/regrouped listening

Reviewed-on: https://gerrit.libreoffice.org/69372
Tested-by: Jenkins
Reviewed-by: Eike Rathke 
(cherry picked from commit 8925bd2efca8dd07a3ac044ecbc6505bb7bfa0a6)

Unit test for cut copy move into shared formula group reference, tdf#123714

Reviewed-on: https://gerrit.libreoffice.org/69453
Reviewed-by: Eike Rathke 
Tested-by: Jenkins
(cherry picked from commit f81d532648ccbbd08d3cb568eadc9f402dac67ad)

Unit test for cut copy move with a group reference adjusting along, 
tdf#121002

Reviewed-on: https://gerrit.libreoffice.org/69532
Reviewed-by: Eike Rathke 
Tested-by: Jenkins
(cherry picked from commit 92657eed57548511f26f0c22f1bbc47d554c8b5b)

bcf03f5068630c18eeecf2625cdff7ec1704d292
4f3731e2236f1b8be97a6f5d21e32e678610fecb

Unit test for cut copy move intersecting a formula group run, tdf#120013

Reviewed-on: https://gerrit.libreoffice.org/69568
Tested-by: Jenkins
Reviewed-by: Eike Rathke 
(cherry picked from commit 6280b5c1c62ad40b5b9780a93c7cbee9ca0260f8)

ce7e1e42dba7bfbc2db6a60e4457c3610430b87e

Change-Id: If48e6d75288b42b47c90f3104006b7c52982c9f6
Reviewed-on: https://gerrit.libreoffice.org/69555
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/sc/qa/unit/ucalc.hxx b/sc/qa/unit/ucalc.hxx
index 9f69783ad815..45b46a9fdc10 100644
--- a/sc/qa/unit/ucalc.hxx
+++ b/sc/qa/unit/ucalc.hxx
@@ -407,6 +407,9 @@ public:
 void testSharedFormulaListenerDeleteArea();
 void testSharedFormulaUpdateOnReplacement();
 void testSharedFormulaDeleteTopCell();
+void testSharedFormulaCutCopyMoveIntoRef();
+void testSharedFormulaCutCopyMoveWithRef();
+void testSharedFormulaCutCopyMoveWithinRun();
 void testFormulaPosition();
 void testFormulaWizardSubformula();
 
@@ -757,6 +760,9 @@ public:
 CPPUNIT_TEST(testSharedFormulaListenerDeleteArea);
 CPPUNIT_TEST(testSharedFormulaUpdateOnReplacement);
 CPPUNIT_TEST(testSharedFormulaDeleteTopCell);
+CPPUNIT_TEST(testSharedFormulaCutCopyMoveIntoRef);
+CPPUNIT_TEST(testSharedFormulaCutCopyMoveWithRef);
+CPPUNIT_TEST(testSharedFormulaCutCopyMoveWithinRun);
 CPPUNIT_TEST(testFormulaPosition);
 CPPUNIT_TEST(testFormulaWizardSubformula);
 CPPUNIT_TEST(testMixData);
diff --git a/sc/qa/unit/ucalc_sharedformula.cxx 
b/sc/qa/unit/ucalc_sharedformula.cxx
index 853f54c30ff9..96411b5fee55 100644
--- a/sc/qa/unit/ucalc_sharedformula.cxx
+++ b/sc/qa/unit/ucalc_sharedformula.cxx
@@ -1668,6 +1668,21 @@ void Test::testSharedFormulaAbsCellListener()
 m_pDoc->DeleteTab(0);
 }
 
+static double checkNewValuesNotification( ScDocument* pDoc, const ScAddress& 
rOrgPos )
+{
+ScAddress aPos(rOrgPos);
+aPos.IncCol();
+pDoc->SetValues( aPos, {1024.0, 2048.0, 4096.0, 8192.0, 16384.0});
+aPos = rOrgPos;
+double fVal = 0.0;
+for (SCROW i=0; i < 5; ++i)
+{
+fVal += pDoc->GetValue(aPos);
+aPos.IncRow();
+}
+return fVal;
+}
+
 void Test::testSharedFormulaUnshareAreaListeners()
 {
 sc::AutoCalcSwitch aACSwitch(*m_pDoc, true); // turn on auto calc.
@@ -1696,6 +1711,460 @@ void Test::testSharedFormulaUnshareAreaListeners()
 CPPUNIT_ASSERT_EQUAL(17.0, m_pDoc->GetValue(ScAddress(0,0,0)));
 CPPUNIT_ASSERT_EQUAL(40.0, m_pDoc->GetValue(ScAddress(0,2,0)));
 
+clearRange(m_pDoc, ScRange( 0,0,0, 1,3,0));
+
+for (int nRun = 0; nRun < 7; ++nRun)
+{
+// Data in A2:C6
+const ScAddress aOrgPos(0,1,0);
+const char* pData2[][3] = {
+{ "=SUM(B2:C2)",   "1",   "2" },
+{ "=SUM(B3:C3)",   "4",   "8" },
+{ "=SUM(B4:C4)",  "16",  "32" },
+{ "=SUM(B5:C5)",  "64", "128" },
+{ "=SUM(B6:C6)", "256", "512" },
+};
+insertRangeData(m_pDoc, aOrgPos, pData2, SAL_N_ELEMENTS(pData2));
+
+// Check that A2:A6 is a formula group.
+pFC = m_pDoc->GetFormulaCell(aOrgPos);
+CPPUNIT_ASSERT(pFC);
+CPPUNIT_ASSERT_MESSAGE("A2", pFC->IsSharedTop());
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Shared top row.", aOrgPos.Row(), 
pFC->GetSharedTopRow());
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Shared length.", static_cast(5), 
pFC->GetSharedLength());
+
+// Overwrite and thus unshare formula in A3.
+// Check different code paths with different methods.
+ScAddress aPos(aOrgP

[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - vcl/source

2019-03-28 Thread Luboš Luňák (via logerrit)
 vcl/source/gdi/bitmapex.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e051b74e274c78d91ce69b37d896861816f5b6ea
Author: Luboš Luňák 
AuthorDate: Wed Mar 13 17:23:42 2019 +0100
Commit: Xisco Faulí 
CommitDate: Thu Mar 28 14:49:41 2019 +0100

fix transparency handling in BitmapEx::GetPixelColor()

Apparently the Color class uses transparency as the opposite
of the normally used meaning of opacity, so transparency 255
means transparent.

Change-Id: I3a76c2c93d98ad3c850017d3fd569b04dc6c19c8
Reviewed-on: https://gerrit.libreoffice.org/69211
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
Reviewed-on: https://gerrit.libreoffice.org/69884
Reviewed-by: Xisco Faulí 

diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index c81b8b0fd446..5642beba0c4d 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -762,7 +762,7 @@ Color BitmapEx::GetPixelColor(sal_Int32 nX, sal_Int32 nY) 
const
 aColor.SetTransparency( pAlphaReadAccess->GetPixel( nY, nX 
).GetIndex() );
 }
 else
-aColor.SetTransparency(255);
+aColor.SetTransparency(0);
 return aColor;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - vcl/qa vcl/source

2019-03-28 Thread Luboš Luňák (via logerrit)
 vcl/qa/cppunit/pdfexport/data/tdf121615.odt |binary
 vcl/qa/cppunit/pdfexport/pdfexport.cxx  |   58 
 vcl/source/filter/jpeg/JpegWriter.cxx   |5 +-
 3 files changed, 62 insertions(+), 1 deletion(-)

New commits:
commit 57e6e1e1cec5465b81450bcbabac43beaee7ea74
Author: Luboš Luňák 
AuthorDate: Wed Mar 13 17:35:27 2019 +0100
Commit: Xisco Faulí 
CommitDate: Thu Mar 28 14:50:06 2019 +0100

fix grayscale jpeg writing in pdfexport (tdf#121615)

If the bitmap to be written is non-8bit, e.g. in case of using OpenGL
(on Linux the test requires "SAL_FORCEGL=1 SAL_USE_VCLPLUGIN=gen",
on Windows it's probably the default case), then the bitmap is not
in native format for 8bit. This was done correctly by 45e8e0fbee40f
that introduced it but somehow it got lost later (I can't even find
where).

Reviewed-on: https://gerrit.libreoffice.org/69213
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 
(cherry picked from commit 4b48f5c2fd2d0d6de1e1df4c13ceba47b1da7b5e)

Change-Id: Ib1810cb9cf12e373c1cb41da40fa28e96ad7db28
Reviewed-on: https://gerrit.libreoffice.org/69851
Reviewed-by: Luboš Luňák 
Tested-by: Jenkins
Reviewed-by: Xisco Faulí 

diff --git a/vcl/qa/cppunit/pdfexport/data/tdf121615.odt 
b/vcl/qa/cppunit/pdfexport/data/tdf121615.odt
new file mode 100644
index ..7d2a87cf0e40
Binary files /dev/null and b/vcl/qa/cppunit/pdfexport/data/tdf121615.odt differ
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 78cec0a881d7..5c4b4a8c7141 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -21,6 +21,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -29,6 +30,15 @@
 
 using namespace ::com::sun::star;
 
+static std::ostream& operator<<(std::ostream& rStrm, const Color& rColor)
+{
+rStrm << "Color: R:" << static_cast(rColor.GetRed())
+  << " G:" << static_cast(rColor.GetGreen())
+  << " B:" << static_cast(rColor.GetBlue())
+  << " A:" << static_cast(rColor.GetTransparency());
+return rStrm;
+}
+
 namespace
 {
 
@@ -90,6 +100,7 @@ public:
 void testTdf105954();
 void testTdf106702();
 void testTdf113143();
+void testTdf121615();
 
 CPPUNIT_TEST_SUITE(PdfExportTest);
 CPPUNIT_TEST(testTdf106059);
@@ -120,6 +131,7 @@ public:
 CPPUNIT_TEST(testTdf105954);
 CPPUNIT_TEST(testTdf106702);
 CPPUNIT_TEST(testTdf113143);
+CPPUNIT_TEST(testTdf121615);
 CPPUNIT_TEST_SUITE_END();
 };
 
@@ -1465,6 +1477,52 @@ void PdfExportTest::testForcePoint71()
 topdf("forcepoint71.key");
 }
 
+void PdfExportTest::testTdf121615()
+{
+vcl::filter::PDFDocument aDocument;
+load("tdf121615.odt", aDocument);
+
+// The document has one page.
+std::vector aPages = aDocument.GetPages();
+CPPUNIT_ASSERT_EQUAL(static_cast(1), aPages.size());
+
+// Get access to the only image on the only page.
+vcl::filter::PDFObjectElement* pResources = 
aPages[0]->LookupObject("Resources");
+CPPUNIT_ASSERT(pResources);
+auto pXObjects = 
dynamic_cast(pResources->Lookup("XObject"));
+CPPUNIT_ASSERT(pXObjects);
+CPPUNIT_ASSERT_EQUAL(static_cast(1), pXObjects->GetItems().size());
+vcl::filter::PDFObjectElement* pXObject = 
pXObjects->LookupObject(pXObjects->GetItems().begin()->first);
+CPPUNIT_ASSERT(pXObject);
+vcl::filter::PDFStreamElement* pStream = pXObject->GetStream();
+CPPUNIT_ASSERT(pStream);
+SvMemoryStream& rObjectStream = pStream->GetMemory();
+
+// Load the embedded image.
+rObjectStream.Seek( 0 );
+GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
+Graphic aGraphic;
+sal_uInt16 format;
+ErrCode bResult = rFilter.ImportGraphic(aGraphic, OUString( "import" ), 
rObjectStream,
+GRFILTER_FORMAT_DONTKNOW, &format);
+CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE, bResult);
+
+// The image should be grayscale 8bit JPEG.
+sal_uInt16 jpegFormat = rFilter.GetImportFormatNumberForShortName( 
JPG_SHORTNAME );
+CPPUNIT_ASSERT( jpegFormat != GRFILTER_FORMAT_NOTFOUND );
+CPPUNIT_ASSERT_EQUAL( jpegFormat, format );
+BitmapEx aBitmap = aGraphic.GetBitmapEx();
+CPPUNIT_ASSERT_EQUAL( 200L, aBitmap.GetSizePixel().Width());
+CPPUNIT_ASSERT_EQUAL( 300L, aBitmap.GetSizePixel().Height());
+CPPUNIT_ASSERT_EQUAL( 8, int(aBitmap.GetBitCount()));
+// tdf#121615 was caused by broken handling of data width with 8bit color,
+// so the test image has some black in the bottomright corner, check it's 
there
+CPPUNIT_ASSERT_EQUAL( COL_WHITE, aBitmap.GetPixelColor( 0, 0 ));
+CPPUNIT_ASSERT_EQUAL( COL_WHITE, aBitmap.GetPixelColor( 0, 299 ));
+CPPUNIT_ASSERT_EQUAL( COL_WHITE, aBitmap.GetPixelColor( 199, 0 ));
+CPPUNIT_ASSERT_EQUAL( COL_BLACK, aBitmap.GetPixelColor( 199, 299 ));
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(PdfExpo

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

2019-03-28 Thread Henry Castro (via logerrit)
 svx/source/svdraw/svdedxv.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 465caa7f9dd9fb04c7f777193e0e4e7a9fe4ce41
Author: Henry Castro 
AuthorDate: Fri Mar 22 11:56:20 2019 -0400
Commit: Andras Timar 
CommitDate: Thu Mar 28 14:44:08 2019 +0100

tdf#124167: Changing text properties doesn't make presentation...

modified right away

when the attributes of edit engine has changed also broadcast the
changes

Change-Id: I28c67a4167e0b5653b6e9b645069830aa5575412
Reviewed-on: https://gerrit.libreoffice.org/69564
Tested-by: Jenkins
Reviewed-by: Henry Castro 
Reviewed-on: https://gerrit.libreoffice.org/69680
Reviewed-by: Aron Budea 
Tested-by: Aron Budea 
Reviewed-by: Andras Timar 

diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 72938cf77f26..0e018a5fe08b 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -2179,6 +2179,10 @@ bool SdrObjEditView::SetAttributes(const SfxItemSet& 
rSet, bool bReplaceAll)
 }
 pTextEditOutlinerView->SetAttribs(rSet);
 
+Outliner* pTEOutliner = pTextEditOutlinerView->GetOutliner();
+if (mpModel && pTEOutliner && pTEOutliner->IsModified())
+mpModel->SetChanged();
+
 #ifdef DBG_UTIL
 if (mpItemBrowser!=nullptr)
 mpItemBrowser->SetDirty();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-03-28 Thread Luboš Luňák (via logerrit)
 sc/source/core/data/simpleformulacalc.cxx |   10 ++
 sc/source/core/tool/interpr1.cxx  |   23 +--
 2 files changed, 19 insertions(+), 14 deletions(-)

New commits:
commit e68e9b2d61376b989bd4f61d38b7e06d0ee591cb
Author: Luboš Luňák 
AuthorDate: Tue Mar 12 15:41:46 2019 +0100
Commit: Xisco Faulí 
CommitDate: Thu Mar 28 14:41:41 2019 +0100

avoid a crash with an editor-forced matrix formula (tdf#123479)

Normally when ScInterpreter has bMatrixFormula set, pMyFormulaCell
is set as well (done in the ctor). But in some rare cases,
this may not be so, and some functions such as ScRandom() already
check for this. But not all do, tdf#123479 specifically crashes
because ec97496525f82f added AssertFormulaMatrix() to force
bMatrixFormula be set without pMyFormulaCell being set, and ScColumn()
doesn't handle this case.

Fix this by trying to pass ScFormulaCell* to ScInterpreter when
AssertFormulaMatrix() is used, this should ensure the result
in the formula editor fits better the edited formula. Since there
still may be cases when the cell is not set (e.g. editing a new
formula), also handle that case gracefully.

Ideally ScSimpleFormulaCalculator should pass ScMarkData to ScInterpreter
in such cases so that those functions use that when they can't use
GetMatColsRows(), but currently the handling of selections is rather
poor in the formula edit dialog: Non-array formulas are simply entered
in one cell and the selection is ignored, in case of a multi-selection
there's an error dialog only after the dialog is closed, and the result
field of the dialog is rather small and doesn't scroll, so e.g. matrix
result of ScRandom() wouldn't show more than one item anyway. Given that
tdf#123479 is a priority bug, better just fix it and possibly handle
selections better somewhen later.

Change-Id: I5fcbe1e358fac3623d4917eb0ead8eae00a1e153
Reviewed-on: https://gerrit.libreoffice.org/69161
Reviewed-by: Dennis Francis 
Reviewed-by: Markus Mohrhard 
Tested-by: Luboš Luňák 
(cherry picked from commit ade1df0948563b532a5d293c31d46a4f042559ee)
Reviewed-on: https://gerrit.libreoffice.org/69849
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 
Reviewed-by: Xisco Faulí 

diff --git a/sc/source/core/data/simpleformulacalc.cxx 
b/sc/source/core/data/simpleformulacalc.cxx
index 3ed2c173f3c6..972f5091cad5 100644
--- a/sc/source/core/data/simpleformulacalc.cxx
+++ b/sc/source/core/data/simpleformulacalc.cxx
@@ -45,14 +45,14 @@ void ScSimpleFormulaCalculator::Calculate()
 return;
 
 mbCalculated = true;
-ScInterpreter aInt(nullptr, mpDoc, mpDoc->GetNonThreadedContext(), maAddr, 
*mpCode);
-
-std::unique_ptr pNewLinkMgr( new 
sfx2::LinkManager(mpDoc->GetDocumentShell()) );
-aInt.SetLinkManager( pNewLinkMgr.get() );
 
+ScInterpreter aInt(mpDoc->GetFormulaCell( maAddr ), mpDoc, 
mpDoc->GetNonThreadedContext(), maAddr, *mpCode);
 if (mbMatrixFormula)
 aInt.AssertFormulaMatrix();
 
+std::unique_ptr pNewLinkMgr( new 
sfx2::LinkManager(mpDoc->GetDocumentShell()) );
+aInt.SetLinkManager( pNewLinkMgr.get() );
+
 formula::StackVar aIntType = aInt.Interpret();
 if ( aIntType == formula::svMatrixCell )
 {
@@ -94,6 +94,8 @@ bool ScSimpleFormulaCalculator::IsValue()
 
 bool ScSimpleFormulaCalculator::IsMatrix()
 {
+Calculate();
+
 return mbMatrixResult;
 }
 
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index fc0600368b7f..e7d00deb6aac 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -1738,11 +1738,12 @@ void ScInterpreter::ScPi()
 
 void ScInterpreter::ScRandom()
 {
-if (bMatrixFormula && pMyFormulaCell)
+if (bMatrixFormula)
 {
-SCCOL nCols;
-SCROW nRows;
-pMyFormulaCell->GetMatColsRows( nCols, nRows);
+SCCOL nCols = 0;
+SCROW nRows = 0;
+if(pMyFormulaCell)
+pMyFormulaCell->GetMatColsRows( nCols, nRows);
 // ScViewFunc::EnterMatrix() might be asking for
 // ScFormulaCell::GetResultDimensions(), which here are none so create
 // a 1x1 matrix at least which exactly is the case when EnterMatrix()
@@ -4385,9 +4386,10 @@ void ScInterpreter::ScColumn()
 nVal = aPos.Col() + 1;
 if (bMatrixFormula)
 {
-SCCOL nCols;
-SCROW nRows;
-pMyFormulaCell->GetMatColsRows( nCols, nRows);
+SCCOL nCols = 0;
+SCROW nRows = 0;
+if (pMyFormulaCell)
+pMyFormulaCell->GetMatColsRows( nCols, nRows);
 if (nCols == 0)
 {
 // Happens if called via ScViewFunc::EnterMatrix()
@@ -4488,9 +4490,10 @@ void ScInterpreter::ScRow()
 nVal = aPos.Row() + 1;
 if

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

2019-03-28 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/uiwriter/data2/tdf122942.odt |binary
 sw/qa/extras/uiwriter/uiwriter2.cxx   |   34 ++
 sw/source/core/frmedt/feshview.cxx|   23 
 3 files changed, 48 insertions(+), 9 deletions(-)

New commits:
commit 099623ce41dde76e80f8559abcbb9e03f292d688
Author: Miklos Vajna 
AuthorDate: Mon Jan 28 17:18:34 2019 +0100
Commit: Xisco Faulí 
CommitDate: Thu Mar 28 14:38:00 2019 +0100

tdf#122942 sw: update shape insert UI for the AddVerticalFrameOffsets option

Regression from commit 50223ea6e212b60b7d33839c2753c5601fb50f95
(tdf#98987 sw: add AddVerticalFrameOffsets compat mode, 2016-03-31),
SwFEShell::ImpEndCreate() was not adapted to call
SwTextFrame::GetBaseVertOffsetForFly() when determining the vertical
position of the inserted shape.

The call can be unconditional, the returned value is already 0 when the
DocumentSettingId::ADD_VERTICAL_FLY_OFFSETS compat setting is false.

(cherry picked from commit 4218caf142a7ecac34548c6d38c6f6fbebb898b9)

Conflicts:
sw/qa/extras/uiwriter/uiwriter2.cxx

Change-Id: Iec6af5a6d1ff3466e08377853cc8ca84f33a76d1
Reviewed-on: https://gerrit.libreoffice.org/69766
Tested-by: Jenkins
Reviewed-by: Xisco Faulí 

diff --git a/sw/qa/extras/uiwriter/data2/tdf122942.odt 
b/sw/qa/extras/uiwriter/data2/tdf122942.odt
new file mode 100644
index ..c56583d305f2
Binary files /dev/null and b/sw/qa/extras/uiwriter/data2/tdf122942.odt differ
diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx 
b/sw/qa/extras/uiwriter/uiwriter2.cxx
index c0d4fdd1d34b..52768e05086e 100644
--- a/sw/qa/extras/uiwriter/uiwriter2.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter2.cxx
@@ -22,6 +22,7 @@
 #include 
 #include 
 #include 
+#include 
 
 namespace
 {
@@ -43,6 +44,7 @@ public:
 void testTdf105413();
 void testTdf101873();
 void testTableWidth();
+void testTdf122942();
 
 CPPUNIT_TEST_SUITE(SwUiWriterTest2);
 CPPUNIT_TEST(testRedlineMoveInsertInDelete);
@@ -56,6 +58,7 @@ public:
 CPPUNIT_TEST(testTdf105413);
 CPPUNIT_TEST(testTdf101873);
 CPPUNIT_TEST(testTableWidth);
+CPPUNIT_TEST(testTdf122942);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -497,6 +500,37 @@ void SwUiWriterTest2::testTableWidth()
  getProperty(xTables->getByIndex(0), 
"RelativeWidth"));
 }
 
+void SwUiWriterTest2::testTdf122942()
+{
+load(DATA_DIRECTORY, "tdf122942.odt");
+SwXTextDocument* pTextDoc = 
dynamic_cast(mxComponent.get());
+SwWrtShell* pWrtShell = pTextDoc->GetDocShell()->GetWrtShell();
+
+// Do the moral equivalent of mouse button down, move and up.
+// Start creating a custom shape that overlaps with the rounded rectangle
+// already present in the document.
+Point aStartPos(8000, 3000);
+pWrtShell->BeginCreate(static_cast(OBJ_CUSTOMSHAPE), 
aStartPos);
+
+// Set its size.
+Point aMovePos(1, 5000);
+pWrtShell->MoveCreate(aMovePos);
+
+// Finish creation.
+pWrtShell->EndCreate(SdrCreateCmd::ForceEnd);
+
+// Make sure that the shape is inserted.
+SwDoc* pDoc = pWrtShell->GetDoc();
+const SwFrameFormats& rFormats = *pDoc->GetSpzFrameFormats();
+CPPUNIT_ASSERT_EQUAL(static_cast(2), rFormats.size());
+
+// Without the accompanying fix in place, this test would have failed with
+// 'Expected less than: 0; Actual  : 1030', i.e. the shape was below the
+// paragraph mark, not above it.
+const SwFormatVertOrient& rVert = rFormats[1]->GetVertOrient();
+CPPUNIT_ASSERT_LESS(static_cast(0), rVert.GetPos());
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SwUiWriterTest2);
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/frmedt/feshview.cxx 
b/sw/source/core/frmedt/feshview.cxx
index 0343286e18b5..0d7a871c52c3 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -1951,17 +1951,22 @@ bool SwFEShell::ImpEndCreate()
 nXOffset = 
pAnch->getFrameArea().Left()+pAnch->getFrameArea().Width()-rBound.Right();
 else
 nXOffset = rBound.Left() - pAnch->getFrameArea().Left();
-if( pAnch->IsTextFrame() && static_cast(pAnch)->IsFollow() )
+if (pAnch->IsTextFrame())
 {
 const SwTextFrame* pTmp = static_cast(pAnch);
-do {
-pTmp = pTmp->FindMaster();
-OSL_ENSURE( pTmp, "Where's my Master?" );
-// OD 2004-03-30 #i26791# - correction: add frame area height
-// of master frames.
-nYOffset += pTmp->IsVertical() ?
-pTmp->getFrameArea().Width() : 
pTmp->getFrameArea().Height();
-} while ( pTmp->IsFollow() );
+if (pTmp->IsFollow())
+{
+do {
+pTmp = pTmp->FindMaster();
+OSL_ENSURE(pTmp, "Where's my Master?");
+ 

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

2019-03-28 Thread Henry Castro (via logerrit)
 sw/source/core/doc/DocumentRedlineManager.cxx |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit c033d8e5a662eec3c1104b70f33cf0795c8c211c
Author: Henry Castro 
AuthorDate: Wed Mar 27 14:41:54 2019 -0400
Commit: Henry Castro 
CommitDate: Thu Mar 28 13:15:03 2019 +0100

tdf#120338: The paragraph formatting changes are not undone, part 1

Rejecting paragraph formatting is not implemented yet.
"Reject All" command is affected because the changes were not removed

Change-Id: Ic4af1def97025643ecbc5cf0752cd06d9b94c74a
Reviewed-on: https://gerrit.libreoffice.org/69865
Tested-by: Jenkins
Reviewed-by: Henry Castro 

diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx 
b/sw/source/core/doc/DocumentRedlineManager.cxx
index a94e9a514089..b5431a0a79e7 100644
--- a/sw/source/core/doc/DocumentRedlineManager.cxx
+++ b/sw/source/core/doc/DocumentRedlineManager.cxx
@@ -2656,6 +2656,7 @@ bool DocumentRedlineManager::RejectRedline( const SwPaM& 
rPam, bool bCallDelete
 
 void DocumentRedlineManager::AcceptAllRedline(bool bAccept)
 {
+bool bSuccess = true;
 OUString sUndoStr;
 IDocumentUndoRedo& rUndoMgr = m_rDoc.GetIDocumentUndoRedo();
 
@@ -2672,12 +2673,12 @@ void DocumentRedlineManager::AcceptAllRedline(bool 
bAccept)
 rUndoMgr.StartUndo(bAccept ? SwUndoId::ACCEPT_REDLINE : 
SwUndoId::REJECT_REDLINE, &aRewriter);
 }
 
-while (!mpRedlineTable->empty())
+while (!mpRedlineTable->empty() && bSuccess)
 {
 if (bAccept)
-AcceptRedline(mpRedlineTable->size() - 1, true);
+bSuccess = AcceptRedline(mpRedlineTable->size() - 1, true);
 else
-RejectRedline(mpRedlineTable->size() - 1, true);
+bSuccess = RejectRedline(mpRedlineTable->size() - 1, true);
 }
 
 if (!sUndoStr.isEmpty())
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-03-28 Thread Noel Grandin (via logerrit)
 sw/inc/docary.hxx|2 
 sw/source/core/crsr/crstrvl.cxx  |4 
 sw/source/core/doc/DocumentFieldsManager.cxx |  119 +--
 sw/source/core/doc/doc.cxx   |6 -
 sw/source/core/doc/docfld.cxx|2 
 sw/source/core/doc/doclay.cxx|4 
 sw/source/core/edit/edfld.cxx|   12 +-
 sw/source/core/edit/edfldexp.cxx |2 
 sw/source/core/fields/dbfld.cxx  |   11 +-
 sw/source/core/fields/fldlst.cxx |4 
 sw/source/core/unocore/unofield.cxx  |6 -
 sw/source/core/view/viewsh.cxx   |2 
 sw/source/filter/ww8/ww8atr.cxx  |2 
 sw/source/ui/fldui/fldvar.cxx|2 
 14 files changed, 92 insertions(+), 86 deletions(-)

New commits:
commit 2b80764ec0f7c8e2c85dbca67b9cb8a2e6b2b143
Author: Noel Grandin 
AuthorDate: Wed Mar 27 14:11:27 2019 +0200
Commit: Noel Grandin 
CommitDate: Thu Mar 28 13:14:11 2019 +0100

use unique_ptr for SwFieldTypes

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

diff --git a/sw/inc/docary.hxx b/sw/inc/docary.hxx
index 5e4ccce81f80..d0fda5beefa8 100644
--- a/sw/inc/docary.hxx
+++ b/sw/inc/docary.hxx
@@ -301,7 +301,7 @@ public:
 void dumpAsXml(xmlTextWriterPtr pWriter) const;
 };
 
-class SwFieldTypes : public SwVectorModifyBase {
+class SwFieldTypes : public std::vector> {
 public:
 void dumpAsXml(xmlTextWriterPtr pWriter) const;
 };
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index 41f4cbe9f669..bf45898fd82f 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -739,7 +739,7 @@ bool SwCursorShell::MoveFieldType(
 const size_t nSize = rFieldTypes.size();
 for( size_t i=0; i < nSize; ++i )
 {
-pFieldType = rFieldTypes[ i ];
+pFieldType = rFieldTypes[ i ].get();
 if ( SwFieldIds::SetExp == pFieldType->Which() )
 {
 ::lcl_MakeFieldLst( aSrtLst, *pFieldType, 
IsReadOnlyAvailable(), true );
@@ -753,7 +753,7 @@ bool SwCursorShell::MoveFieldType(
 const size_t nSize = rFieldTypes.size();
 for( size_t i=0; i < nSize; ++i )
 {
-pFieldType = rFieldTypes[ i ];
+pFieldType = rFieldTypes[ i ].get();
 if( nResType == pFieldType->Which() )
 {
 ::lcl_MakeFieldLst( aSrtLst, *pFieldType, 
IsReadOnlyAvailable() );
diff --git a/sw/source/core/doc/DocumentFieldsManager.cxx 
b/sw/source/core/doc/DocumentFieldsManager.cxx
index e27475de02b7..bbb8b0d03ba8 100644
--- a/sw/source/core/doc/DocumentFieldsManager.cxx
+++ b/sw/source/core/doc/DocumentFieldsManager.cxx
@@ -228,20 +228,20 @@ SwFieldType* DocumentFieldsManager::InsertFieldType(const 
SwFieldType &rFieldTyp
 for( ; i < nSize; ++i )
 if( nFieldWhich == (*mpFieldTypes)[i]->Which() &&
 rSCmp.isEqual( sFieldNm, (*mpFieldTypes)[i]->GetName() ))
-return (*mpFieldTypes)[i];
+return (*mpFieldTypes)[i].get();
 }
 break;
 
 case SwFieldIds::TableOfAuthorities:
 for( ; i < nSize; ++i )
 if( nFieldWhich == (*mpFieldTypes)[i]->Which() )
-return (*mpFieldTypes)[i];
+return (*mpFieldTypes)[i].get();
 break;
 
 default:
 for( i = 0; i < nSize; ++i )
 if( nFieldWhich == (*mpFieldTypes)[i]->Which() )
-return (*mpFieldTypes)[i];
+return (*mpFieldTypes)[i].get();
 }
 
 std::unique_ptr pNew = rFieldTyp.Copy();
@@ -270,10 +270,10 @@ SwFieldType* DocumentFieldsManager::InsertFieldType(const 
SwFieldType &rFieldTyp
 default: break;
 }
 
-mpFieldTypes->insert( mpFieldTypes->begin() + nSize, pNew.release() );
+mpFieldTypes->insert( mpFieldTypes->begin() + nSize, std::move(pNew) );
 m_rDoc.getIDocumentState().SetModified();
 
-return (*mpFieldTypes)[ nSize ];
+return (*mpFieldTypes)[ nSize ].get();
 }
 
 /// @returns the field type of the Doc
@@ -281,7 +281,7 @@ SwFieldType *DocumentFieldsManager::GetSysFieldType( const 
SwFieldIds eWhich ) c
 {
 for( SwFieldTypes::size_type i = 0; i < INIT_FLDTYPES; ++i )
 if( eWhich == (*mpFieldTypes)[i]->Which() )
-return (*mpFieldTypes)[i];
+return (*mpFieldTypes)[i].get();
 return nullptr;
 }
 
@@ -318,7 +318,7 @@ SwFieldType* DocumentFieldsManager::GetFieldType(
 SwFieldType* pRet = nullptr;
 for( ; i < nSize; ++i )
 {
-SwFieldType* pFieldType = (*mpFieldTypes)[i];
+SwFieldType* pFieldType = (*mpFieldTypes)[i].get();
 
 if (nResId == pFieldType->Which())
 {
@@ -345,7 +34

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

2019-03-28 Thread Noel Grandin (via logerrit)
 sc/source/ui/attrdlg/scdlgfact.cxx |8 
 sc/source/ui/attrdlg/scdlgfact.hxx |   18 +-
 2 files changed, 13 insertions(+), 13 deletions(-)

New commits:
commit 0892ec50c2fe2ff1f26c7a4ea2fdef74e3d027d7
Author: Noel Grandin 
AuthorDate: Thu Mar 28 10:27:25 2019 +0200
Commit: Noel Grandin 
CommitDate: Thu Mar 28 13:13:53 2019 +0100

loplugin:useuniqueptr in sc dialog constructors

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

diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx 
b/sc/source/ui/attrdlg/scdlgfact.cxx
index 581391c4857a..740c06ffc2a2 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -931,25 +931,25 @@ VclPtr 
ScAbstractDialogFactory_Impl::CreateScDPSubtotal
 
 VclPtr 
ScAbstractDialogFactory_Impl::CreateScDPNumGroupDlg(weld::Window* pParent, 
const ScDPNumGroupInfo& rInfo)
 {
-return VclPtr::Create(new 
ScDPNumGroupDlg(pParent, rInfo));
+return 
VclPtr::Create(std::make_unique(pParent,
 rInfo));
 }
 
 VclPtr 
ScAbstractDialogFactory_Impl::CreateScDPDateGroupDlg(
 weld::Window* pParent, const ScDPNumGroupInfo& rInfo, sal_Int32 
nDatePart, const Date& rNullDate)
 {
-return VclPtr::Create(new 
ScDPDateGroupDlg(pParent, rInfo, nDatePart, rNullDate));
+return 
VclPtr::Create(std::make_unique(pParent,
 rInfo, nDatePart, rNullDate));
 }
 
 VclPtr 
ScAbstractDialogFactory_Impl::CreateScDPShowDetailDlg (
 weld::Window* pParent, ScDPObject& rDPObj, 
css::sheet::DataPilotFieldOrientation nOrient )
 {
-return VclPtr::Create(new 
ScDPShowDetailDlg(pParent, rDPObj, nOrient));
+return 
VclPtr::Create(std::make_unique(pParent,
 rDPObj, nOrient));
 }
 
 VclPtr 
ScAbstractDialogFactory_Impl::CreateScNewScenarioDlg(weld::Window* pParent, 
const OUString& rName,
 bool bEdit, bool bSheetProtected)
 {
-return VclPtr::Create(new 
ScNewScenarioDlg(pParent, rName, bEdit, bSheetProtected));
+return 
VclPtr::Create(std::make_unique(pParent,
 rName, bEdit, bSheetProtected));
 }
 
 VclPtr 
ScAbstractDialogFactory_Impl::CreateScShowTabDlg(weld::Window* pParent)
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx 
b/sc/source/ui/attrdlg/scdlgfact.hxx
index 4d762f219742..aa8c949c337f 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -428,8 +428,8 @@ class AbstractScDPNumGroupDlg_Impl : public 
AbstractScDPNumGroupDlg
 {
 std::unique_ptr m_xDlg;
 public:
-explicit AbstractScDPNumGroupDlg_Impl(ScDPNumGroupDlg* p)
-: m_xDlg(p)
+explicit AbstractScDPNumGroupDlg_Impl(std::unique_ptr p)
+: m_xDlg(std::move(p))
 {
 }
 virtual short Execute() override;
@@ -440,8 +440,8 @@ class AbstractScDPDateGroupDlg_Impl : public 
AbstractScDPDateGroupDlg
 {
 std::unique_ptr m_xDlg;
 public:
-explicit AbstractScDPDateGroupDlg_Impl(ScDPDateGroupDlg* p)
-: m_xDlg(p)
+explicit AbstractScDPDateGroupDlg_Impl(std::unique_ptr p)
+: m_xDlg(std::move(p))
 {
 }
 virtual short Execute() override;
@@ -451,10 +451,10 @@ public:
 
 class AbstractScDPShowDetailDlg_Impl : public AbstractScDPShowDetailDlg
 {
-std::shared_ptr m_xDlg;
+std::unique_ptr m_xDlg;
 public:
-explicit AbstractScDPShowDetailDlg_Impl(ScDPShowDetailDlg* p)
-: m_xDlg(p)
+explicit AbstractScDPShowDetailDlg_Impl(std::unique_ptr 
p)
+: m_xDlg(std::move(p))
 {
 }
 virtual short Execute() override;
@@ -465,8 +465,8 @@ class AbstractScNewScenarioDlg_Impl : public 
AbstractScNewScenarioDlg
 {
 std::unique_ptr m_xDlg;
 public:
-explicit AbstractScNewScenarioDlg_Impl(ScNewScenarioDlg* p)
-: m_xDlg(p)
+explicit AbstractScNewScenarioDlg_Impl(std::unique_ptr p)
+: m_xDlg(std::move(p))
 {
 }
 virtual short   Execute() override;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-03-28 Thread Serge Krot (via logerrit)
 sw/qa/extras/ooxmlexport/data/tdf121456.docx  |binary
 sw/qa/extras/ooxmlexport/ooxmlexport11.cxx|   10 ++
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |3 +++
 3 files changed, 13 insertions(+)

New commits:
commit e47a5543f4b8c9e317d1e43af8c0e5a732e461fd
Author: Serge Krot 
AuthorDate: Wed Mar 27 14:02:51 2019 +0100
Commit: Thorsten Behrens 
CommitDate: Thu Mar 28 13:08:16 2019 +0100

tdf#121456 sw: DOCX: fix loading of empty TOC title

Change-Id: Ib241edd07e4c6781d80db274f73146bda310d8c0
Reviewed-on: https://gerrit.libreoffice.org/69827
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 

diff --git a/sw/qa/extras/ooxmlexport/data/tdf121456.docx 
b/sw/qa/extras/ooxmlexport/data/tdf121456.docx
new file mode 100644
index ..a65870a9b719
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf121456.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index a846bf70636d..d9e324b0e07f 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -153,6 +153,16 @@ DECLARE_OOXMLEXPORT_TEST(testTdf121561_tocTitle, 
"tdf121456_tabsOffset.odt")
 assertXPath(pXmlDoc, 
"/w:document/w:body/w:sdt/w:sdtPr/w:docPartObj/w:docPartUnique", 1);
 }
 
+// Related issue tdf#121561: w:sdt/w:sdtContent around TOC
+DECLARE_OOXMLEXPORT_TEST(testTdf124106, "tdf121456.docx")
+{
+uno::Reference textDocument(mxComponent, 
uno::UNO_QUERY);
+uno::Reference text(textDocument->getText(), uno::UNO_QUERY);
+// -1 if the 'Y' character does not occur
+CPPUNIT_ASSERT_EQUAL(sal_Int32(-1), text->getString().indexOf('Y'));
+CPPUNIT_ASSERT_EQUAL(sal_Int32(-1), text->getString().indexOf('y'));
+}
+
 DECLARE_OOXMLEXPORT_TEST(testTdf121561_tocTitleDocx, 
"tdf121456_tabsOffset.odt")
 {
 xmlDocPtr pXmlDoc = parseExport();
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index be4c43385cd8..bfaab409a1c5 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -3856,6 +3856,9 @@ void DomainMapper_Impl::handleToc
 {
 if (aTocTitle.isEmpty() || bTableOfFigures)
 {
+// reset marker of the TOC title
+m_xStdEntryStart = uno::Reference< text::XTextRange >();
+
 xTOC.set(
 m_xTextFactory->createInstance
 ( bTableOfFigures ?
___
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-5.3' - filter/source sd/qa

2019-03-28 Thread Samuel Mehrbrodt (via logerrit)
 filter/source/svg/svgexport.cxx |   20 +---
 sd/qa/unit/SVGExportTests.cxx   |   15 +++
 sd/qa/unit/data/odp/textbox-link-javascript.odp |binary
 3 files changed, 28 insertions(+), 7 deletions(-)

New commits:
commit f62c1ca76fff9f95c537a4b392b1473f14751903
Author: Samuel Mehrbrodt 
AuthorDate: Mon Mar 4 09:38:02 2019 +0100
Commit: Andras Timar 
CommitDate: Thu Mar 28 12:43:59 2019 +0100

Check svg URLs before exporting

Reviewed-on: https://gerrit.libreoffice.org/68668
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit 34ec46571701d639d9bc542b2d19f87a21a83648)

Change-Id: I3b86b6b82318b0d201c3d7db516664520eb47bed

diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index 7db79d29d473..b05d045fd733 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -43,6 +43,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1810,13 +1811,18 @@ bool SVGFilter::implExportShape( const Reference< 
XShape >& rxShape, bool bMaste
 
 if( !aBookmark.isEmpty() )
 {
-mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, 
"xlink:href", aBookmark);
-SvXMLElementExport alinkA( *mpSVGExport, 
XML_NAMESPACE_NONE, "a", true, true );
-mpSVGWriter->WriteMetaFile( aTopLeft, aSize, rMtf,
-0x,
-pElementId,
-&rxShape,
-pEmbeddedBitmapsMtf );
+INetURLObject aINetURLObject(aBookmark);
+if (!aINetURLObject.HasError()
+&& aINetURLObject.GetProtocol() != 
INetProtocol::Javascript)
+{
+mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, 
"xlink:href", aBookmark);
+SvXMLElementExport alinkA( *mpSVGExport, 
XML_NAMESPACE_NONE, "a", true, true );
+mpSVGWriter->WriteMetaFile( aTopLeft, aSize, 
rMtf,
+0x,
+pElementId,
+&rxShape,
+
pEmbeddedBitmapsMtf );
+}
 }
 else
 {
diff --git a/sd/qa/unit/SVGExportTests.cxx b/sd/qa/unit/SVGExportTests.cxx
index d241822caecc..4269c817f833 100644
--- a/sd/qa/unit/SVGExportTests.cxx
+++ b/sd/qa/unit/SVGExportTests.cxx
@@ -111,8 +111,23 @@ public:
 assertXPath(svgDoc, MAKE_PATH_STRING( 
/SVG_SVG/SVG_G[2]/SVG_G/SVG_G/SVG_G/SVG_G/SVG_G[2]/SVG_G/SVG_TEXT/SVG_TSPAN ), 
"text-decoration", "line-through");
 }
 
+void testSVGExportJavascriptURL()
+{
+executeExport("textbox-link-javascript.odp");
+
+xmlDocPtr svgDoc = parseXml(maTempFile);
+CPPUNIT_ASSERT(svgDoc);
+
+// There should be only one child (no link to javascript url)
+assertXPathChildren(svgDoc,
+MAKE_PATH_STRING(/ SVG_SVG / SVG_G[2] / SVG_G / 
SVG_G / SVG_G / SVG_G
+ / SVG_G[4] / SVG_G),
+1);
+}
+
 CPPUNIT_TEST_SUITE(SdSVGFilterTest);
 CPPUNIT_TEST(testSVGExportTextDecorations);
+CPPUNIT_TEST(testSVGExportJavascriptURL);
 CPPUNIT_TEST_SUITE_END();
 };
 
diff --git a/sd/qa/unit/data/odp/textbox-link-javascript.odp 
b/sd/qa/unit/data/odp/textbox-link-javascript.odp
new file mode 100644
index ..c046cf0c7de5
Binary files /dev/null and b/sd/qa/unit/data/odp/textbox-link-javascript.odp 
differ
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Changes to 'refs/tags/cp-5.3-64'

2019-03-28 Thread Samuel Mehrbrodt (via logerrit)
Tag 'cp-5.3-64' created by Andras Timar  at 
2019-03-28 11:44 +

cp-5.3-64

Changes since cp-5.3-63-7:
---
 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 'refs/tags/cp-5.3-64' - 0 commits -

2019-03-28 Thread (via logerrit)
Rebased ref, commits from common ancestor:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-03-28 Thread Noel Grandin (via logerrit)
 editeng/source/editeng/impedit.hxx  |4 ++--
 editeng/source/editeng/impedit4.cxx |   19 +--
 2 files changed, 11 insertions(+), 12 deletions(-)

New commits:
commit e74de110d16c95414fac7541c8fe6541d4597113
Author: Noel Grandin 
AuthorDate: Thu Mar 28 09:39:49 2019 +0200
Commit: Noel Grandin 
CommitDate: Thu Mar 28 12:33:40 2019 +0100

loplugin:useuniqueptr in ImpEditEngine::WriteItemListAsRTF

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

diff --git a/editeng/source/editeng/impedit.hxx 
b/editeng/source/editeng/impedit.hxx
index a1e332f6db05..3ff954d9bf79 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -658,9 +658,9 @@ private:
 voidWriteXML(SvStream& rOutput, const EditSelection& rSel);
 
 voidWriteItemAsRTF( const SfxPoolItem& rItem, SvStream& 
rOutput, sal_Int32 nPara, sal_Int32 nPos,
-std::vector& rFontTable, 
SvxColorList& rColorList );
+std::vector>& 
rFontTable, SvxColorList& rColorList );
 boolWriteItemListAsRTF( ItemList& rLst, SvStream& rOutput, 
sal_Int32 nPara, sal_Int32 nPos,
-std::vector& rFontTable, 
SvxColorList& rColorList );
+std::vector>& 
rFontTable, SvxColorList& rColorList );
 sal_Int32   LogicToTwips( sal_Int32 n );
 
 inline shortGetXValue( short nXValue ) const;
diff --git a/editeng/source/editeng/impedit4.cxx 
b/editeng/source/editeng/impedit4.cxx
index b26d2856ceee..8a9c4d31d1c7 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -240,7 +240,7 @@ ErrCode ImpEditEngine::WriteText( SvStream& rOutput, 
EditSelection aSel )
 }
 
 bool ImpEditEngine::WriteItemListAsRTF( ItemList& rLst, SvStream& rOutput, 
sal_Int32 nPara, sal_Int32 nPos,
-std::vector& rFontTable, SvxColorList& 
rColorList )
+std::vector>& rFontTable, 
SvxColorList& rColorList )
 {
 const SfxPoolItem* pAttrItem = rLst.First();
 while ( pAttrItem )
@@ -297,11 +297,11 @@ ErrCode ImpEditEngine::WriteRTF( SvStream& rOutput, 
EditSelection aSel )
 rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252;
 
 // Generate and write out Font table  ...
-std::vector aFontTable;
+std::vector> aFontTable;
 // default font must be up front, so DEF font in RTF
-aFontTable.push_back( new SvxFontItem( 
aEditDoc.GetItemPool().GetDefaultItem( EE_CHAR_FONTINFO ) ) );
-aFontTable.push_back( new SvxFontItem( 
aEditDoc.GetItemPool().GetDefaultItem( EE_CHAR_FONTINFO_CJK ) ) );
-aFontTable.push_back( new SvxFontItem( 
aEditDoc.GetItemPool().GetDefaultItem( EE_CHAR_FONTINFO_CTL ) ) );
+aFontTable.emplace_back( new SvxFontItem( 
aEditDoc.GetItemPool().GetDefaultItem( EE_CHAR_FONTINFO ) ) );
+aFontTable.emplace_back( new SvxFontItem( 
aEditDoc.GetItemPool().GetDefaultItem( EE_CHAR_FONTINFO_CJK ) ) );
+aFontTable.emplace_back( new SvxFontItem( 
aEditDoc.GetItemPool().GetDefaultItem( EE_CHAR_FONTINFO_CTL ) ) );
 for ( sal_uInt16 nScriptType = 0; nScriptType < 3; nScriptType++ )
 {
 sal_uInt16 nWhich = EE_CHAR_FONTINFO;
@@ -327,7 +327,7 @@ ErrCode ImpEditEngine::WriteRTF( SvStream& rOutput, 
EditSelection aSel )
 }
 
 if ( !bAlreadyExist )
-aFontTable.push_back( new SvxFontItem( *pFontItem ) );
+aFontTable.emplace_back( new SvxFontItem( *pFontItem ) );
 }
 }
 
@@ -335,7 +335,7 @@ ErrCode ImpEditEngine::WriteRTF( SvStream& rOutput, 
EditSelection aSel )
 rOutput.WriteChar( '{' ).WriteCharPtr( OOO_STRING_SVTOOLS_RTF_FONTTBL );
 for ( std::vector::size_type j = 0; j < aFontTable.size(); 
j++ )
 {
-SvxFontItem* pFontItem = aFontTable[ j ];
+SvxFontItem* pFontItem = aFontTable[ j ].get();
 rOutput.WriteChar( '{' );
 rOutput.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_F );
 rOutput.WriteUInt32AsString( j );
@@ -652,15 +652,14 @@ ErrCode ImpEditEngine::WriteRTF( SvStream& rOutput, 
EditSelection aSel )
 rOutput.WriteCharPtr( "}}" );// 1xparentheses paragraphs, 
1xparentheses RTF document
 rOutput.Flush();
 
-for (auto& pItem : aFontTable)
-delete pItem;
+aFontTable.clear();
 
 return rOutput.GetError();
 }
 
 
 void ImpEditEngine::WriteItemAsRTF( const SfxPoolItem& rItem, SvStream& 
rOutput, sal_Int32 nPara, sal_Int32 nPos,
-std::vector& rFontTable, 
SvxColorList& rColorList )
+std::vector>& 
rFontTable, SvxColorList& rColorList )
 {
 sal_uInt16 nWhich = rItem.Which();
 switch ( nWhich )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
h

[Libreoffice-commits] online.git: Changes to 'refs/tags/3.4.4-1'

2019-03-28 Thread Libreoffice Gerrit user
Tag '3.4.4-1' created by Andras Timar  at 
2019-03-28 11:32 +

3.4.4-1

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

[Libreoffice-commits] core.git: Changes to 'refs/tags/cp-5.3-64'

2019-03-28 Thread Andras Timar (via logerrit)
Tag 'cp-5.3-64' created by Andras Timar  at 
2019-03-28 11:31 +

cp-5.3-64

Changes since cp-5.3-63-6:
---
 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/cp-5.3-64'

2019-03-28 Thread Libreoffice Gerrit user
Tag 'cp-5.3-64' created by Andras Timar  at 
2019-03-28 11:31 +

cp-5.3-64

Changes since cp-5.3-53-2:
---
 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/cp-5.3-64'

2019-03-28 Thread Libreoffice Gerrit user
Tag 'cp-5.3-64' created by Andras Timar  at 
2019-03-28 11:31 +

cp-5.3-64

Changes since cp-5.3-10:
Olivier R (1):
  tdf#107558 French spelling dictionary (6.0.3) and thesaurus

---
 fr_FR/README_fr.txt   |4 
 fr_FR/description.xml |2 
 fr_FR/fr.aff  |17751 ++--
 fr_FR/fr.dic  |155369 
+-
 fr_FR/package-description.txt |2 
 fr_FR/thes_fr.dat |  206 
 6 files changed, 88495 insertions(+), 84839 deletions(-)
---
___
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/cp-5.3-64'

2019-03-28 Thread Libreoffice Gerrit user
Tag 'cp-5.3-64' created by Andras Timar  at 
2019-03-28 11:31 +

cp-5.3-64

Changes since libreoffice-5-3-branch-point-28:
---
 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 'distro/collabora/cp-5.3' - configure.ac

2019-03-28 Thread Andras Timar (via logerrit)
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2707e4b156e2398db964a00c2cae517efdf5e86c
Author: Andras Timar 
AuthorDate: Thu Mar 28 11:16:37 2019 +0100
Commit: Andras Timar 
CommitDate: Thu Mar 28 11:16:37 2019 +0100

Bump version to 5.3-64

Change-Id: Ibc884b489375d5cfc9a05be14ade4119e75cbee5

diff --git a/configure.ac b/configure.ac
index b723da35736b..57061ccfd731 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for 
the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no 
idea.
 
-AC_INIT([Collabora Office],[5.3.10.63],[],[],[https://collaboraoffice.com/])
+AC_INIT([Collabora Office],[5.3.10.64],[],[],[https://collaboraoffice.com/])
 
 AC_PREREQ([2.59])
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3' - 4 commits - configure.ac debian/changelog debian/control loleaflet/dist loleaflet/src loolwsd.spec.in test/UnitWOPISave

2019-03-28 Thread Libreoffice Gerrit user
 configure.ac  |2 +-
 debian/changelog  |6 ++
 debian/control|2 +-
 loleaflet/dist/toolbar/toolbar.js |4 +++-
 loleaflet/src/layer/tile/TileLayer.js |2 ++
 loolwsd.spec.in   |2 +-
 test/UnitWOPISaveAs.cpp   |   10 ++
 test/WopiTestServer.hpp   |2 +-
 wsd/ClientSession.cpp |   14 +-
 9 files changed, 30 insertions(+), 14 deletions(-)

New commits:
commit 6931f9b2771d0fd58085ddf11a5c05baa59936d5
Author: Andras Timar 
AuthorDate: Thu Mar 28 11:13:16 2019 +0100
Commit: Andras Timar 
CommitDate: Thu Mar 28 12:30:03 2019 +0100

Bump package version to 3.4.4-1 and updated dependencies

Change-Id: I752a862aff6b6c01108b9f11b78d018a669ea293

diff --git a/configure.ac b/configure.ac
index b1f54a955..6bed901c3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@
 
 AC_PREREQ([2.63])
 
-AC_INIT([loolwsd], [3.4.3], [libreoffice@lists.freedesktop.org])
+AC_INIT([loolwsd], [3.4.4], [libreoffice@lists.freedesktop.org])
 LT_INIT([shared, disable-static, dlopen])
 
 AM_INIT_AUTOMAKE([1.10 subdir-objects tar-pax -Wno-portability])
diff --git a/debian/changelog b/debian/changelog
index aad29b23a..e324af6e7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+loolwsd (3.4.4-1) unstable; urgency=medium
+
+  * see the git log: http://col.la/cool3
+
+ -- Andras Timar   Thu, 28 Mar 2019 10:30:00 +0100
+
 loolwsd (3.4.3-1) unstable; urgency=medium
 
   * see the git log: http://col.la/cool3
diff --git a/debian/control b/debian/control
index 00c38b69d..e814c92a8 100644
--- a/debian/control
+++ b/debian/control
@@ -8,7 +8,7 @@ Standards-Version: 3.9.7
 Package: loolwsd
 Section: web
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, libsm6, libxinerama1, 
libxrender1, libgl1-mesa-glx, libcups2, libxcb-render0, libxcb-shm0, 
locales-all, adduser, expat, fontconfig, cpio, libcap2-bin, 
collaboraofficebasis5.3-calc (>= 5.3.10.62), collaboraofficebasis5.3-core (>= 
5.3.10.62), collaboraofficebasis5.3-graphicfilter (>= 5.3.10.62), 
collaboraofficebasis5.3-images (>= 5.3.10.62), collaboraofficebasis5.3-impress 
(>= 5.3.10.62), collaboraofficebasis5.3-ooofonts (>= 5.3.10.62), 
collaboraofficebasis5.3-writer (>= 5.3.10.62), collaboraoffice5.3 (>= 
5.3.10.62), collaboraoffice5.3-ure (>= 5.3.10.62), 
collaboraofficebasis5.3-en-us (>= 5.3.10.62), 
collaboraofficebasis5.3-en-us-calc (>= 5.3.10.62), 
collaboraofficebasis5.3-en-us-res (>= 5.3.10.62), 
collaboraofficebasis5.3-noto-fonts (>= 5.3.10.62), collaboraofficebasis5.3-draw 
(>= 5.3.10.62), collaboraofficebasis5.3-extension-pdf-import (>= 5.3.10.62), 
collaboraofficebasis5.3-filter-data (>= 5.3.10.62), 
collaboraofficebasis5.3-ooolinguisti
 c (>= 5.3.10.62), collaboraoffice5.3-dict-en (>= 5.3.10.62)
+Depends: ${shlibs:Depends}, ${misc:Depends}, libsm6, libxinerama1, 
libxrender1, libgl1-mesa-glx, libcups2, libxcb-render0, libxcb-shm0, 
locales-all, adduser, expat, fontconfig, cpio, libcap2-bin, 
collaboraofficebasis5.3-calc (>= 5.3.10.64), collaboraofficebasis5.3-core (>= 
5.3.10.64), collaboraofficebasis5.3-graphicfilter (>= 5.3.10.64), 
collaboraofficebasis5.3-images (>= 5.3.10.64), collaboraofficebasis5.3-impress 
(>= 5.3.10.64), collaboraofficebasis5.3-ooofonts (>= 5.3.10.64), 
collaboraofficebasis5.3-writer (>= 5.3.10.64), collaboraoffice5.3 (>= 
5.3.10.64), collaboraoffice5.3-ure (>= 5.3.10.64), 
collaboraofficebasis5.3-en-us (>= 5.3.10.64), 
collaboraofficebasis5.3-en-us-calc (>= 5.3.10.64), 
collaboraofficebasis5.3-en-us-res (>= 5.3.10.64), 
collaboraofficebasis5.3-noto-fonts (>= 5.3.10.64), collaboraofficebasis5.3-draw 
(>= 5.3.10.64), collaboraofficebasis5.3-extension-pdf-import (>= 5.3.10.64), 
collaboraofficebasis5.3-filter-data (>= 5.3.10.64), 
collaboraofficebasis5.3-ooolinguisti
 c (>= 5.3.10.64), collaboraoffice5.3-dict-en (>= 5.3.10.64)
 Conflicts: collaboraofficebasis5.3-gnome-integration, 
collaboraofficebasis5.3-kde-integration
 Description: LibreOffice Online WebSocket Daemon
  LOOLWSD is a daemon that talks to web browser clients and provides LibreOffice
diff --git a/loolwsd.spec.in b/loolwsd.spec.in
index a02960c11..4134620e5 100644
--- a/loolwsd.spec.in
+++ b/loolwsd.spec.in
@@ -38,7 +38,7 @@ BuildRequires:  libcap-progs linux-glibc-devel 
systemd-rpm-macros
 BuildRequires:  libcap-progs
 %endif
 
-Requires:   collaboraoffice5.3 >= 5.3.10.62 collaboraoffice5.3-ure >= 
5.3.10.62 collaboraofficebasis5.3-core >= 5.3.10.62 
collaboraofficebasis5.3-writer >= 5.3.10.62 collaboraofficebasis5.3-impress >= 
5.3.10.62 collaboraofficebasis5.3-graphicfilter >= 5.3.10.62 
collaboraofficebasis5.3-en-US >= 5.3.10.62 collaboraofficebasis5.3-calc >= 
5.3.10.62 collaboraofficebasis5.3-en-US-res >= 5.3.10.62 
collaboraofficebasis5.3-en-US-calc >= 5.3.10.62 
collaboraofficebasis5.3-ooofonts >= 5.3.10.62 collaboraofficebasis5.3-images >= 
5.3.10.6

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

2019-03-28 Thread Noel Grandin (via logerrit)
 sw/source/core/doc/tblcpy.cxx |   13 ++---
 1 file changed, 6 insertions(+), 7 deletions(-)

New commits:
commit ee5b332e34962b79ecd24e9fd111d307aabcbf7d
Author: Noel Grandin 
AuthorDate: Thu Mar 28 11:03:22 2019 +0200
Commit: Noel Grandin 
CommitDate: Thu Mar 28 12:06:28 2019 +0100

use unique_ptr in SwTable::InsTable

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

diff --git a/sw/source/core/doc/tblcpy.cxx b/sw/source/core/doc/tblcpy.cxx
index 7d56989b5735..43e06fce73e2 100644
--- a/sw/source/core/doc/tblcpy.cxx
+++ b/sw/source/core/doc/tblcpy.cxx
@@ -800,7 +800,7 @@ bool SwTable::InsTable( const SwTable& rCpyTable, const 
SwSelBoxes& rSelBoxes,
 
 SwTableNumFormatMerge aTNFM( *pCpyDoc, *pDoc );
 
-FndLine_ *pFLine, *pInsFLine = nullptr;
+FndLine_ *pFLine;
 FndBox_ aFndBox( nullptr, nullptr );
 // Find all Boxes/Lines
 {
@@ -887,11 +887,12 @@ bool SwTable::InsTable( const SwTable& rCpyTable, const 
SwSelBoxes& rSelBoxes,
 SwTableLine* pLine = pFLine->GetLine();
 SwTableBox* pSttBox = pFLine->GetBoxes()[0]->GetBox();
 const SwTableBoxes::size_type nSttBox = pLine->GetBoxPos( pSttBox 
);
+std::unique_ptr pInsFLine;
 if( nLn >= nFndCnt )
 {
 // We have more rows in the ClipBoard than we have selected
-pInsFLine = new FndLine_( GetTabLines()[ nSttLine + nLn ],
-&aFndBox );
+pInsFLine.reset(new FndLine_( GetTabLines()[ nSttLine + nLn ],
+&aFndBox ));
 pLine = pInsFLine->GetLine();
 }
 SwTableLine* pCpyLn = rCpyTable.GetTabLines()[ nLn %
@@ -904,7 +905,6 @@ bool SwTable::InsTable( const SwTable& rCpyTable, const 
SwSelBoxes& rSelBoxes,
 if( pLine->GetTabBoxes().size() < nSttBox ||
 pLine->GetTabBoxes().size() - nSttBox < 
pFLine->GetBoxes().size() )
 {
-delete pInsFLine;
 return false;
 }
 
@@ -914,15 +914,14 @@ bool SwTable::InsTable( const SwTable& rCpyTable, const 
SwSelBoxes& rSelBoxes,
 SwTableBox *pTmpBox = pLine->GetTabBoxes()[ nSttBox + nBx 
];
 if( !pTmpBox->GetSttNd() )
 {
-delete pInsFLine;
 return false;
 }
 // if Ok, insert the Box into the FndLine
-pFndBox = new FndBox_( pTmpBox, pInsFLine );
+pFndBox = new FndBox_( pTmpBox, pInsFLine.get() );
 pInsFLine->GetBoxes().insert( 
pInsFLine->GetBoxes().begin() + nBx,
 std::unique_ptr(pFndBox));
 }
-aFndBox.GetLines().insert( aFndBox.GetLines().begin() + nLn, 
std::unique_ptr(pInsFLine));
+aFndBox.GetLines().insert( aFndBox.GetLines().begin() + nLn, 
std::move(pInsFLine));
 }
 else if( pFLine->GetBoxes().size() == 1 )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

cppunittest crashes building dbaccess_hsqldb

2019-03-28 Thread Alexander Thurgood
Hi all,

I am getting repeat crashes in cppunittest when attempting to build
dbaccess_hsqldb from master on macOS.

I opened a bug report and enclosed a trace :

https://bugs.documentfoundation.org/show_bug.cgi?id=124374

but Xisco suggested I raise it here instead.

Unfortunately, this stops the LO build from completing at the moment.



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

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

2019-03-28 Thread Vasily Melenchuk (via logerrit)
 toolkit/source/controls/controlmodelcontainerbase.cxx |9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 4abb7335529a66346a2a68a089b9c8438faa2e39
Author: Vasily Melenchuk 
AuthorDate: Tue Mar 26 15:23:28 2019 +0300
Commit: Thorsten Behrens 
CommitDate: Thu Mar 28 11:52:16 2019 +0100

tdf#124385: toolkit: do not fail if ResourceListener is not defined

If current control (for example TabPageContainer) is missing
resource listener property we should not fail script with
exception. Just behave as with empty ResourceListener.

Change-Id: I260feec775a5d197bebc9414b652dd6f89e35035
Reviewed-on: https://gerrit.libreoffice.org/69740
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 

diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx 
b/toolkit/source/controls/controlmodelcontainerbase.cxx
index a7721a72146a..10da911540e2 100644
--- a/toolkit/source/controls/controlmodelcontainerbase.cxx
+++ b/toolkit/source/controls/controlmodelcontainerbase.cxx
@@ -1741,6 +1741,9 @@ void 
ControlContainerBase::ImplStartListingForResourceEvents()
 {
 Reference< resource::XStringResourceResolver > xStringResourceResolver;
 
+if ( !ImplHasProperty(PROPERTY_RESOURCERESOLVER) )
+return;
+
 ImplGetPropertyValue( PROPERTY_RESOURCERESOLVER ) >>= 
xStringResourceResolver;
 
 // Add our helper as listener to retrieve notifications about changes
@@ -1757,7 +1760,11 @@ void ControlContainerBase::ImplUpdateResourceResolver()
 {
 Reference< resource::XStringResourceResolver > xStringResourceResolver;
 
-ImplGetPropertyValue( PROPERTY_RESOURCERESOLVER ) >>= 
xStringResourceResolver;
+if ( !ImplHasProperty(PROPERTY_RESOURCERESOLVER) )
+return;
+
+ImplGetPropertyValue(PROPERTY_RESOURCERESOLVER) >>= 
xStringResourceResolver;
+
 if ( !xStringResourceResolver.is() )
 return;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: dbaccess/source desktop/source libreofficekit/qa sc/source sd/source sfx2/source svtools/source svx/source sw/source unotools/source vcl/source

2019-03-28 Thread Noel Grandin (via logerrit)
 dbaccess/source/ext/macromigration/migrationengine.cxx |2 +-
 desktop/source/app/app.cxx |4 ++--
 desktop/source/deployment/manager/dp_manager.cxx   |2 +-
 libreofficekit/qa/unit/tiledrendering.cxx  |2 +-
 sc/source/core/data/markdata.cxx   |2 +-
 sd/source/ui/func/futext.cxx   |6 +++---
 sd/source/ui/view/OutlinerIterator.cxx |5 ++---
 sd/source/ui/view/outlview.cxx |2 +-
 sfx2/source/appl/appquit.cxx   |2 +-
 sfx2/source/doc/objxtor.cxx|2 +-
 svtools/source/control/valueset.cxx|   13 ++---
 svx/source/sidebar/line/LinePropertyPanelBase.cxx  |6 +++---
 svx/source/unodraw/unoshape.cxx|4 ++--
 sw/source/core/table/swtable.cxx   |4 ++--
 sw/source/core/undo/unattr.cxx |7 +++
 sw/source/core/undo/unsect.cxx |2 +-
 sw/source/core/undo/untbl.cxx  |2 +-
 sw/source/core/unocore/unotext.cxx |2 +-
 sw/source/filter/ww8/docxattributeoutput.cxx   |   12 ++--
 sw/source/filter/ww8/rtfattributeoutput.cxx|6 +++---
 sw/source/uibase/dochdl/swdtflvr.cxx   |2 +-
 unotools/source/ucbhelper/xtempfile.cxx|8 ++--
 vcl/source/filter/graphicfilter.cxx|2 +-
 23 files changed, 42 insertions(+), 57 deletions(-)

New commits:
commit de6f36cc2fb359332205ba836f8396a1cdbe44c2
Author: Noel Grandin 
AuthorDate: Wed Mar 27 08:55:47 2019 +0200
Commit: Noel Grandin 
CommitDate: Thu Mar 28 11:13:21 2019 +0100

simplify reset(nullptr) -> reset()

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

diff --git a/dbaccess/source/ext/macromigration/migrationengine.cxx 
b/dbaccess/source/ext/macromigration/migrationengine.cxx
index 80df6c2a1826..7ff4d349e935 100644
--- a/dbaccess/source/ext/macromigration/migrationengine.cxx
+++ b/dbaccess/source/ext/macromigration/migrationengine.cxx
@@ -1305,7 +1305,7 @@ namespace dbmm
 
 // now that the concrete scripts storage does not have any 
elements anymore,
 // remove it
-xScriptsRoot.reset( nullptr ); // need to reset the storage to be 
allowed to remove it
+xScriptsRoot.reset(nullptr); // need to reset the storage to be 
allowed to remove it
 aDocStorage.removeScriptTypeStorage( _eScriptType );
 
 // done so far
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 1f910a6b1f21..e584858b3191 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1731,8 +1731,8 @@ int Desktop::doShutdown()
 
 // be sure that path/language options gets destroyed before
 // UCB is deinitialized
-pExecGlobals->pLanguageOptions.reset( nullptr );
-pExecGlobals->pPathOptions.reset( nullptr );
+pExecGlobals->pLanguageOptions.reset();
+pExecGlobals->pPathOptions.reset();
 
 comphelper::ThreadPool::getSharedOptimalPool().shutdown();
 
diff --git a/desktop/source/deployment/manager/dp_manager.cxx 
b/desktop/source/deployment/manager/dp_manager.cxx
index 12098a26a733..f4718e5c738f 100644
--- a/desktop/source/deployment/manager/dp_manager.cxx
+++ b/desktop/source/deployment/manager/dp_manager.cxx
@@ -486,7 +486,7 @@ void PackageManagerImpl::disposing()
 m_xLogFile.clear();
 try_dispose( m_xRegistry );
 m_xRegistry.clear();
-m_activePackagesDB.reset(nullptr);
+m_activePackagesDB.reset();
 m_xComponentContext.clear();
 
 t_pm_helper::disposing();
diff --git a/libreofficekit/qa/unit/tiledrendering.cxx 
b/libreofficekit/qa/unit/tiledrendering.cxx
index 7d605e7a5839..d0c128fb3a34 100644
--- a/libreofficekit/qa/unit/tiledrendering.cxx
+++ b/libreofficekit/qa/unit/tiledrendering.cxx
@@ -270,7 +270,7 @@ void TiledRenderingTest::testDocumentLoadLanguage(Office* 
pOffice)
 OString aResult = pDocument->getTextSelection("text/plain;charset=utf-8");
 CPPUNIT_ASSERT_EQUAL(OString("3\n"), aResult);
 
-pDocument.reset(nullptr);
+pDocument.reset();
 
 // FIXME: LOK will fail when trying to open a locked file
 remove(sLockFile.c_str());
diff --git a/sc/source/core/data/markdata.cxx b/sc/source/core/data/markdata.cxx
index 8332746878fa..daccf44f62a6 100644
--- a/sc/source/core/data/markdata.cxx
+++ b/sc/source/core/data/markdata.cxx
@@ -837,7 +837,7 @@ void ScMarkData::GetSelectionCover( ScRange& rRange )
 }
 }
 if ( bCurColUnMarked )
-pPrevColMarkedRows.reset( nullptr );
+pPrevColMarkedRows.reset();
 else

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

2019-03-28 Thread Henry Castro (via logerrit)
 svx/source/svdraw/svdedxv.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 2e559e129b751c14956abdaaa1a6b69a4006e67b
Author: Henry Castro 
AuthorDate: Fri Mar 22 11:56:20 2019 -0400
Commit: Andras Timar 
CommitDate: Thu Mar 28 11:02:21 2019 +0100

tdf#124167: Changing text properties doesn't make presentation...

modified right away

when the attributes of edit engine has changed also broadcast the
changes

Change-Id: I28c67a4167e0b5653b6e9b645069830aa5575412
Reviewed-on: https://gerrit.libreoffice.org/69564
Tested-by: Jenkins
Reviewed-by: Henry Castro 
Reviewed-on: https://gerrit.libreoffice.org/69875
Reviewed-by: Aron Budea 
Tested-by: Aron Budea 
Reviewed-by: Andras Timar 

diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index d35b11e1b0f5..8df5d748c635 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -1835,6 +1835,10 @@ bool SdrObjEditView::SetAttributes(const SfxItemSet& 
rSet, bool bReplaceAll)
 }
 pTextEditOutlinerView->SetAttribs(rSet);
 
+Outliner* pTEOutliner = pTextEditOutlinerView->GetOutliner();
+if (mpModel && pTEOutliner && pTEOutliner->IsModified())
+mpModel->SetChanged();
+
 #ifdef DBG_UTIL
 if (mpItemBrowser!=nullptr)
 mpItemBrowser->SetDirty();
___
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/co-6.0-27'

2019-03-28 Thread Libreoffice Gerrit user
Tag 'co-6.0-27' created by Andras Timar  at 
2019-03-28 09:59 +

co-6.0-27

Changes since co-6.0-24:
Andras Timar (1):
  tdf#123500 double '~' character in translation

---
 source/fr/officecfg/registry/data/org/openoffice/Office/UI.po |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Changes to 'refs/tags/co-6.0-27'

2019-03-28 Thread Tor Lillqvist (via logerrit)
Tag 'co-6.0-27' created by Andras Timar  at 
2019-03-28 09:59 +

co-6.0-27

Changes since cp-6.0-27-56:
---
 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/co-6.0-27'

2019-03-28 Thread Libreoffice Gerrit user
Tag 'co-6.0-27' created by Andras Timar  at 
2019-03-28 09:59 +

co-6.0-27

Changes since cp-6.0-19:
Andras Timar (1):
  remove executable bit from *.aff and *.dic files

---
 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/co-6.0-27'

2019-03-28 Thread Libreoffice Gerrit user
Tag 'co-6.0-27' created by Andras Timar  at 
2019-03-28 09:59 +

co-6.0-27

Changes since cp-6.0-7:
Adolfo Jayme Barrientos (1):
  .howtoget, now more Collabora-y

---
 help3xsl/default.css |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'feature/cib_contract57c' - vcl/win

2019-03-28 Thread Samuel Mehrbrodt (via logerrit)
Rebased ref, commits from common ancestor:
commit 5cc94657e68c66d81cca1d41d937ef89016325b7
Author: Samuel Mehrbrodt 
AuthorDate: Tue Mar 26 15:08:12 2019 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Thu Mar 28 10:34:58 2019 +0100

Fix windows build

After 54ac2b203a6dd974c0153996ba67b26d585e98e1

Change-Id: I805415dfa75568d843fceb5a79b637aac337ffd4

diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx
index b0158f9154d5..f3d0cf97811e 100644
--- a/vcl/win/gdi/salfont.cxx
+++ b/vcl/win/gdi/salfont.cxx
@@ -932,6 +932,7 @@ void WinSalGraphics::SetFont( const FontSelectPattern* 
pFont, int nFallbackLevel
 // WinSalGraphics::GetEmbedFontData does not set mpFontInstance
 // since it is interested in font file data only.
 mpWinFontEntry[ nFallbackLevel ] = reinterpret_cast( 
pFont->mpFontInstance.get() );
+WinFontInstance *pFontInstance = 
static_cast(pFont->mpFontInstance.get());
 
 HFONT hOldFont = nullptr;
 HFONT hNewFont = pFontInstance ? pFontInstance->GetHFONT() : nullptr;
@@ -970,7 +971,6 @@ void WinSalGraphics::SetFont( const FontSelectPattern* 
pFont, int nFallbackLevel
 }
 if (mpWinFontEntry[i])
 {
-GetWinFontEntry(i)->Release();
 mpWinFontEntry[i] = nullptr;
 }
 mfFontScale[i] = 1.0;
@@ -1363,7 +1363,7 @@ void WinSalGraphics::ClearDevFontCache()
 
 bool WinSalGraphics::GetGlyphBoundRect(const GlyphItem& rGlyph, 
tools::Rectangle& rRect)
 {
-WinFontInstance* pFont = mpWinFontEntry[rGlyph.mnFallbackLevel];
+rtl::Reference pFont = 
mpWinFontEntry[rGlyph.mnFallbackLevel];
 HFONT hNewFont = pFont ? pFont->GetHFONT() : 
mhFonts[rGlyph.mnFallbackLevel];
 float fFontScale = pFont ? pFont->GetScale() : 
mfFontScale[rGlyph.mnFallbackLevel];
 
@@ -1572,7 +1572,7 @@ bool WinSalGraphics::GetGlyphOutline(const GlyphItem& 
rGlyph,
 // rescaling needed for the tools::PolyPolygon conversion
 if( rB2DPolyPoly.count() )
 {
-WinFontInstance *pFont = mpWinFontEntry[rGlyph.mnFallbackLevel];
+rtl::Reference pFont = 
mpWinFontEntry[rGlyph.mnFallbackLevel];
 float fFontScale = pFont ? pFont->GetScale() : 
mfFontScale[rGlyph.mnFallbackLevel];
 const double fFactor(fFontScale/256);
 
rB2DPolyPoly.transform(basegfx::utils::createScaleB2DHomMatrix(fFactor, 
fFactor));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: avmedia/source basctl/source cui/source desktop/qa forms/source include/IwyuFilter_include.yaml include/sfx2 sc/inc sc/IwyuFilter_sc.yaml sc/source sd/inc sd/IwyuFilter

2019-03-28 Thread Gabor Kelemen (via logerrit)
 avmedia/source/viewer/mediawindow.cxx   |1 
 basctl/source/basicide/basobj3.cxx  |1 
 basctl/source/basicide/iderdll.cxx  |1 
 basctl/source/basicide/moduldl2.cxx |1 
 cui/source/dialogs/hldocntp.cxx |1 
 cui/source/options/optgdlg.cxx  |1 
 cui/source/options/optupdt.cxx  |1 
 cui/source/tabpages/autocdlg.cxx|1 
 desktop/qa/desktop_lib/test_desktop_lib.cxx |1 
 forms/source/component/ImageControl.cxx |2 +
 forms/source/richtext/richtextcontrol.cxx   |1 
 include/IwyuFilter_include.yaml |3 ++
 include/sfx2/emojicontrol.hxx   |5 +--
 include/sfx2/emojipopup.hxx |2 -
 include/sfx2/emojiview.hxx  |2 -
 include/sfx2/event.hxx  |5 +--
 include/sfx2/evntconf.hxx   |7 +
 include/sfx2/fcontnr.hxx|   21 ++--
 include/sfx2/filedlghelper.hxx  |   18 +++--
 include/sfx2/frame.hxx  |   15 ---
 include/sfx2/frmdescr.hxx   |1 
 include/sfx2/frmhtml.hxx|4 ---
 include/sfx2/frmhtmlw.hxx   |   12 +++--
 include/sfx2/ipclient.hxx   |8 +++---
 include/sfx2/linkmgr.hxx|1 
 include/sfx2/linksrc.hxx|9 +++---
 include/sfx2/lnkbase.hxx|7 +++--
 include/sfx2/lokcharthelper.hxx |4 +--
 include/sfx2/lokhelper.hxx  |2 -
 include/sfx2/mailmodelapi.hxx   |   12 ++---
 include/sfx2/mgetempl.hxx   |   11 +---
 include/sfx2/mieclip.hxx|6 
 include/sfx2/module.hxx |   13 +++--
 include/sfx2/msg.hxx|3 --
 include/sfx2/msgpool.hxx|3 --
 sc/IwyuFilter_sc.yaml   |3 ++
 sc/inc/scmod.hxx|1 
 sc/source/core/tool/ddelink.cxx |1 
 sc/source/ui/dbgui/csvgrid.cxx  |2 +
 sc/source/ui/docshell/docsh4.cxx|1 
 sc/source/ui/docshell/servobj.cxx   |1 
 sc/source/ui/drawfunc/fuins2.cxx|1 
 sc/source/ui/inc/anyrefdg.hxx   |1 
 sc/source/ui/unoobj/appluno.cxx |1 
 sc/source/ui/unoobj/scdetect.cxx|2 +
 sc/source/ui/view/viewfun4.cxx  |1 
 sd/IwyuFilter_sd.yaml   |2 +
 sd/inc/sdmod.hxx|1 
 sd/source/core/drawdoc3.cxx |1 
 sd/source/core/drawdoc4.cxx |1 
 sd/source/ui/dlg/PhotoAlbumDialog.cxx   |1 
 sd/source/ui/dlg/vectdlg.cxx|1 
 sd/source/ui/func/fuinsert.cxx  |1 
 sd/source/ui/view/drviews2.cxx  |1 
 sfx2/source/appl/appcfg.cxx |1 
 sfx2/source/appl/appopen.cxx|1 
 sfx2/source/appl/childwin.cxx   |1 
 sfx2/source/appl/impldde.hxx|1 
 sfx2/source/appl/shutdownicon.cxx   |1 
 sfx2/source/bastyp/frmhtml.cxx  |1 
 sfx2/source/bastyp/frmhtmlw.cxx |2 +
 sfx2/source/config/evntconf.cxx |1 
 sfx2/source/control/emojicontrol.cxx|1 
 sfx2/source/control/sfxstatuslistener.cxx   |1 
 sfx2/source/control/unoctitm.cxx|1 
 sfx2/source/dialog/filedlghelper.cxx|1 
 sfx2/source/dialog/filedlgimpl.hxx  |1 
 sfx2/source/dialog/filtergrouping.cxx   |1 
 sfx2/source/dialog/partwnd.cxx  |1 
 sfx2/source/dialog/splitwin.cxx |2 +
 sfx2/source/doc/objcont.cxx |1 
 sfx2/source/doc/sfxbasemodel.cxx|1 
 sfx2/source/doc/templatedlg.cxx |1 
 sfx2/source/inc/workwin.hxx |1 
 sfx2/source/sidebar/SidebarToolBox.cxx  | 

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

2019-03-28 Thread Libreoffice Gerrit user
 loleaflet/src/layer/tile/TileLayer.js |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 421e4a4d8408805b3a6950082d9656085e6157bf
Author: Tor Lillqvist 
AuthorDate: Thu Mar 7 13:26:22 2019 +0200
Commit: Tor Lillqvist 
CommitDate: Thu Mar 28 11:22:38 2019 +0200

tdf#123874: Don't do the SVG preview thing in the iOS app as it crashes 
WebKit

Sure, this is just a stopgap solution, it would be good to figure out
a way to have the functionality working.

diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index 726cb622b..42c880e57 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -657,7 +657,12 @@ L.TileLayer = L.GridLayer.extend({

this._twipsToLatLng(topLeftTwips, this._map.getZoom()),

this._twipsToLatLng(bottomRightTwips, this._map.getZoom()));
this._graphicSelectionAngle = (strTwips.length === 5) ? 
parseInt(strTwips[4]) : 0;
-   this._map._socket.sendMessage('rendershapeselection 
mimetype=image/svg+xml');
+   // Workaround for tdf#123874. For some reason the 
handling of the
+   // shapeselectioncontent messages that we get back 
causes the WebKit process
+   // to crash on iOS.
+   if (!window.ThisIsTheiOSApp) {
+   
this._map._socket.sendMessage('rendershapeselection mimetype=image/svg+xml');
+   }
}
 
this._onUpdateGraphicSelection();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-03-28 Thread Gülşah Köse (via logerrit)
 sd/sdi/drtxtob.sdi |   12 +
 sd/source/ui/func/fudraw.cxx   |2 +
 sd/source/ui/func/fuoltext.cxx |2 +
 sd/source/ui/func/fuparagr.cxx |2 +
 sd/source/ui/func/futext.cxx   |2 +
 sd/source/ui/view/drtxtob.cxx  |2 +
 sd/source/ui/view/drtxtob1.cxx |   53 +
 7 files changed, 75 insertions(+)

New commits:
commit 6f41502b82fa108246b7547d9da3c6bf6b42f72f
Author: Gülşah Köse 
AuthorDate: Wed Mar 27 18:40:37 2019 +0300
Commit: Miklos Vajna 
CommitDate: Thu Mar 28 09:50:45 2019 +0100

Implement sidebar increase/decrease indent buttons on Impress

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

diff --git a/sd/sdi/drtxtob.sdi b/sd/sdi/drtxtob.sdi
index a317ee8eec09..6e29a20899ef 100644
--- a/sd/sdi/drtxtob.sdi
+++ b/sd/sdi/drtxtob.sdi
@@ -191,6 +191,18 @@ shell TextObjectBar
 StateMethod = GetAttrState;
 ]
 
+SID_INC_INDENT
+[
+ExecMethod = Execute;
+StateMethod = GetAttrState;
+]
+
+SID_DEC_INDENT
+[
+ExecMethod = Execute;
+StateMethod = GetAttrState;
+]
+
 SID_ATTR_PARA_LRSPACE
 [
 ExecMethod = Execute ;
diff --git a/sd/source/ui/func/fudraw.cxx b/sd/source/ui/func/fudraw.cxx
index 272c0ceee90d..142188e5414c 100644
--- a/sd/source/ui/func/fudraw.cxx
+++ b/sd/source/ui/func/fudraw.cxx
@@ -970,6 +970,8 @@ bool FuDraw::cancel()
 bReturn = true;
 
 SfxBindings& rBindings = mpViewShell->GetViewFrame()->GetBindings();
+rBindings.Invalidate( SID_DEC_INDENT );
+rBindings.Invalidate( SID_INC_INDENT );
 rBindings.Invalidate( SID_PARASPACE_INCREASE );
 rBindings.Invalidate( SID_PARASPACE_DECREASE );
 }
diff --git a/sd/source/ui/func/fuoltext.cxx b/sd/source/ui/func/fuoltext.cxx
index 5d53b3aa09f5..adfd2b3ef121 100644
--- a/sd/source/ui/func/fuoltext.cxx
+++ b/sd/source/ui/func/fuoltext.cxx
@@ -72,6 +72,8 @@ static const sal_uInt16 SidArray[] = {
 SID_SET_SUPER_SCRIPT,
 SID_SET_SUB_SCRIPT,
 SID_HYPERLINK_GETLINK,
+SID_DEC_INDENT,
+SID_INC_INDENT,
 SID_PARASPACE_INCREASE,
 SID_PARASPACE_DECREASE,
 SID_STATUS_PAGE,
diff --git a/sd/source/ui/func/fuparagr.cxx b/sd/source/ui/func/fuparagr.cxx
index 703d3cf87558..ad1e66432233 100644
--- a/sd/source/ui/func/fuparagr.cxx
+++ b/sd/source/ui/func/fuparagr.cxx
@@ -141,6 +141,8 @@ void FuParagraph::DoExecute( SfxRequest& rReq )
 SID_ATTR_PARA_LINESPACE_20,
 SID_ATTR_PARA_ULSPACE,
 SID_ATTR_PARA_LRSPACE,
+SID_DEC_INDENT,
+SID_INC_INDENT,
 SID_ATTR_PARA_LEFT_TO_RIGHT,
 SID_ATTR_PARA_RIGHT_TO_LEFT,
 SID_RULER_TEXT_RIGHT_TO_LEFT,
diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx
index 3d5cdaae3ea3..c43afe218495 100644
--- a/sd/source/ui/func/futext.cxx
+++ b/sd/source/ui/func/futext.cxx
@@ -123,6 +123,8 @@ static const sal_uInt16 SidArray[] = {
 SID_ATTR_TRANSFORM_AUTOWIDTH, //   10310
 SID_ATTR_TRANSFORM_AUTOHEIGHT,//   10311 //Added
 SID_HYPERLINK_GETLINK,//   10361
+SID_DEC_INDENT,   //   10461
+SID_INC_INDENT,   //   10462
 SID_CHARMAP,  //   10503
 SID_TEXTDIRECTION_LEFT_TO_RIGHT,  //   10907
 SID_TEXTDIRECTION_TOP_TO_BOTTOM,  //   10908
diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx
index fc55682275e9..b4430486834d 100644
--- a/sd/source/ui/view/drtxtob.cxx
+++ b/sd/source/ui/view/drtxtob.cxx
@@ -434,6 +434,8 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
 rSet.DisableItem( SID_ATTR_PARA_LINESPACE_10 );
 rSet.DisableItem( SID_ATTR_PARA_LINESPACE_15 );
 rSet.DisableItem( SID_ATTR_PARA_LINESPACE_20 );
+rSet.DisableItem( SID_DEC_INDENT );
+rSet.DisableItem( SID_INC_INDENT );
 rSet.DisableItem( SID_PARASPACE_INCREASE );
 rSet.DisableItem( SID_PARASPACE_DECREASE );
 rSet.DisableItem( SID_TEXTDIRECTION_TOP_TO_BOTTOM );
diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx
index 898643cb79e3..2cdd86ad58a2 100644
--- a/sd/source/ui/view/drtxtob1.cxx
+++ b/sd/source/ui/view/drtxtob1.cxx
@@ -130,6 +130,59 @@ void TextObjectBar::Execute( SfxRequest &rReq )
 }
 break;
 
+case SID_INC_INDENT:
+case SID_DEC_INDENT:
+{
+if( pOLV )
+{
+ESelection aSel = pOLV->GetSelection();
+aSel.Adjust();
+sal_Int32 nStartPara = aSel.nStartPara;
+sal_Int32 nEndPara = aSel.nEndPara;
+if( !aSel.HasRange() )
+{
+nStartPara = 0;
+nEndPara = pOL

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

2019-03-28 Thread Tor Lillqvist (via logerrit)
 sfx2/source/doc/objserv.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f9735ee624798dd765c77b33f381f540ed2e261f
Author: Tor Lillqvist 
AuthorDate: Thu Mar 28 10:25:51 2019 +0200
Commit: Tor Lillqvist 
CommitDate: Thu Mar 28 10:33:06 2019 +0200

Use SAL_FALLTHROUGH

Change-Id: I81729dba0bce380303bdbe7c8fcdeca943df477d

diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 12ab4a400ac8..3a1a7f0da512 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -661,7 +661,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
 }
 }
 }
-[[fallthrough]];
+SAL_FALLTHROUGH;
 case SID_EXPORTDOCASPDF:
 bIsPDFExport = true;
 SAL_FALLTHROUGH;
___
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' - 5 commits - include/vcl sd/source vcl/inc vcl/source

2019-03-28 Thread Jan Holesovsky (via logerrit)
 include/vcl/graph.hxx|1 
 include/vcl/pdfread.hxx  |5 -
 sd/source/filter/pdf/sdpdffilter.cxx |5 -
 vcl/inc/impgraph.hxx |3 
 vcl/source/filter/graphicfilter.cxx  |2 
 vcl/source/filter/ipdf/pdfread.cxx   |  125 +++
 vcl/source/gdi/graph.cxx |6 -
 vcl/source/gdi/impgraph.cxx  |   82 +++---
 vcl/source/gdi/pdfextoutdevdata.cxx  |2 
 9 files changed, 87 insertions(+), 144 deletions(-)

New commits:
commit bb4f5258a221dd6c429d94686f1641377d61b951
Author: Jan Holesovsky 
AuthorDate: Thu Mar 28 09:07:13 2019 +0100
Commit: Jan Holesovsky 
CommitDate: Thu Mar 28 09:07:13 2019 +0100

Revert "vcl: share GfxLink"

This reverts commit c8f81dbb30e89a19bb7a82f8b52cc02b9049e717.

diff --git a/sd/source/filter/pdf/sdpdffilter.cxx 
b/sd/source/filter/pdf/sdpdffilter.cxx
index a4747456123b..26d7c70bdd54 100644
--- a/sd/source/filter/pdf/sdpdffilter.cxx
+++ b/sd/source/filter/pdf/sdpdffilter.cxx
@@ -111,8 +111,7 @@ bool SdPdfFilter::Import()
 const size_t nGraphicContentSize = aPdfData.getLength();
 std::unique_ptr pGraphicContent(new 
sal_uInt8[nGraphicContentSize]);
 memcpy(pGraphicContent.get(), aPdfData.get(), nGraphicContentSize);
-std::shared_ptr pGfxLink(std::make_shared(
-std::move(pGraphicContent), nGraphicContentSize, 
GfxLinkType::NativePdf));
+GfxLink aGfxLink(std::move(pGraphicContent), nGraphicContentSize, 
GfxLinkType::NativePdf);
 auto pPdfData = std::make_shared>(aPdfData);
 
 mrDocument.CreateFirstPages();
diff --git a/vcl/inc/impgraph.hxx b/vcl/inc/impgraph.hxx
index c462dc2c67ac..1a8563e95db0 100644
--- a/vcl/inc/impgraph.hxx
+++ b/vcl/inc/impgraph.hxx
@@ -45,7 +45,7 @@ private:
 std::unique_ptr   mpAnimation;
 std::shared_ptr mpContext;
 std::shared_ptr mpSwapFile;
-std::shared_ptr mpGfxLink;
+std::unique_ptr mpGfxLink;
 GraphicType  meType;
 mutable sal_uLongmnSizeBytes;
 bool mbSwapOut;
@@ -160,7 +160,7 @@ private:
 
 boolImplIsSwapOut() const { return mbSwapOut;}
 boolImplIsDummyContext() const { return mbDummyContext; }
-voidImplSetLink( const std::shared_ptr& );
+voidImplSetLink( const GfxLink& );
 GfxLink ImplGetLink();
 boolImplIsLink() const;
 
diff --git a/vcl/source/filter/graphicfilter.cxx 
b/vcl/source/filter/graphicfilter.cxx
index 7a869a7aee4b..e7f86486d792 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -1854,7 +1854,7 @@ ErrCode GraphicFilter::ImportGraphic( Graphic& rGraphic, 
const OUString& rPath,
 }
 if( nStatus == ERRCODE_NONE )
 {
-rGraphic.SetLink(GfxLink(std::move(pGraphicContent), 
nGraphicContentSize, eLinkType));
+rGraphic.SetLink( GfxLink( std::move(pGraphicContent), 
nGraphicContentSize, eLinkType ) );
 }
 }
 
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index 2d73357ec43d..8027d0d85b1d 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -115,7 +115,6 @@ ImpGraphic::ImpGraphic(const ImpGraphic& rImpGraphic)
 , maSwapInfo(rImpGraphic.maSwapInfo)
 , mpContext(rImpGraphic.mpContext)
 , mpSwapFile(rImpGraphic.mpSwapFile)
-, mpGfxLink(rImpGraphic.mpGfxLink)
 , meType(rImpGraphic.meType)
 , mnSizeBytes(rImpGraphic.mnSizeBytes)
 , mbSwapOut(rImpGraphic.mbSwapOut)
@@ -125,6 +124,9 @@ ImpGraphic::ImpGraphic(const ImpGraphic& rImpGraphic)
 , maGraphicExternalLink(rImpGraphic.maGraphicExternalLink)
 , mnPageNumber(rImpGraphic.mnPageNumber)
 {
+if( rImpGraphic.mpGfxLink )
+mpGfxLink = o3tl::make_unique( *rImpGraphic.mpGfxLink );
+
 if( rImpGraphic.mpAnimation )
 {
 mpAnimation = o3tl::make_unique( *rImpGraphic.mpAnimation );
@@ -237,7 +239,10 @@ ImpGraphic& ImpGraphic::operator=( const ImpGraphic& 
rImpGraphic )
 mbSwapOut = rImpGraphic.mbSwapOut;
 mpSwapFile = rImpGraphic.mpSwapFile;
 
-mpGfxLink = rImpGraphic.mpGfxLink;
+mpGfxLink.reset();
+
+if( rImpGraphic.mpGfxLink )
+mpGfxLink = o3tl::make_unique( *rImpGraphic.mpGfxLink );
 
 maVectorGraphicData = rImpGraphic.maVectorGraphicData;
 mpPdfData = rImpGraphic.mpPdfData;
@@ -1365,11 +1370,11 @@ bool ImpGraphic::ImplSwapIn( SvStream* xIStm )
 return bRet;
 }
 
-void ImpGraphic::ImplSetLink(const GfxLink& rGfxLink)
+void ImpGraphic::ImplSetLink( const GfxLink& rGfxLink )
 {
-mpGfxLink = rGfxLink;
+mpGfxLink = o3tl::make_unique( rGfxLink );
 
-if (mpGfxLink && mpGfxLink->IsNative())
+if( mpGfxLink->IsNative() )
 mpGfxLink->SwapOut();
 }
 
@@ -1484,7 +1489,7 @@ void ReadImpGraphic( SvStream& rIStm, ImpGraphic& 
rImpGraphic )
 

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

2019-03-28 Thread Noel Grandin (via logerrit)
 package/source/xstor/xstorage.cxx |   10 +-
 package/source/xstor/xstorage.hxx |2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 4fda02a8310dbb42b504f379e3f2f594391b16cb
Author: Noel Grandin 
AuthorDate: Wed Mar 27 11:26:09 2019 +0200
Commit: Noel Grandin 
CommitDate: Thu Mar 28 09:21:26 2019 +0100

return unique_ptr from CreateNewStorageImpl

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

diff --git a/package/source/xstor/xstorage.cxx 
b/package/source/xstor/xstorage.cxx
index 59fc6ac888c1..1130c344ce51 100644
--- a/package/source/xstor/xstorage.cxx
+++ b/package/source/xstor/xstorage.cxx
@@ -1365,7 +1365,7 @@ void OStorage_Impl::InsertRawStream( const OUString& 
aName, const uno::Reference
 m_bBroadcastModified = true;
 }
 
-OStorage_Impl* OStorage_Impl::CreateNewStorageImpl( sal_Int32 nStorageMode )
+std::unique_ptr OStorage_Impl::CreateNewStorageImpl( sal_Int32 
nStorageMode )
 {
 SAL_WARN_IF( !m_xPackage.is(), "package.xstor", "Not possible to refer to 
package as to factory!" );
 if ( !m_xPackage.is() )
@@ -1381,8 +1381,8 @@ OStorage_Impl* OStorage_Impl::CreateNewStorageImpl( 
sal_Int32 nStorageMode )
 throw io::IOException( THROW_WHERE );
 
 uno::Reference< container::XNameContainer > xPackageSubFolder( 
xNewElement, uno::UNO_QUERY_THROW );
-OStorage_Impl* pResult =
-new OStorage_Impl( this, nStorageMode, xPackageSubFolder, 
m_xPackage, m_xContext, m_nStorageType );
+std::unique_ptr pResult(
+new OStorage_Impl( this, nStorageMode, xPackageSubFolder, 
m_xPackage, m_xContext, m_nStorageType ));
 pResult->m_bIsModified = true;
 
 return pResult;
@@ -1392,7 +1392,7 @@ SotElement_Impl* OStorage_Impl::InsertStorage( const 
OUString& aName, sal_Int32
 {
 SotElement_Impl* pNewElement = InsertElement( aName, true );
 
-pNewElement->m_xStorage.reset(CreateNewStorageImpl(nStorageMode));
+pNewElement->m_xStorage = CreateNewStorageImpl(nStorageMode);
 
 m_aChildrenVector.push_back( pNewElement );
 
@@ -1593,7 +1593,7 @@ void OStorage_Impl::CreateRelStorage()
 if ( !m_pRelStorElement )
 {
 m_pRelStorElement = new SotElement_Impl( "_rels", true, true );
-
m_pRelStorElement->m_xStorage.reset(CreateNewStorageImpl(embed::ElementModes::WRITE));
+m_pRelStorElement->m_xStorage = 
CreateNewStorageImpl(embed::ElementModes::WRITE);
 if (m_pRelStorElement->m_xStorage)
 m_pRelStorElement->m_xStorage->m_pParent = nullptr; // the 
relation storage is completely controlled by parent
 }
diff --git a/package/source/xstor/xstorage.hxx 
b/package/source/xstor/xstorage.hxx
index 23d116f7bd51..a365dfd0902e 100644
--- a/package/source/xstor/xstorage.hxx
+++ b/package/source/xstor/xstorage.hxx
@@ -233,7 +233,7 @@ struct OStorage_Impl
 SotElement_Impl* InsertStream( const OUString& aName, bool bEncr );
 void InsertRawStream( const OUString& aName, const css::uno::Reference< 
css::io::XInputStream >& xInStream );
 
-OStorage_Impl* CreateNewStorageImpl( sal_Int32 nStorageMode );
+std::unique_ptr CreateNewStorageImpl( sal_Int32 
nStorageMode );
 SotElement_Impl* InsertStorage( const OUString& aName, sal_Int32 
nStorageMode );
 SotElement_Impl* InsertElement( const OUString& aName, bool bIsStorage );
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-03-28 Thread Luboš Luňák (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlexport10.cxx |2 +-
 vcl/source/gdi/bitmapex.cxx|2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 06a3fa162cddc351bd77f5a8327730b4f4dfbee3
Author: Luboš Luňák 
AuthorDate: Wed Mar 13 17:23:42 2019 +0100
Commit: Miklos Vajna 
CommitDate: Thu Mar 28 09:14:45 2019 +0100

fix transparency handling in BitmapEx::GetPixelColor()

Apparently the Color class uses transparency as the opposite
of the normally used meaning of opacity, so transparency 255
means transparent.

Change-Id: I3a76c2c93d98ad3c850017d3fd569b04dc6c19c8
Reviewed-on: https://gerrit.libreoffice.org/69211
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit 6cf42adde156ab9931641feacaa523c3d8991ac7)
Reviewed-on: https://gerrit.libreoffice.org/69671
Reviewed-by: Miklos Vajna 

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
index 009b77069055..6bd4debbb768 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
@@ -584,7 +584,7 @@ DECLARE_OOXMLEXPORT_TEST(testMsoBrightnessContrast, 
"msobrightnesscontrast.docx"
 CPPUNIT_ASSERT_EQUAL(58L, aBitmap.GetSizePixel().Width());
 CPPUNIT_ASSERT_EQUAL(320L, aBitmap.GetSizePixel().Height());
 Color aColor(aBitmap.GetPixelColor(20, 30));
-CPPUNIT_ASSERT_EQUAL(Color( 255, 0xce, 0xce, 0xce ), aColor);
+CPPUNIT_ASSERT_EQUAL(Color( 0xce, 0xce, 0xce ), aColor);
 }
 
 DECLARE_OOXMLEXPORT_TEST(testChartSize, "chart-size.docx")
diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index d5cf8178c34f..b89719c70b42 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -757,7 +757,7 @@ Color BitmapEx::GetPixelColor(sal_Int32 nX, sal_Int32 nY) 
const
 aColor.SetTransparency( pAlphaReadAccess->GetPixel( nY, nX 
).GetIndex() );
 }
 else
-aColor.SetTransparency(255);
+aColor.SetTransparency( 0 );
 return aColor;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/qa vcl/source

2019-03-28 Thread Luboš Luňák (via logerrit)
 vcl/qa/cppunit/pdfexport/data/tdf121615.odt |binary
 vcl/qa/cppunit/pdfexport/pdfexport.cxx  |   58 
 vcl/source/filter/jpeg/JpegWriter.cxx   |5 +-
 3 files changed, 62 insertions(+), 1 deletion(-)

New commits:
commit a92340e6905cbc4b91028a8c7afb7c2e89cf187b
Author: Luboš Luňák 
AuthorDate: Wed Mar 13 17:35:27 2019 +0100
Commit: Miklos Vajna 
CommitDate: Thu Mar 28 09:14:02 2019 +0100

fix grayscale jpeg writing in pdfexport (tdf#121615)

If the bitmap to be written is non-8bit, e.g. in case of using OpenGL
(on Linux the test requires "SAL_FORCEGL=1 SAL_USE_VCLPLUGIN=gen",
on Windows it's probably the default case), then the bitmap is not
in native format for 8bit. This was done correctly by 45e8e0fbee40f
that introduced it but somehow it got lost later (I can't even find
where).

Reviewed-on: https://gerrit.libreoffice.org/69213
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 
(cherry picked from commit 4b48f5c2fd2d0d6de1e1df4c13ceba47b1da7b5e)

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

diff --git a/vcl/qa/cppunit/pdfexport/data/tdf121615.odt 
b/vcl/qa/cppunit/pdfexport/data/tdf121615.odt
new file mode 100644
index ..7d2a87cf0e40
Binary files /dev/null and b/vcl/qa/cppunit/pdfexport/data/tdf121615.odt differ
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 325b07ae8aa5..bcc4d11d1682 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -33,6 +34,15 @@
 
 using namespace ::com::sun::star;
 
+static std::ostream& operator<<(std::ostream& rStrm, const Color& rColor)
+{
+rStrm << "Color: R:" << static_cast(rColor.GetRed())
+  << " G:" << static_cast(rColor.GetGreen())
+  << " B:" << static_cast(rColor.GetBlue())
+  << " A:" << static_cast(rColor.GetTransparency());
+return rStrm;
+}
+
 namespace
 {
 
@@ -118,6 +128,7 @@ public:
 void testTdf113143();
 void testTdf115262();
 void testTdf121962();
+void testTdf121615();
 
 CPPUNIT_TEST_SUITE(PdfExportTest);
 CPPUNIT_TEST(testTdf106059);
@@ -152,6 +163,7 @@ public:
 CPPUNIT_TEST(testTdf113143);
 CPPUNIT_TEST(testTdf115262);
 CPPUNIT_TEST(testTdf121962);
+CPPUNIT_TEST(testTdf121615);
 CPPUNIT_TEST_SUITE_END();
 };
 
@@ -1670,6 +1682,52 @@ void PdfExportTest::testTdf121962()
 }
 }
 
+void PdfExportTest::testTdf121615()
+{
+vcl::filter::PDFDocument aDocument;
+load("tdf121615.odt", aDocument);
+
+// The document has one page.
+std::vector aPages = aDocument.GetPages();
+CPPUNIT_ASSERT_EQUAL(static_cast(1), aPages.size());
+
+// Get access to the only image on the only page.
+vcl::filter::PDFObjectElement* pResources = 
aPages[0]->LookupObject("Resources");
+CPPUNIT_ASSERT(pResources);
+auto pXObjects = 
dynamic_cast(pResources->Lookup("XObject"));
+CPPUNIT_ASSERT(pXObjects);
+CPPUNIT_ASSERT_EQUAL(static_cast(1), pXObjects->GetItems().size());
+vcl::filter::PDFObjectElement* pXObject = 
pXObjects->LookupObject(pXObjects->GetItems().begin()->first);
+CPPUNIT_ASSERT(pXObject);
+vcl::filter::PDFStreamElement* pStream = pXObject->GetStream();
+CPPUNIT_ASSERT(pStream);
+SvMemoryStream& rObjectStream = pStream->GetMemory();
+
+// Load the embedded image.
+rObjectStream.Seek( 0 );
+GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
+Graphic aGraphic;
+sal_uInt16 format;
+ErrCode bResult = rFilter.ImportGraphic(aGraphic, OUString( "import" ), 
rObjectStream,
+GRFILTER_FORMAT_DONTKNOW, &format);
+CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE, bResult);
+
+// The image should be grayscale 8bit JPEG.
+sal_uInt16 jpegFormat = rFilter.GetImportFormatNumberForShortName( 
JPG_SHORTNAME );
+CPPUNIT_ASSERT( jpegFormat != GRFILTER_FORMAT_NOTFOUND );
+CPPUNIT_ASSERT_EQUAL( jpegFormat, format );
+BitmapEx aBitmap = aGraphic.GetBitmapEx();
+CPPUNIT_ASSERT_EQUAL( 200L, aBitmap.GetSizePixel().Width());
+CPPUNIT_ASSERT_EQUAL( 300L, aBitmap.GetSizePixel().Height());
+CPPUNIT_ASSERT_EQUAL( 8, int(aBitmap.GetBitCount()));
+// tdf#121615 was caused by broken handling of data width with 8bit color,
+// so the test image has some black in the bottomright corner, check it's 
there
+CPPUNIT_ASSERT_EQUAL( COL_WHITE, aBitmap.GetPixelColor( 0, 0 ));
+CPPUNIT_ASSERT_EQUAL( COL_WHITE, aBitmap.GetPixelColor( 0, 299 ));
+CPPUNIT_ASSERT_EQUAL( COL_WHITE, aBitmap.GetPixelColor( 199, 0 ));
+CPPUNIT_ASSERT_EQUAL( COL_BLACK, aBitmap.GetPixelColor( 199, 299 ));
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(PdfExportTest);
 
 }
diff --git a/vcl/source/filter/jpeg/JpegW

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

2019-03-28 Thread Libreoffice Gerrit user
 loleaflet/src/dom/DomEvent.js  |8 
 loleaflet/src/layer/vector/SVGGroup.js |   25 +
 2 files changed, 33 insertions(+)

New commits:
commit 1b06a82eb6ada63fd4da75b2f9043261a9644ff4
Author: Tor Lillqvist 
AuthorDate: Thu Mar 28 00:07:15 2019 +0200
Commit: Tor Lillqvist 
CommitDate: Thu Mar 28 08:47:57 2019 +0200

tdf#124179: Make it possible to drag an image using a touch gesture

First select the image (so that the circular handles show up), then
drag it.

diff --git a/loleaflet/src/dom/DomEvent.js b/loleaflet/src/dom/DomEvent.js
index 67e04c4ce..0d59d54aa 100644
--- a/loleaflet/src/dom/DomEvent.js
+++ b/loleaflet/src/dom/DomEvent.js
@@ -178,6 +178,9 @@ L.DomEvent = {
 
getMousePosition: function (e, container) {
if (!container) {
+   if (e.clientX === undefined && e.touches !== undefined)
+   return new L.Point(e.touches[0].clientX, 
e.touches[0].clientY);
+
return new L.Point(e.clientX, e.clientY);
}
 
@@ -192,6 +195,11 @@ L.DomEvent = {
left = top = 0;
}
 
+   if (e.clientX === undefined && e.touches !== undefined)
+   return new L.Point(
+   e.touches[0].clientX - left - 
container.clientLeft,
+   e.touches[0].clientY - top - 
container.clientTop);
+
return new L.Point(
e.clientX - left - container.clientLeft,
e.clientY - top - container.clientTop);
diff --git a/loleaflet/src/layer/vector/SVGGroup.js 
b/loleaflet/src/layer/vector/SVGGroup.js
index c719a7b1a..a61aa35c3 100644
--- a/loleaflet/src/layer/vector/SVGGroup.js
+++ b/loleaflet/src/layer/vector/SVGGroup.js
@@ -9,6 +9,11 @@ L.SVGGroup = L.Layer.extend({
noClip: true
},
 
+   lastTouchEvent: {
+   clientX: 0,
+   clientY: 0
+   },
+
initialize: function (bounds, options) {
L.setOptions(this, options);
this._bounds = bounds;
@@ -40,6 +45,11 @@ L.SVGGroup = L.Layer.extend({
},
 
_onDragStart: function(evt) {
+   if (evt.type === 'touchstart') {
+   this.lastTouchEvent.clientX = evt.touches[0].clientX;
+   this.lastTouchEvent.clientY = evt.touches[0].clientY;
+   }
+
if (!this._dragShape)
return;
this._moved = false;
@@ -47,6 +57,9 @@ L.SVGGroup = L.Layer.extend({
L.DomEvent.on(this._dragShape, 'mousemove', this._onDrag, this);
L.DomEvent.on(this._dragShape, 'mouseup', this._onDragEnd, 
this);
 
+   L.DomEvent.on(this._dragShape, 'touchmove', this._onDrag, this);
+   L.DomEvent.on(this._dragShape, 'touchend', this._onDragEnd, 
this);
+
var data = {
originalEvent: evt,
containerPoint: 
this._map.mouseEventToContainerPoint(evt)
@@ -58,6 +71,11 @@ L.SVGGroup = L.Layer.extend({
},
 
_onDrag: function(evt) {
+   if (evt.type === 'touchmove') {
+   this.lastTouchEvent.clientX = evt.touches[0].clientX;
+   this.lastTouchEvent.clientY = evt.touches[0].clientY;
+   }
+
if (!this._dragShape)
return;
 
@@ -75,11 +93,17 @@ L.SVGGroup = L.Layer.extend({
},
 
_onDragEnd: function(evt) {
+   if (evt.type === 'touchend' && evt.touches.length == 0)
+   evt.touches[0] = {clientX: this.lastTouchEvent.clientX, 
clientY: this.lastTouchEvent.clientY};
+
if (!this._dragShape)
return;
L.DomEvent.off(this._dragShape, 'mousemove', this._onDrag, 
this);
L.DomEvent.off(this._dragShape, 'mouseup', this._onDragEnd, 
this);
 
+   L.DomEvent.off(this._dragShape, 'touchmove', this._onDrag, 
this);
+   L.DomEvent.off(this._dragShape, 'touchend', this._onDragEnd, 
this);
+
this._moved = false;
this._hideEmbeddedSVG();
var pos = this._map.mouseEventToLatLng(evt);
@@ -122,6 +146,7 @@ L.SVGGroup = L.Layer.extend({
this._path.appendChild(this._rect._path);
this._dragShape = this._rect._path;
L.DomEvent.on(this._rect._path, 'mousedown', 
this._onDragStart, this);
+   L.DomEvent.on(this._rect._path, 'touchstart', 
this._onDragStart, this);
}
this._update();
},
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commi

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

2019-03-28 Thread Noel Grandin (via logerrit)
 reportdesign/source/filter/xml/xmlHelper.cxx|8 
 reportdesign/source/filter/xml/xmlHelper.hxx|4 ++--
 reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx |2 +-
 reportdesign/source/filter/xml/xmlfilter.cxx|4 ++--
 4 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit 03a1ac657a317b2b5b93323eac94da6784aa4504
Author: Noel Grandin 
AuthorDate: Wed Mar 27 11:24:28 2019 +0200
Commit: Noel Grandin 
CommitDate: Thu Mar 28 09:07:15 2019 +0100

return unique_ptr in OXMLHelper

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

diff --git a/reportdesign/source/filter/xml/xmlHelper.cxx 
b/reportdesign/source/filter/xml/xmlHelper.cxx
index aa20dc3b1c23..313ee4dd445e 100644
--- a/reportdesign/source/filter/xml/xmlHelper.cxx
+++ b/reportdesign/source/filter/xml/xmlHelper.cxx
@@ -332,7 +332,7 @@ uno::Reference 
OXMLHelper::createBorderPropertySet()
 return comphelper::GenericPropertySet_CreateInstance(new 
comphelper::PropertySetInfo(pMap));
 }
 
-SvXMLTokenMap* OXMLHelper::GetReportElemTokenMap()
+std::unique_ptr OXMLHelper::GetReportElemTokenMap()
 {
 static const SvXMLTokenMapEntry aElemTokenMap[]=
 {
@@ -357,10 +357,10 @@ SvXMLTokenMap* OXMLHelper::GetReportElemTokenMap()
 { XML_NAMESPACE_OFFICE, XML_BODY,   
XML_TOK_SUB_BODY },
 XML_TOKEN_MAP_END
 };
-return new SvXMLTokenMap( aElemTokenMap );
+return std::make_unique( aElemTokenMap );
 }
 
-SvXMLTokenMap* OXMLHelper::GetSubDocumentElemTokenMap()
+std::unique_ptr OXMLHelper::GetSubDocumentElemTokenMap()
 {
 static const SvXMLTokenMapEntry aElemTokenMap[]=
 {
@@ -369,7 +369,7 @@ SvXMLTokenMap* OXMLHelper::GetSubDocumentElemTokenMap()
 { XML_NAMESPACE_REPORT, XML_DETAIL, 
XML_TOK_SUB_DETAIL},
 XML_TOKEN_MAP_END
 };
-return new SvXMLTokenMap( aElemTokenMap );
+return std::make_unique( aElemTokenMap );
 }
 
 const SvXMLEnumMapEntry* OXMLHelper::GetImageScaleOptions()
diff --git a/reportdesign/source/filter/xml/xmlHelper.hxx 
b/reportdesign/source/filter/xml/xmlHelper.hxx
index f784891eff04..b23ebbdd4d65 100644
--- a/reportdesign/source/filter/xml/xmlHelper.hxx
+++ b/reportdesign/source/filter/xml/xmlHelper.hxx
@@ -63,8 +63,8 @@ namespace rptxml
 static void copyStyleElements(const bool _bOld,const OUString& 
_sStyleName,const SvXMLStylesContext* _pAutoStyles,const css::uno::Reference< 
css::beans::XPropertySet>& _xProp);
 static css::uno::Reference< css::beans::XPropertySet> 
createBorderPropertySet();
 
-static SvXMLTokenMap* GetReportElemTokenMap();
-static SvXMLTokenMap* GetSubDocumentElemTokenMap();
+static std::unique_ptr GetReportElemTokenMap();
+static std::unique_ptr GetSubDocumentElemTokenMap();
 
 };
 
diff --git a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx 
b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
index 63b8b2f94133..f023f288ca2a 100644
--- a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
@@ -372,7 +372,7 @@ void SAL_CALL ImportDocumentHandler::initialize( const 
uno::Sequence< uno::Any >
 // set ourself as delegator
 m_xProxy->setDelegator( *this );
 
-m_pReportElemTokenMap.reset(OXMLHelper::GetReportElemTokenMap());
+m_pReportElemTokenMap = OXMLHelper::GetReportElemTokenMap();
 }
 
 uno::Any SAL_CALL ImportDocumentHandler::queryInterface( const uno::Type& 
_rType )
diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx 
b/reportdesign/source/filter/xml/xmlfilter.cxx
index 1f54bf8f66c8..3240c017d007 100644
--- a/reportdesign/source/filter/xml/xmlfilter.cxx
+++ b/reportdesign/source/filter/xml/xmlfilter.cxx
@@ -810,14 +810,14 @@ const SvXMLTokenMap& 
ORptFilter::GetDocContentElemTokenMap() const
 const SvXMLTokenMap& ORptFilter::GetReportElemTokenMap() const
 {
 if (!m_pReportElemTokenMap)
-m_pReportElemTokenMap.reset(OXMLHelper::GetReportElemTokenMap());
+m_pReportElemTokenMap = OXMLHelper::GetReportElemTokenMap();
 return *m_pReportElemTokenMap;
 }
 
 const SvXMLTokenMap& ORptFilter::GetSubDocumentElemTokenMap() const
 {
 if (!m_pSubDocumentElemTokenMap)
-
m_pSubDocumentElemTokenMap.reset(OXMLHelper::GetSubDocumentElemTokenMap());
+m_pSubDocumentElemTokenMap = OXMLHelper::GetSubDocumentElemTokenMap();
 return *m_pSubDocumentElemTokenMap;
 }
 
___
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' - unotools/source

2019-03-28 Thread Tamás Zolnai (via logerrit)
 unotools/source/config/fltrcfg.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c1382f22099860a52d7da94b619aa540346f7e7a
Author: Tamás Zolnai 
AuthorDate: Thu Mar 28 08:15:28 2019 +0100
Commit: Andras Timar 
CommitDate: Thu Mar 28 08:48:33 2019 +0100

MSO lockfiles: Missing comma

Change-Id: Idc3a2c85b8abb7f7fa0d4331107e4d83faef23bb
Reviewed-on: https://gerrit.libreoffice.org/69877
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/unotools/source/config/fltrcfg.cxx 
b/unotools/source/config/fltrcfg.cxx
index 4993902aa786..b43f7d5856ae 100644
--- a/unotools/source/config/fltrcfg.cxx
+++ b/unotools/source/config/fltrcfg.cxx
@@ -326,7 +326,7 @@ const Sequence& GetPropertyNames()
 "Export/EnableWordPreview", // 10
 "Import/ImportWWFieldsAsEnhancedFields", // 11
 "Import/SmartArtToShapes",  // 12
-"Export/CharBackgroundToHighlighting"// 13
+"Export/CharBackgroundToHighlighting",// 13
 "Import/CreateMSOLockFiles" // 14
 };
 OUString* pNames = aNames.getArray();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-03-28 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/layout/layout.cxx |  173 ++---
 1 file changed, 43 insertions(+), 130 deletions(-)

New commits:
commit 3dfe2ce66ac220c8f137730d7146bc334c1859be
Author: Miklos Vajna 
AuthorDate: Wed Mar 27 21:28:20 2019 +0100
Commit: Miklos Vajna 
CommitDate: Thu Mar 28 08:48:35 2019 +0100

CppunitTest_sw_layoutwriter: use CPPUNIT_TEST_FIXTURE()

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

diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index 28649cbcedef..ff06af442bff 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -8,6 +8,7 @@
  */
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -27,98 +28,11 @@ static char const DATA_DIRECTORY[] = 
"/sw/qa/extras/layout/data/";
 /// Test to assert layout / rendering result of Writer.
 class SwLayoutWriter : public SwModelTestBase
 {
+protected:
 void CheckRedlineFootnotesHidden();
 void CheckRedlineSectionsHidden();
 void CheckRedlineCharAttributesHidden();
 
-public:
-void testRedlineFootnotes();
-void testRedlineFlysInBody();
-void testRedlineFlysInHeader();
-void testRedlineFlysInFootnote();
-void testRedlineFlysInFlys();
-void testRedlineFlysAtFlys();
-void testRedlineSections();
-void testRedlineTables();
-void testRedlineCharAttributes();
-void testTdf116830();
-void testTdf114163();
-void testTdf108021();
-void testTdf122800();
-void testTdf116925();
-void testTdf117028();
-void testTdf106390();
-void testTableExtrusion1();
-void testTableExtrusion2();
-void testTdf116848();
-void testTdf117245();
-void testTdf118672();
-void testTdf117923();
-void testTdf109077();
-void testUserFieldTypeLanguage();
-void testTdf109137();
-void testForcepoint72();
-void testForcepoint75();
-void testForcepoint76();
-void testTdf118058();
-void testTdf117188();
-void testTdf117187();
-void testTdf119875();
-void testTdf120287();
-void testTdf120287b();
-void testTdf120287c();
-void testTdf122878();
-void testTdf115094();
-void testTdf122607();
-void testBtlrCell();
-void testTdf123898();
-void testTdf123651();
-
-CPPUNIT_TEST_SUITE(SwLayoutWriter);
-CPPUNIT_TEST(testRedlineFootnotes);
-CPPUNIT_TEST(testRedlineFlysInBody);
-CPPUNIT_TEST(testRedlineFlysInHeader);
-CPPUNIT_TEST(testRedlineFlysInFootnote);
-CPPUNIT_TEST(testRedlineFlysInFlys);
-CPPUNIT_TEST(testRedlineFlysAtFlys);
-CPPUNIT_TEST(testRedlineSections);
-CPPUNIT_TEST(testRedlineTables);
-CPPUNIT_TEST(testRedlineCharAttributes);
-CPPUNIT_TEST(testTdf116830);
-CPPUNIT_TEST(testTdf114163);
-CPPUNIT_TEST(testTdf108021);
-CPPUNIT_TEST(testTdf122800);
-CPPUNIT_TEST(testTdf116925);
-CPPUNIT_TEST(testTdf117028);
-CPPUNIT_TEST(testTdf106390);
-CPPUNIT_TEST(testTableExtrusion1);
-CPPUNIT_TEST(testTableExtrusion2);
-CPPUNIT_TEST(testTdf116848);
-CPPUNIT_TEST(testTdf117245);
-CPPUNIT_TEST(testTdf118672);
-CPPUNIT_TEST(testTdf117923);
-CPPUNIT_TEST(testTdf109077);
-CPPUNIT_TEST(testUserFieldTypeLanguage);
-CPPUNIT_TEST(testTdf109137);
-CPPUNIT_TEST(testForcepoint72);
-CPPUNIT_TEST(testForcepoint75);
-CPPUNIT_TEST(testForcepoint76);
-CPPUNIT_TEST(testTdf118058);
-CPPUNIT_TEST(testTdf117188);
-CPPUNIT_TEST(testTdf117187);
-CPPUNIT_TEST(testTdf119875);
-CPPUNIT_TEST(testTdf120287);
-CPPUNIT_TEST(testTdf120287b);
-CPPUNIT_TEST(testTdf120287c);
-CPPUNIT_TEST(testTdf122878);
-CPPUNIT_TEST(testTdf115094);
-CPPUNIT_TEST(testTdf122607);
-CPPUNIT_TEST(testBtlrCell);
-CPPUNIT_TEST(testTdf123898);
-CPPUNIT_TEST(testTdf123651);
-CPPUNIT_TEST_SUITE_END();
-
-private:
 SwDoc* createDoc(const char* pName = nullptr);
 };
 
@@ -176,7 +90,7 @@ void SwLayoutWriter::CheckRedlineFootnotesHidden()
 assertXPath(pXmlDoc, "/root/page[1]/ftncont/ftn[2]/txt[1]/Text[1]", 
"Portion", "mo");
 }
 
-void SwLayoutWriter::testRedlineFootnotes()
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testRedlineFootnotes)
 {
 // currently need experimental mode
 Resetter _([]() {
@@ -284,7 +198,7 @@ void SwLayoutWriter::testRedlineFootnotes()
 CheckRedlineFootnotesHidden();
 }
 
-void SwLayoutWriter::testRedlineFlysInBody()
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testRedlineFlysInBody)
 {
 // currently need experimental mode
 Resetter _([]() {
@@ -562,7 +476,7 @@ void SwLayoutWriter::testRedlineFlysInBody()
 }
 }
 
-void SwLayoutWriter::testRedlineFlysInHeader()
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testRedlineFlysInHeader)
 {
 // currently need experimental mode
 Resetter _([]() {
@@ -857,7 +771,7 @@ void SwLayoutWriter::testRedlineFlysInHeader()
 }
 }
 
-void