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

2023-11-09 Thread Noel Grandin (via logerrit)
 reportdesign/source/filter/xml/xmlStyleImport.cxx |4 ++--
 reportdesign/source/filter/xml/xmlStyleImport.hxx |5 +++--
 2 files changed, 5 insertions(+), 4 deletions(-)

New commits:
commit fcfb7f65bfc507a6bffebea98a9e9bd281ad9dbb
Author: Noel Grandin 
AuthorDate: Wed Nov 8 13:35:20 2023 +0200
Commit: Noel Grandin 
CommitDate: Thu Nov 9 19:04:18 2023 +0100

loplugin:fieldcast in rptxml::OControlStyleContext

Change-Id: I2609090c26a2d405aedcca57a67ec9c5c329e122
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159212
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/reportdesign/source/filter/xml/xmlStyleImport.cxx 
b/reportdesign/source/filter/xml/xmlStyleImport.cxx
index 595bd5506dca..4ccc672f97ca 100644
--- a/reportdesign/source/filter/xml/xmlStyleImport.cxx
+++ b/reportdesign/source/filter/xml/xmlStyleImport.cxx
@@ -67,7 +67,7 @@ public:
 }
 
 OControlStyleContext::OControlStyleContext( ORptFilter& rImport,
-SvXMLStylesContext& rStyles, XmlStyleFamily nFamily ) :
+OReportStylesContext& rStyles, XmlStyleFamily nFamily ) :
 XMLPropStyleContext( rImport, rStyles, nFamily, false/*bDefaultStyle*/ ),
 pStyles(),
 m_nNumberFormat(-1),
@@ -121,7 +121,7 @@ void OControlStyleContext::SetDefaults()
 
 void OControlStyleContext::AddProperty(const sal_Int16 nContextID, const 
uno::Any& rValue)
 {
-sal_Int32 nIndex(static_cast(pStyles)->GetIndex(nContextID));
+sal_Int32 nIndex(pStyles->GetIndex(nContextID));
 OSL_ENSURE(nIndex != -1, "Property not found in Map");
 XMLPropertyState aPropState(nIndex, rValue);
 GetProperties().push_back(aPropState); // has to be inserted in a sort 
order later
diff --git a/reportdesign/source/filter/xml/xmlStyleImport.hxx 
b/reportdesign/source/filter/xml/xmlStyleImport.hxx
index b51108fd5244..691b6d384160 100644
--- a/reportdesign/source/filter/xml/xmlStyleImport.hxx
+++ b/reportdesign/source/filter/xml/xmlStyleImport.hxx
@@ -27,11 +27,12 @@
 namespace rptxml
 {
 class ORptFilter;
+class OReportStylesContext;
 
 class OControlStyleContext : public XMLPropStyleContext
 {
 OUString m_sDataStyleName;
-SvXMLStylesContext* pStyles;
+OReportStylesContext*   pStyles;
 //  std::vectoraMaps;
 sal_Int32   m_nNumberFormat;
 ORptFilter& m_rImport;
@@ -46,7 +47,7 @@ namespace rptxml
 public:
 
 OControlStyleContext( ORptFilter& rImport,
-SvXMLStylesContext& rStyles, XmlStyleFamily nFamily );
+OReportStylesContext& rStyles, XmlStyleFamily nFamily );
 
 virtual ~OControlStyleContext() override;
 


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

2023-10-20 Thread Stephan Bergmann (via logerrit)
 reportdesign/source/core/api/ReportDefinition.cxx|2 +-
 reportdesign/source/core/api/ReportEngineJFree.cxx   |2 +-
 reportdesign/source/core/misc/conditionalexpression.cxx  |4 ++--
 reportdesign/source/core/sdr/formatnormalizer.cxx|2 +-
 reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx  |2 +-
 reportdesign/source/filter/xml/xmlfilter.cxx |   10 +-
 reportdesign/source/ui/inspection/DataProviderHandler.cxx|4 ++--
 reportdesign/source/ui/inspection/GeometryHandler.cxx|6 +++---
 reportdesign/source/ui/inspection/ReportComponentHandler.cxx |4 ++--
 reportdesign/source/ui/report/ReportController.cxx   |2 +-
 10 files changed, 19 insertions(+), 19 deletions(-)

New commits:
commit 774a939f3be9bff97a43f8b5573ff6215b749842
Author: Stephan Bergmann 
AuthorDate: Thu Oct 19 10:30:22 2023 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Oct 20 09:06:15 2023 +0200

Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: reportdesign

Change-Id: I5e45fd5d464db3cf038a844b955144649f980ba1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158208
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/reportdesign/source/core/api/ReportDefinition.cxx 
b/reportdesign/source/core/api/ReportDefinition.cxx
index 9c9a44991842..f9f988255b03 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -1303,7 +1303,7 @@ void SAL_CALL OReportDefinition::storeToStorage( const 
uno::Reference< embed::XS
 uno::Reference< beans::XPropertySet> 
xProp(_xStorageToSaveTo,uno::UNO_QUERY);
 if ( xProp.is() )
 {
-static constexpr OUStringLiteral sPropName = u"MediaType";
+static constexpr OUString sPropName = u"MediaType"_ustr;
 OUString sOldMediaType;
 xProp->getPropertyValue(sPropName) >>= sOldMediaType;
 if ( !xProp->getPropertyValue(sPropName).hasValue() || 
sOldMediaType.isEmpty() || MIMETYPE_OASIS_OPENDOCUMENT_REPORT_ASCII != 
sOldMediaType )
diff --git a/reportdesign/source/core/api/ReportEngineJFree.cxx 
b/reportdesign/source/core/api/ReportEngineJFree.cxx
index 3ac69bbeae60..11686905272e 100644
--- a/reportdesign/source/core/api/ReportEngineJFree.cxx
+++ b/reportdesign/source/core/api/ReportEngineJFree.cxx
@@ -148,7 +148,7 @@ OUString OReportEngineJFree::getNewOutputName()
 if ( !m_xReport.is() || !m_xActiveConnection.is() )
 throw lang::IllegalArgumentException();
 
-static constexpr OUStringLiteral s_sMediaType = u"MediaType";
+static constexpr OUString s_sMediaType = u"MediaType"_ustr;
 
 MimeConfigurationHelper aConfighelper(m_xContext);
 const OUString sMimeType = m_xReport->getMimeType();
diff --git a/reportdesign/source/core/misc/conditionalexpression.cxx 
b/reportdesign/source/core/misc/conditionalexpression.cxx
index d913d0e132bc..40126acfc550 100644
--- a/reportdesign/source/core/misc/conditionalexpression.cxx
+++ b/reportdesign/source/core/misc/conditionalexpression.cxx
@@ -74,8 +74,8 @@ namespace rptui
 OUString sMatchExpression( m_sPattern );
 sMatchExpression = sMatchExpression.replaceAll(u"$$", 
_rFieldDataSource);
 
-static constexpr OUStringLiteral sLHSPattern( u"$1" );
-static constexpr OUStringLiteral sRHSPattern( u"$2" );
+static constexpr OUString sLHSPattern( u"$1"_ustr );
+static constexpr OUString sRHSPattern( u"$2"_ustr );
 sal_Int32 nLHSIndex( sMatchExpression.indexOf( sLHSPattern ) );
 sal_Int32 nRHSIndex( sMatchExpression.indexOf( sRHSPattern ) );
 
diff --git a/reportdesign/source/core/sdr/formatnormalizer.cxx 
b/reportdesign/source/core/sdr/formatnormalizer.cxx
index cf208f4465ce..3c97abc08dba 100644
--- a/reportdesign/source/core/sdr/formatnormalizer.cxx
+++ b/reportdesign/source/core/sdr/formatnormalizer.cxx
@@ -219,7 +219,7 @@ namespace rptui
 return;
 
 OUString sDataField( _rxFormatted->getDataField() );
-static constexpr OUStringLiteral sFieldPrefix( u"field:[" );
+static constexpr OUString sFieldPrefix( u"field:["_ustr );
 if ( sDataField.indexOf( sFieldPrefix ) != 0 )
 // not bound to a table field
 // TODO: we might also do this kind of thing for functions and 
expressions ...
diff --git a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx 
b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
index b5f3383b3061..60784020b622 100644
--- a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
@@ -346,7 +346,7 @@ void ExportDocumentHandler::exportTableRows()
 const OUString 
sRElement(lcl_createAttribute(XML_NP_RPT,XML_REPORT_ELEMENT) );
 const OUString sRComponent( 
lcl_createAttribute(XML_NP_RPT,XML_REPORT_COMPONENT) ) ;
 const 

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

2023-10-16 Thread Caolán McNamara (via logerrit)
 reportdesign/source/core/api/ReportDefinition.cxx |6 ++
 xmloff/source/draw/ximpshap.cxx   |3 +++
 2 files changed, 9 insertions(+)

New commits:
commit 1bdd38f6a86cebfa9d40e0a0136c1a9066c90661
Author: Caolán McNamara 
AuthorDate: Mon Oct 16 12:31:50 2023 +0100
Commit: Caolán McNamara 
CommitDate: Mon Oct 16 17:15:49 2023 +0200

Resolves: tdf#157726 missing chart from Base report

since:

commit c9b5c627ccb5b70c103c559b1df38c1175efc2d1
Author: Caolán McNamara 
Date:   Wed Sep 6 10:05:23 2023 +0100

add referer to ole objects

Change-Id: I9ef18bf0d734dd900bdbcac475ca15af7b15456e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158027
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/reportdesign/source/core/api/ReportDefinition.cxx 
b/reportdesign/source/core/api/ReportDefinition.cxx
index c9a9f7f2f4cb..9c9a44991842 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -2009,6 +2009,12 @@ uno::Reference< uno::XInterface > SAL_CALL 
OReportDefinition::createInstanceWith
 m_pImpl->m_pObjectContainer->SwitchPersistence(xStorage);
 xRet = cppu::getXWeak(SvXMLEmbeddedObjectHelper::Create( 
xStorage,*this, SvXMLEmbeddedObjectHelperMode::Read ).get());
 }
+else if (aServiceSpecifier == "com.sun.star.drawing.OLE2Shape")
+{
+uno::Reference 
xShape(SvxUnoDrawMSFactory::createInstanceWithArguments(aServiceSpecifier, 
_aArgs), uno::UNO_QUERY_THROW);
+xRet = m_pImpl->m_pReportModel->createShape(aServiceSpecifier, xShape);
+}
+
 return xRet;
 }
 
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index 24475522f1e5..4de4bd28edb8 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -505,6 +505,9 @@ void SdXMLShapeContext::AddShape(OUString const & 
serviceName)
  || serviceName == "com.sun.star.drawing.PluginShape"
  || serviceName == "com.sun.star.presentation.MediaShape")
 {
+// On adding another entry to this list of service names to pass 
an argument via the WithArguments variant
+// you may need to adjust the more obscure 
OReportDefinition::createInstanceWithArguments as well as the
+// more obvious SvxUnoDrawMSFactory::createInstanceWithArguments
 xShape.set( xServiceFact->createInstanceWithArguments(serviceName, 
{ css::uno::Any(GetImport().GetDocumentBase()) }),
 css::uno::UNO_QUERY);
 }


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

2023-08-26 Thread Xisco Fauli (via logerrit)
 reportdesign/source/filter/xml/xmlExport.cxx |9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 146f0e4ce15b48c6914fa310e805ef45a50ab6eb
Author: Xisco Fauli 
AuthorDate: Fri Aug 25 13:59:39 2023 +0200
Commit: Xisco Fauli 
CommitDate: Sat Aug 26 17:54:59 2023 +0200

reportdesign: fix crash in ORptExport::exportSectionAutoStyle

See 
https://crashreport.libreoffice.org/stats/signature/rptxml::ORptExport::exportSectionAutoStyle(com::sun::star::uno::Reference%3Ccom::sun::star::report::XSection%3E%20const%20&)

Change-Id: Ibe5a6de1888728fba22f8cc0d128dcb04da9ede9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156096
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins

diff --git a/reportdesign/source/filter/xml/xmlExport.cxx 
b/reportdesign/source/filter/xml/xmlExport.cxx
index d75828c65939..6e7104724704 100644
--- a/reportdesign/source/filter/xml/xmlExport.cxx
+++ b/reportdesign/source/filter/xml/xmlExport.cxx
@@ -517,12 +517,12 @@ void ORptExport::exportSectionAutoStyle(const 
Reference& _xProp)
 for (i = 0 ; i< nCount ; ++i)
 {
 Reference 
xReportElement(_xProp->getByIndex(i),uno::UNO_QUERY);
-uno::Reference< XShape> xShape(xReportElement,uno::UNO_QUERY);
-if ( xShape.is() )
-continue;
 OSL_ENSURE( xReportElement.is(),"NULL Element in Section!" );
 if ( !xReportElement.is() )
 continue;
+uno::Reference< XShape> xShape(xReportElement,uno::UNO_QUERY);
+if ( xShape.is() )
+continue;
 sal_Int32 nX = xReportElement->getPositionX();
 aColumnPos.push_back(nX);
 Reference xFixedLine(xReportElement,uno::UNO_QUERY);
@@ -580,6 +580,9 @@ void ORptExport::exportSectionAutoStyle(const 
Reference& _xProp)
 for (i = 0 ; i< nCount ; ++i)
 {
 Reference 
xReportElement(_xProp->getByIndex(i),uno::UNO_QUERY);
+OSL_ENSURE( xReportElement.is(),"NULL Element in Section!" );
+if ( !xReportElement.is() )
+continue;
 uno::Reference< XShape> xShape(xReportElement,uno::UNO_QUERY);
 if ( xShape.is() )
 continue;


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

2023-08-05 Thread Caolán McNamara (via logerrit)
 reportdesign/source/ui/report/DesignView.cxx |   11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit 484182b04d35f15437c09008cede361edde71d01
Author: Caolán McNamara 
AuthorDate: Sat Aug 5 10:55:30 2023 +0100
Commit: Caolán McNamara 
CommitDate: Sat Aug 5 17:50:19 2023 +0200

cid#1539504 Division or modulo by zero

Change-Id: I201d821a3f6e2f3dd5596d05c38e394637617878
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155371
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/reportdesign/source/ui/report/DesignView.cxx 
b/reportdesign/source/ui/report/DesignView.cxx
index e1d7fce1435f..9db1ab8d524d 100644
--- a/reportdesign/source/ui/report/DesignView.cxx
+++ b/reportdesign/source/ui/report/DesignView.cxx
@@ -250,11 +250,14 @@ void ODesignView::resizeDocumentView(tools::Rectangle& 
_rPlayground)
 nSplitPos = aTaskPanePos.X() - nSplitterWidth;
 getController().setSplitPos(nSplitPos);
 
-const tools::Long nTaskPaneSize = 
static_cast((aPlaygroundSize.Width() - 
aTaskPanePos.X())*100/aPlaygroundSize.Width());
-if ( m_aSplitWin->GetItemSize( TASKPANE_ID ) != nTaskPaneSize )
+if (const auto nWidth = aPlaygroundSize.Width())
 {
-m_aSplitWin->SetItemSize( REPORT_ID, 99 - nTaskPaneSize );
-m_aSplitWin->SetItemSize( TASKPANE_ID, nTaskPaneSize );
+const tools::Long nTaskPaneSize = 
static_cast((aPlaygroundSize.Width() - 
aTaskPanePos.X())*100/nWidth);
+if ( m_aSplitWin->GetItemSize( TASKPANE_ID ) != 
nTaskPaneSize )
+{
+m_aSplitWin->SetItemSize( REPORT_ID, 99 - 
nTaskPaneSize );
+m_aSplitWin->SetItemSize( TASKPANE_ID, nTaskPaneSize );
+}
 }
 }
 }


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

2023-08-01 Thread Patrick Luby (via logerrit)
 reportdesign/source/ui/report/ViewsWindow.cxx |   14 --
 svx/source/svdraw/svdhdl.cxx  |1 +
 2 files changed, 1 insertion(+), 14 deletions(-)

New commits:
commit 73adf93acc9bbac4c8db9aa844930629a429410e
Author: Patrick Luby 
AuthorDate: Tue Aug 1 16:09:53 2023 +0200
Commit: Patrick Luby 
CommitDate: Tue Aug 1 21:23:30 2023 +0200

Revert "tdf#144072 prevent use of a deleted pointer"

This reverts commit 01a1d2a84992973b8a0e5f1ae99fd32f5913b58f.

That commit appeared to fix tdf#144072 but it only delays the crash as the 
reportdesign module will keep reusing the same SdHdl pointer that has already 
been deleted.

Change-Id: I8e416b0376aa8724b697f54ed45f58341b47dc2a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155181
Tested-by: Patrick Luby 
Reviewed-by: Patrick Luby 

diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx 
b/reportdesign/source/ui/report/ViewsWindow.cxx
index a5ad82e818e2..e11735bf72ca 100644
--- a/reportdesign/source/ui/report/ViewsWindow.cxx
+++ b/reportdesign/source/ui/report/ViewsWindow.cxx
@@ -1043,21 +1043,7 @@ void OViewsWindow::BegDragObj(const Point& _aPnt, 
SdrHdl* _pHdl,const OSectionVi
 "createInvisible X:" << aRect.Left() << " Y:"
 << aRect.Top() << " on View #" << nViewCount);
 
-// tdf#144072 prevent use of a deleted pointer
-// BegDragObj_createInvisibleObjectAtPosition() may clear
-// the handle list and that will delete the SdrHdl 
instances
-// owned by this section view so set _pHdl to null if it 
has
-// been deleted during the call.
-bool bHdlInList = false;
-const SdrHdlList& rHdlList = rView.GetHdlList();
-if (_pHdl && rHdlList.GetHdlNum(_pHdl) < 
rHdlList.GetHdlCount())
-bHdlInList = true;
 BegDragObj_createInvisibleObjectAtPosition(aRect, rView);
-if (bHdlInList && rHdlList.GetHdlNum(_pHdl) >= 
rHdlList.GetHdlCount())
-{
-SAL_WARN("reportdesign", "SdrHdl pointer parameter has 
been deleted");
-_pHdl = nullptr;
-}
 }
 }
 }
diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx
index 3bcebf59ea26..de6ffcd8175f 100644
--- a/svx/source/svdraw/svdhdl.cxx
+++ b/svx/source/svdraw/svdhdl.cxx
@@ -2282,6 +2282,7 @@ size_t SdrHdlList::GetHdlNum(const SdrHdl* pHdl) const
 return SAL_MAX_SIZE;
 auto it = std::find_if( maList.begin(), maList.end(),
 [&](const std::unique_ptr & p) { return p.get() == pHdl; });
+assert(it != maList.end());
 if( it == maList.end() )
 return SAL_MAX_SIZE;
 return it - maList.begin();


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

2023-08-01 Thread Patrick Luby (via logerrit)
 reportdesign/source/ui/report/ViewsWindow.cxx |   14 ++
 svx/source/svdraw/svdhdl.cxx  |1 -
 2 files changed, 14 insertions(+), 1 deletion(-)

New commits:
commit 01a1d2a84992973b8a0e5f1ae99fd32f5913b58f
Author: Patrick Luby 
AuthorDate: Mon Jul 31 20:03:13 2023 -0400
Commit: Patrick Luby 
CommitDate: Tue Aug 1 14:27:49 2023 +0200

tdf#144072 prevent use of a deleted pointer

BegDragObj_createInvisibleObjectAtPosition() may clear the handle
list and that will delete the SdrHdl instances owned by this section
view so set _pHdl to null if it has been deleted during the call.

Change-Id: I89606958f8a76a2c35685d1aff6b0159739a464a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155119
Tested-by: Jenkins
Reviewed-by: Patrick Luby 

diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx 
b/reportdesign/source/ui/report/ViewsWindow.cxx
index e11735bf72ca..a5ad82e818e2 100644
--- a/reportdesign/source/ui/report/ViewsWindow.cxx
+++ b/reportdesign/source/ui/report/ViewsWindow.cxx
@@ -1043,7 +1043,21 @@ void OViewsWindow::BegDragObj(const Point& _aPnt, 
SdrHdl* _pHdl,const OSectionVi
 "createInvisible X:" << aRect.Left() << " Y:"
 << aRect.Top() << " on View #" << nViewCount);
 
+// tdf#144072 prevent use of a deleted pointer
+// BegDragObj_createInvisibleObjectAtPosition() may clear
+// the handle list and that will delete the SdrHdl 
instances
+// owned by this section view so set _pHdl to null if it 
has
+// been deleted during the call.
+bool bHdlInList = false;
+const SdrHdlList& rHdlList = rView.GetHdlList();
+if (_pHdl && rHdlList.GetHdlNum(_pHdl) < 
rHdlList.GetHdlCount())
+bHdlInList = true;
 BegDragObj_createInvisibleObjectAtPosition(aRect, rView);
+if (bHdlInList && rHdlList.GetHdlNum(_pHdl) >= 
rHdlList.GetHdlCount())
+{
+SAL_WARN("reportdesign", "SdrHdl pointer parameter has 
been deleted");
+_pHdl = nullptr;
+}
 }
 }
 }
diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx
index de6ffcd8175f..3bcebf59ea26 100644
--- a/svx/source/svdraw/svdhdl.cxx
+++ b/svx/source/svdraw/svdhdl.cxx
@@ -2282,7 +2282,6 @@ size_t SdrHdlList::GetHdlNum(const SdrHdl* pHdl) const
 return SAL_MAX_SIZE;
 auto it = std::find_if( maList.begin(), maList.end(),
 [&](const std::unique_ptr & p) { return p.get() == pHdl; });
-assert(it != maList.end());
 if( it == maList.end() )
 return SAL_MAX_SIZE;
 return it - maList.begin();


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

2023-07-28 Thread Andrea Gelmini (via logerrit)
 reportdesign/source/ui/report/ScrollHelper.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 514dfe603797351223b1c570a92687399cca7e06
Author: Andrea Gelmini 
AuthorDate: Fri Jul 28 16:41:32 2023 +0200
Commit: Julien Nabet 
CommitDate: Fri Jul 28 17:04:19 2023 +0200

Fix typo

Change-Id: I56877d764075bc267708e380a5972fe08798e8e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155022
Tested-by: Julien Nabet 
Reviewed-by: Julien Nabet 

diff --git a/reportdesign/source/ui/report/ScrollHelper.cxx 
b/reportdesign/source/ui/report/ScrollHelper.cxx
index 3445abe96e40..491710e94ba8 100644
--- a/reportdesign/source/ui/report/ScrollHelper.cxx
+++ b/reportdesign/source/ui/report/ScrollHelper.cxx
@@ -119,7 +119,7 @@ Size OScrollWindowHelper::ResizeScrollBars()
 const tools::Long nScrSize = 
GetSettings().GetStyleSettings().GetScrollBarSize();
 bool bVVisible = false; // by default no vertical-ScrollBar
 bool bHVisible = false; // by default no horizontal-ScrollBar
-bool bChanged;  // determines if a visiblility was changed
+bool bChanged;  // determines if a visibility was changed
 do
 {
 bChanged = false;


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

2023-04-23 Thread Julien Nabet (via logerrit)
 reportdesign/source/core/api/ReportComponent.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 2b87376d7e8cc9d5973a8ccd4c9fdf398ebbd2a0
Author: Julien Nabet 
AuthorDate: Sun Apr 23 14:24:52 2023 +0200
Commit: Noel Grandin 
CommitDate: Sun Apr 23 16:32:42 2023 +0200

tdf#154886: fix Report builder mutex assertion

Thank you Noel for the hint!

Change-Id: Icb1f63deaffc454e0dcc3b736c9214d93b6871df
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150826
Reviewed-by: Ilmari Lauhakangas 
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/reportdesign/source/core/api/ReportComponent.cxx 
b/reportdesign/source/core/api/ReportComponent.cxx
index 5c036b5d6bdf..adfee3596914 100644
--- a/reportdesign/source/core/api/ReportComponent.cxx
+++ b/reportdesign/source/core/api/ReportComponent.cxx
@@ -18,6 +18,7 @@
  */
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -41,6 +42,7 @@ namespace reportdesign
 
 static void lcl_getDefaultFonts( vcl::Font& rLatinFont, vcl::Font& rCJKFont, 
vcl::Font& rCTLFont, LanguageType  _eLatin, LanguageType _eCJK, LanguageType 
_eCTL )
 {
+SolarMutexGuard g;
 LanguageType eLatin = _eLatin;
 
 //  If the UI language is Korean, the default Latin font has to


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

2023-03-19 Thread Vinit Agarwal (via logerrit)
 reportdesign/source/ui/dlg/Navigator.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 48b1fdf31f2fd4e9de47bda40e58cde7be9bc94d
Author: Vinit Agarwal 
AuthorDate: Fri Mar 10 13:07:22 2023 +0530
Commit: Ilmari Lauhakangas 
CommitDate: Sun Mar 19 08:00:54 2023 +

tdf#114441 - Convert use of sal_uLong to better integer types.

In reportdesign/source/ui/dlg/Navigator.cxx
Updated type of nPos at Line number 574 to int as it would be either
1 or 2 depending on the ternary evaluation

Change-Id: If2bf75ddfb66b518fec109757f32dd6e4a8b77dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148600
Tested-by: Ilmari Lauhakangas 
Reviewed-by: Ilmari Lauhakangas 

diff --git a/reportdesign/source/ui/dlg/Navigator.cxx 
b/reportdesign/source/ui/dlg/Navigator.cxx
index 2c4512470733..90cc2dc0d45b 100644
--- a/reportdesign/source/ui/dlg/Navigator.cxx
+++ b/reportdesign/source/ui/dlg/Navigator.cxx
@@ -571,7 +571,7 @@ void NavigatorTree::_propertyChanged(const 
beans::PropertyChangeEvent& _rEvent)
 xParent.reset();
 if ( _rEvent.PropertyName == PROPERTY_REPORTHEADERON )
 {
-sal_uLong nPos = xReport->getReportHeaderOn() ? 2 : 1;
+int nPos = xReport->getReportHeaderOn() ? 2 : 1;
 
traverseSection(xReport->getReportHeader(),xParent.get(),RID_SVXBMP_REPORTHEADERFOOTER,nPos);
 }
 else if ( _rEvent.PropertyName == PROPERTY_PAGEHEADERON )


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

2023-02-27 Thread Noel Grandin (via logerrit)
 reportdesign/source/ui/inc/DefaultInspection.hxx|3 ++-
 reportdesign/source/ui/inspection/DefaultInspection.cxx |   16 
 2 files changed, 10 insertions(+), 9 deletions(-)

New commits:
commit ce0cf8301f1452f3bdc00992b7fde5e97a007337
Author: Noel Grandin 
AuthorDate: Fri Feb 24 14:57:22 2023 +0200
Commit: Noel Grandin 
CommitDate: Mon Feb 27 12:42:37 2023 +

osl::Mutex->std::mutex in DefaultComponentInspectorModel

Change-Id: I1f76a062f75d1779ae86ae931ff3e2ac4f1ba831
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147859
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/reportdesign/source/ui/inc/DefaultInspection.hxx 
b/reportdesign/source/ui/inc/DefaultInspection.hxx
index 3f32725c584f..1d82d32455c0 100644
--- a/reportdesign/source/ui/inc/DefaultInspection.hxx
+++ b/reportdesign/source/ui/inc/DefaultInspection.hxx
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 
 
 namespace rptui
@@ -40,7 +41,7 @@ namespace rptui
 class DefaultComponentInspectorModel final : public 
DefaultComponentInspectorModel_Base
 {
 private:
-::osl::Mutex   
 m_aMutex;
+std::mutex 
 m_aMutex;
 css::uno::Reference< css::uno::XComponentContext > 
 m_xContext;
 css::uno::Reference< css::inspection::XObjectInspectorModel >  
 m_xComponent; /// delegatee
 bool   
 m_bConstructed;
diff --git a/reportdesign/source/ui/inspection/DefaultInspection.cxx 
b/reportdesign/source/ui/inspection/DefaultInspection.cxx
index 80269f433346..51edab1410ea 100644
--- a/reportdesign/source/ui/inspection/DefaultInspection.cxx
+++ b/reportdesign/source/ui/inspection/DefaultInspection.cxx
@@ -87,39 +87,39 @@ namespace rptui
 
 sal_Bool SAL_CALL DefaultComponentInspectorModel::getHasHelpSection()
 {
-::osl::MutexGuard aGuard(m_aMutex);
+std::unique_lock aGuard(m_aMutex);
 return m_bHasHelpSection;
 }
 
 
 ::sal_Int32 SAL_CALL DefaultComponentInspectorModel::getMinHelpTextLines()
 {
-::osl::MutexGuard aGuard(m_aMutex);
+std::unique_lock aGuard(m_aMutex);
 return m_nMinHelpTextLines;
 }
 
 sal_Bool SAL_CALL DefaultComponentInspectorModel::getIsReadOnly()
 {
-::osl::MutexGuard aGuard(m_aMutex);
+std::unique_lock aGuard(m_aMutex);
 return m_bIsReadOnly;
 }
 
 void SAL_CALL DefaultComponentInspectorModel::setIsReadOnly( sal_Bool 
_isreadonly )
 {
-::osl::MutexGuard aGuard(m_aMutex);
+std::unique_lock aGuard(m_aMutex);
 m_bIsReadOnly = _isreadonly;
 }
 
 
 ::sal_Int32 SAL_CALL DefaultComponentInspectorModel::getMaxHelpTextLines()
 {
-::osl::MutexGuard aGuard(m_aMutex);
+std::unique_lock aGuard(m_aMutex);
 return m_nMaxHelpTextLines;
 }
 
 void SAL_CALL DefaultComponentInspectorModel::initialize( const Sequence< 
Any >& _arguments )
 {
-::osl::MutexGuard aGuard(m_aMutex);
+std::unique_lock aGuard(m_aMutex);
 if ( m_bConstructed )
 throw ucb::AlreadyInitializedException();
 
@@ -155,7 +155,7 @@ namespace rptui
 
 Sequence< PropertyCategoryDescriptor > SAL_CALL 
DefaultComponentInspectorModel::describeCategories(  )
 {
-::osl::MutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 
 const struct
 {
@@ -183,7 +183,7 @@ namespace rptui
 
 ::sal_Int32 SAL_CALL 
DefaultComponentInspectorModel::getPropertyOrderIndex( const OUString& 
_rPropertyName )
 {
-::osl::MutexGuard aGuard(m_aMutex);
+std::unique_lock aGuard(m_aMutex);
 const sal_Int32 nPropertyId( OPropertyInfoService::getPropertyId( 
_rPropertyName ) );
 if ( nPropertyId != -1 )
 return nPropertyId;


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

2023-02-27 Thread Noel Grandin (via logerrit)
 reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx |2 +-
 reportdesign/source/filter/xml/xmlImportDocumentHandler.hxx |3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 93f9ce7b644c0887423891e0d645b88eb39bc457
Author: Noel Grandin 
AuthorDate: Fri Feb 24 14:58:55 2023 +0200
Commit: Noel Grandin 
CommitDate: Mon Feb 27 12:40:48 2023 +

osl::Mutex->std::mutex in rptxml::ImportDocumentHandler

Change-Id: I2e7c2c5642de4e234a551a1b02c8fd69fdcb65c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147860
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx 
b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
index 02607a302af3..f1aa8ceb9f87 100644
--- a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
@@ -330,7 +330,7 @@ void SAL_CALL 
ImportDocumentHandler::setDocumentLocator(const uno::Reference< xm
 }
 void SAL_CALL ImportDocumentHandler::initialize( const uno::Sequence< uno::Any 
>& _aArguments )
 {
-::osl::MutexGuard aGuard(m_aMutex);
+std::unique_lock aGuard(m_aMutex);
 comphelper::SequenceAsHashMap aArgs(_aArguments);
 m_xDocumentHandler = 
aArgs.getUnpackedValueOrDefault("DocumentHandler",m_xDocumentHandler);
 m_xModel = aArgs.getUnpackedValueOrDefault("Model",m_xModel);
diff --git a/reportdesign/source/filter/xml/xmlImportDocumentHandler.hxx 
b/reportdesign/source/filter/xml/xmlImportDocumentHandler.hxx
index 73eeab8df376..d0b6d4db36ef 100644
--- a/reportdesign/source/filter/xml/xmlImportDocumentHandler.hxx
+++ b/reportdesign/source/filter/xml/xmlImportDocumentHandler.hxx
@@ -32,6 +32,7 @@
 #include 
 #include 
 #include 
+#include 
 
 class SvXMLTokenMap;
 namespace rptxml
@@ -73,7 +74,7 @@ private:
 
 virtual ~ImportDocumentHandler() override;
 
-::osl::Mutex  m_aMutex;
+std::mutexm_aMutex;
 bool  
m_bImportedChart;
 ::std::vector< OUString>  
m_aMasterFields;
 ::std::vector< OUString>  
m_aDetailFields;


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

2023-02-27 Thread Noel Grandin (via logerrit)
 reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx |2 +-
 reportdesign/source/filter/xml/xmlExportDocumentHandler.hxx |3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit e43606a5a5c7ef44d4bab2f9bf526a8656775bd4
Author: Noel Grandin 
AuthorDate: Fri Feb 24 14:59:39 2023 +0200
Commit: Noel Grandin 
CommitDate: Mon Feb 27 11:08:06 2023 +

osl::Mutex->std::mutex in rptxml::ExportDocumentHandler

Change-Id: Ida7fbf7a619f4a6beb9f05107110e9c9a0b60813
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147861
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx 
b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
index aa064caef2ef..b5f3383b3061 100644
--- a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
@@ -273,7 +273,7 @@ void SAL_CALL 
ExportDocumentHandler::setDocumentLocator(const uno::Reference< xm
 }
 void SAL_CALL ExportDocumentHandler::initialize( const uno::Sequence< uno::Any 
>& _aArguments )
 {
-::osl::MutexGuard aGuard(m_aMutex);
+std::unique_lock aGuard(m_aMutex);
 comphelper::SequenceAsHashMap aArgs(_aArguments);
 m_xDelegatee = 
aArgs.getUnpackedValueOrDefault("DocumentHandler",m_xDelegatee);
 m_xModel = aArgs.getUnpackedValueOrDefault("Model",m_xModel);
diff --git a/reportdesign/source/filter/xml/xmlExportDocumentHandler.hxx 
b/reportdesign/source/filter/xml/xmlExportDocumentHandler.hxx
index 87959ccea7e1..93465e674242 100644
--- a/reportdesign/source/filter/xml/xmlExportDocumentHandler.hxx
+++ b/reportdesign/source/filter/xml/xmlExportDocumentHandler.hxx
@@ -30,6 +30,7 @@
 #include 
 #include 
 #include 
+#include 
 
 namespace rptxml
 {
@@ -74,7 +75,7 @@ private:
 
 virtual ~ExportDocumentHandler() override;
 
-::osl::Mutex  m_aMutex;
+std::mutexm_aMutex;
 css::uno::Reference< css::uno::XComponentContext >m_xContext;
 css::uno::Reference< css::xml::sax::XDocumentHandler >m_xDelegatee;
 css::uno::Reference< css::uno::XAggregation > m_xProxy;


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

2023-01-20 Thread Stephan Bergmann (via logerrit)
 reportdesign/source/filter/xml/xmlExportDocumentHandler.hxx |8 
 reportdesign/source/filter/xml/xmlImportDocumentHandler.hxx |8 
 2 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit f2cff6567b47f7898eb5e90a0abbcc1ded7568ef
Author: Stephan Bergmann 
AuthorDate: Fri Jan 20 09:30:12 2023 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Jan 20 10:08:45 2023 +

Base Im-/ExportDocumentHandler on WeakImplHelper

...rather than on the deprecated WeakAggImplHelper3.

It was found that those two classes were implementing queryInterface in a 
way
that is incompatible with the XAggregation protocol inherited via
WeakAggImplHelper3.  It looks like no code actually made use of the 
XAggregation
offered by these classes, so the easiest fix for those queryInterface
implementations appears to switch from WeakAggImplHelper3 to WeakImplHelper
(thereby dropping XAggregation, and thus rendering the existing 
queryInterface
implementations OK).

Change-Id: I8f841ca959838d9a87943091b76f3ce1cf8c9303
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145866
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/reportdesign/source/filter/xml/xmlExportDocumentHandler.hxx 
b/reportdesign/source/filter/xml/xmlExportDocumentHandler.hxx
index c6b34af02e22..87959ccea7e1 100644
--- a/reportdesign/source/filter/xml/xmlExportDocumentHandler.hxx
+++ b/reportdesign/source/filter/xml/xmlExportDocumentHandler.hxx
@@ -21,7 +21,7 @@
 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -36,9 +36,9 @@ namespace rptxml
 
 OUString lcl_createAttribute(const xmloff::token::XMLTokenEnum& 
_eNamespace,const xmloff::token::XMLTokenEnum& _eAttribute);
 
-typedef ::cppu::WeakAggImplHelper3< css::xml::sax::XDocumentHandler
-,   css::lang::XInitialization
-,   css::lang::XServiceInfo>   
ExportDocumentHandler_BASE;
+typedef ::cppu::WeakImplHelper< css::xml::sax::XDocumentHandler
+,   css::lang::XInitialization
+,   css::lang::XServiceInfo>   
ExportDocumentHandler_BASE;
 
 class ExportDocumentHandler : public ExportDocumentHandler_BASE
 {
diff --git a/reportdesign/source/filter/xml/xmlImportDocumentHandler.hxx 
b/reportdesign/source/filter/xml/xmlImportDocumentHandler.hxx
index ed1d6af92c8f..73eeab8df376 100644
--- a/reportdesign/source/filter/xml/xmlImportDocumentHandler.hxx
+++ b/reportdesign/source/filter/xml/xmlImportDocumentHandler.hxx
@@ -21,7 +21,7 @@
 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -36,9 +36,9 @@
 class SvXMLTokenMap;
 namespace rptxml
 {
-typedef ::cppu::WeakAggImplHelper3< css::xml::sax::XDocumentHandler
-,   css::lang::XInitialization
-,   css::lang::XServiceInfo>   
ImportDocumentHandler_BASE;
+typedef ::cppu::WeakImplHelper< css::xml::sax::XDocumentHandler
+,   css::lang::XInitialization
+,   css::lang::XServiceInfo>   
ImportDocumentHandler_BASE;
 
 class ImportDocumentHandler : public ImportDocumentHandler_BASE
 {


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

2023-01-18 Thread Caolán McNamara (via logerrit)
 reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 1f1d75feef48633e488df56880f422d83cba8cd9
Author: Caolán McNamara 
AuthorDate: Wed Jan 18 09:21:20 2023 +
Commit: Caolán McNamara 
CommitDate: Wed Jan 18 12:25:40 2023 +

cid#1519050 silence Unchecked dynamic_cast

Change-Id: I024094717141eb3c545ee0491a0d34f03a74c8c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145707
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx 
b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
index 3a1a353286e5..aa064caef2ef 100644
--- a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
@@ -188,6 +188,7 @@ void SAL_CALL ExportDocumentHandler::startElement(const 
OUString & _sName, const
 else if ( _sName == "chart:plot-area" )
 {
 comphelper::AttributeList* pList = 
dynamic_cast(xAttribs.get());
+assert(pList && "can only succeed");
 pList->RemoveAttribute("table:cell-range-address");
 }
 else if ( _sName == "chart:categories" )


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

2022-10-11 Thread Xisco Fauli (via logerrit)
 reportdesign/source/ui/misc/UITools.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 86a80403c68d433b81b8d8a35b2e71fb9f8cd3d6
Author: Xisco Fauli 
AuthorDate: Tue Oct 11 15:55:58 2022 +0200
Commit: Xisco Fauli 
CommitDate: Tue Oct 11 17:26:32 2022 +0200

tdf#150222: Use static_assert to check contiguous item ids

Similar to 5e29b084eb0bfcfbc82622df5c445a6148531989
"tdf#151260, tdf#84930: Use static_assert to check contiguous item ids"

Change-Id: I02836514b6904b79a16c2cd82200b9038d566731
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141226
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/reportdesign/source/ui/misc/UITools.cxx 
b/reportdesign/source/ui/misc/UITools.cxx
index 99f79ff217d7..ae54ed3a6c56 100644
--- a/reportdesign/source/ui/misc/UITools.cxx
+++ b/reportdesign/source/ui/misc/UITools.cxx
@@ -165,6 +165,8 @@
 #define ITEMID_POSTURE_COMPLEX  
TypedWhichId(ITEMID_FIRST + 35)
 #define ITEMID_WEIGHT_COMPLEX   
TypedWhichId(ITEMID_FIRST + 36)
 
+static_assert((ITEMID_WEIGHT_COMPLEX - XATTR_FILL_FIRST) == 56, "Item ids are 
not contiguous");
+
 #define WESTERN 0
 #define ASIAN   1
 #define COMPLEX 2


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

2022-10-10 Thread Xisco Fauli (via logerrit)
 reportdesign/source/ui/report/ReportController.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 5e29b084eb0bfcfbc82622df5c445a6148531989
Author: Xisco Fauli 
AuthorDate: Tue Oct 4 16:28:14 2022 +0200
Commit: Xisco Fauli 
CommitDate: Mon Oct 10 17:41:55 2022 +0200

tdf#151260, tdf#84930: Use static_assert to check contiguous item ids

Change-Id: I9af0ad625ddb80052f7f7783061218a8de1db5e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140946
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/reportdesign/source/ui/report/ReportController.cxx 
b/reportdesign/source/ui/report/ReportController.cxx
index 38034ffb81f0..fb389172985e 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -154,6 +154,8 @@
 /// the static defaults.
 #define RPTUI_ID_METRIC XATTR_FILL_LAST
 
+static_assert((RPTUI_ID_METRIC - RPTUI_ID_LRSPACE) == 28, "Item ids are not 
contiguous");
+
 using namespace ::com::sun::star;
 using namespace uno;
 using namespace io;


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

2022-10-05 Thread Xisco Fauli (via logerrit)
 reportdesign/source/ui/misc/UITools.cxx |   40 
 1 file changed, 20 insertions(+), 20 deletions(-)

New commits:
commit bf3df0fc73fc3757d3abb94465d5bcb2106c355f
Author: Xisco Fauli 
AuthorDate: Tue Oct 4 11:25:17 2022 +0200
Commit: Xisco Fauli 
CommitDate: Wed Oct 5 10:01:14 2022 +0200

reportdesign: keep the constant values in a comment

Similar to 07aa8138db9bbaf222f2b7cea12a9f7d0a8192d7
"tdf#151260: crash in SfxItemPool::SetDefaults
(reportdesign/ReportController)"

Since 9a444884c3b221c9bd7b0aa4476c160921c7fc35
"tdf#150222 reporbuilder, set font for a text box crashes"

Change-Id: I07e5808f1d74a470d7c6f73160f8335254e033fb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140940
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/reportdesign/source/ui/misc/UITools.cxx 
b/reportdesign/source/ui/misc/UITools.cxx
index 57b4c32a7a7b..99f79ff217d7 100644
--- a/reportdesign/source/ui/misc/UITools.cxx
+++ b/reportdesign/source/ui/misc/UITools.cxx
@@ -557,26 +557,26 @@ bool openCharDialog( const 
uno::Reference& _rxRep
 // UNO->ItemSet
 static SfxItemInfo aItemInfos[] =
 {
-{ 0,  true },
-{ 0,  true },
-{ 0,   true },
-{ 0,  true },
-{ 0, true },
-{ 0,   true },
-{ 0,  true },
-{ 0,   true },
-{ 0,true },
-{ 0,  true },
-{ 0,  true },
-{ 0,  true },
-{ 0, true },
-{ 0,true },
-{ 0,true },
-{ 0,true },
-{ 0,true },
-{ 0, true },
-{ 0, true },
-{ 0, true },
+{ 0,  true }, // XATTR_FILLSTYLE
+{ 0,  true }, // XATTR_FILLCOLOR
+{ 0,   true }, // XATTR_FILLGRADIENT
+{ 0,  true }, // XATTR_FILLHATCH
+{ 0, true }, // XATTR_FILLBITMAP
+{ 0,   true }, // XATTR_FILLTRANSPARENCE
+{ 0,  true }, // XATTR_GRADIENTSTEPCOUNT
+{ 0,   true }, // XATTR_FILLBMP_TILE
+{ 0,true }, // XATTR_FILLBMP_POS
+{ 0,  true }, // XATTR_FILLBMP_SIZEX
+{ 0,  true }, // XATTR_FILLBMP_SIZEY
+{ 0,  true }, // XATTR_FILLFLOATTRANSPARENCE
+{ 0, true }, // XATTR_SECONDARYFILLCOLOR
+{ 0,true }, // XATTR_FILLBMP_SIZELOG
+{ 0,true }, // XATTR_FILLBMP_TILEOFFSETX
+{ 0,true }, // XATTR_FILLBMP_TILEOFFSETY
+{ 0,true }, // XATTR_FILLBMP_STRETCH
+{ 0, true }, // XATTR_FILLBMP_POSOFFSETX
+{ 0, true }, // XATTR_FILLBMP_POSOFFSETY
+{ 0, true }, // XATTR_FILLBACKGROUND
 
 { SID_ATTR_CHAR_FONT, true },
 { SID_ATTR_CHAR_FONTHEIGHT, true },


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

2022-09-09 Thread Andrea Gelmini (via logerrit)
 reportdesign/source/core/sdr/RptObject.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 08051644adeed4d0ee137f3111f225b378e436aa
Author: Andrea Gelmini 
AuthorDate: Fri Sep 9 17:20:40 2022 +0200
Commit: Julien Nabet 
CommitDate: Fri Sep 9 21:17:56 2022 +0200

Fix typo

Change-Id: I764af470a6bff3ec82182d32fd971e94fa2f725a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139732
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/reportdesign/source/core/sdr/RptObject.cxx 
b/reportdesign/source/core/sdr/RptObject.cxx
index e54db1ee3fe1..1e4285162531 100644
--- a/reportdesign/source/core/sdr/RptObject.cxx
+++ b/reportdesign/source/core/sdr/RptObject.cxx
@@ -568,7 +568,7 @@ OUnoObject::OUnoObject(
 // tdf#119067
 ,m_bSetDefaultLabel(rSource.m_bSetDefaultLabel)
 {
-osl_atomic_increment(_refCount); // getUnoShape will ref-count thiss
+osl_atomic_increment(_refCount); // getUnoShape will ref-count this
 {
 if ( !rSource.getUnoControlModelTypeName().isEmpty() )
 impl_initializeModel_nothrow();


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

2022-09-08 Thread Noel Grandin (via logerrit)
 reportdesign/source/core/sdr/RptModel.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit 94b9827f790ea1d37c2e128df1e3dc4b57c5f768
Author: Noel Grandin 
AuthorDate: Thu Sep 8 09:30:20 2022 +0200
Commit: Noel Grandin 
CommitDate: Thu Sep 8 11:47:17 2022 +0200

tdf#150756 Assertion when opening report for editing

regression from
commit 8611f6e259b807b4f19c8dc0eab86ca648891ce3
Author: Noel Grandin 
Date:   Thu May 27 10:27:46 2021 +0200
ref-count SdrObject

Change-Id: Icfdf74035658a6d8222059bb6db36c852a51c4de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139632
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/reportdesign/source/core/sdr/RptModel.cxx 
b/reportdesign/source/core/sdr/RptModel.cxx
index 90553afec835..f79c2a214fca 100644
--- a/reportdesign/source/core/sdr/RptModel.cxx
+++ b/reportdesign/source/core/sdr/RptModel.cxx
@@ -54,6 +54,13 @@ 
OReportModel::OReportModel(::reportdesign::OReportDefinition* _pReportDefinition
 
 OReportModel::~OReportModel()
 {
+// There are some nasty interactions which mean that we have to delete
+// the pages before we destroy the model - otherwise we will trigger
+// callbacks which will attempt to recreate SvxShape objects and
+// fail because the model is being torn down.
+while (GetPageCount())
+RemovePage(GetPageCount()-1);
+
 detachController();
 }
 


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

2022-09-07 Thread Noel Grandin (via logerrit)
 reportdesign/source/ui/inc/ReportControllerObserver.hxx|   14 ++--
 reportdesign/source/ui/report/ReportControllerObserver.cxx |   44 +++--
 2 files changed, 21 insertions(+), 37 deletions(-)

New commits:
commit f5c6ef40dd494f6984c6ed784fccc02806999836
Author: Noel Grandin 
AuthorDate: Tue Sep 6 18:44:10 2022 +0200
Commit: Noel Grandin 
CommitDate: Wed Sep 7 09:38:15 2022 +0200

OXReportControllerObserver does not need a pimpl

it is module private

Change-Id: I50bd06aa1b75d7561aee788c69c0482c6293db16
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139540
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/reportdesign/source/ui/inc/ReportControllerObserver.hxx 
b/reportdesign/source/ui/inc/ReportControllerObserver.hxx
index d77fb3f2ef78..ac317e13d427 100644
--- a/reportdesign/source/ui/inc/ReportControllerObserver.hxx
+++ b/reportdesign/source/ui/inc/ReportControllerObserver.hxx
@@ -21,14 +21,15 @@
 
 #include 
 #include 
+#include 
 #include 
-
-#include 
-
+#include 
 #include 
-
 #include "FormattedFieldBeautifier.hxx"
 #include "FixedTextColor.hxx"
+#include 
+#include 
+
 
 class VclSimpleEvent;
 
@@ -45,8 +46,9 @@ namespace rptui
 >
 {
 
-const ::std::unique_ptr m_pImpl;
-
+::std::vector< css::uno::Reference< css::container::XChild> > 
m_aSections;
+::osl::Mutex m_aMutex;
+oslInterlockedCount  m_nLocks;
 FormattedFieldBeautifier m_aFormattedFieldBeautifier;
 FixedTextColor   m_aFixedTextColor;
 
diff --git a/reportdesign/source/ui/report/ReportControllerObserver.cxx 
b/reportdesign/source/ui/report/ReportControllerObserver.cxx
index 8ad7540886cd..b05d3b3d1359 100644
--- a/reportdesign/source/ui/report/ReportControllerObserver.cxx
+++ b/reportdesign/source/ui/report/ReportControllerObserver.cxx
@@ -23,7 +23,6 @@
 
 #include 
 #include 
-#include 
 #include 
 #include 
 
@@ -40,27 +39,10 @@ namespace rptui
 typedef std::map AllProperties;
 typedef std::map, AllProperties> 
PropertySetInfoCache;
 
-class OXReportControllerObserverImpl
-{
-public:
-::std::vector< uno::Reference< container::XChild> > m_aSections;
-::osl::Mutexm_aMutex;
-oslInterlockedCount m_nLocks;
-
-explicit OXReportControllerObserverImpl();
-OXReportControllerObserverImpl(const OXReportControllerObserverImpl&) = 
delete;
-OXReportControllerObserverImpl& operator=(const 
OXReportControllerObserverImpl&) = delete;
-};
-
-
-OXReportControllerObserverImpl::OXReportControllerObserverImpl()
-:m_nLocks(0)
-{
-}
 
 
 OXReportControllerObserver::OXReportControllerObserver(const 
OReportController& _rController)
-:m_pImpl(new OXReportControllerObserverImpl )
+:m_nLocks(0)
 ,m_aFormattedFieldBeautifier(_rController)
 ,m_aFixedTextColor(_rController)
 {
@@ -91,7 +73,7 @@ public:
 
 // send all Section Objects a 'tingle'
 // maybe they need a change in format, color, etc
-for (const uno::Reference& xChild : 
m_pImpl->m_aSections)
+for (const uno::Reference& xChild : m_aSections)
 {
 if (xChild.is())
 {
@@ -132,15 +114,15 @@ public:
 void OXReportControllerObserver::Clear()
 {
 OEnvLock aLock(*this);
-m_pImpl->m_aSections.clear();
+m_aSections.clear();
 }
 
 // XPropertyChangeListener
 void SAL_CALL OXReportControllerObserver::propertyChange(const 
beans::PropertyChangeEvent& _rEvent)
 {
-osl::MutexGuard aGuard( m_pImpl->m_aMutex );
+osl::MutexGuard aGuard( m_aMutex );
 
-if ( m_pImpl->m_nLocks != 0 )
+if ( m_nLocks != 0 )
 return;
 
 m_aFormattedFieldBeautifier.notifyPropertyChange(_rEvent);
@@ -151,14 +133,14 @@ public:
 void OXReportControllerObserver::Lock()
 {
 OSL_ENSURE(m_refCount,"Illegal call to dead object!");
-osl_atomic_increment( _pImpl->m_nLocks );
+osl_atomic_increment( _nLocks );
 }
 
 void OXReportControllerObserver::UnLock()
 {
 OSL_ENSURE(m_refCount,"Illegal call to dead object!");
 
-osl_atomic_decrement( _pImpl->m_nLocks );
+osl_atomic_decrement( _nLocks );
 }
 
 void OXReportControllerObserver::AddSection(const uno::Reference< 
report::XSection > & _xSection)
@@ -167,7 +149,7 @@ void OXReportControllerObserver::AddSection(const 
uno::Reference< report::XSecti
 try
 {
 uno::Reference xChild = _xSection;
-m_pImpl->m_aSections.push_back(xChild);
+m_aSections.push_back(xChild);
 uno::Reference< uno::XInterface >  xInt(_xSection);
 AddElement(xInt);
 }
@@ -184,8 +166,8 @@ void OXReportControllerObserver::RemoveSection(const 
uno::Reference< report::XSe
 try
 {
 uno::Reference xChild(_xSection);
-

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

2022-08-06 Thread Caolán McNamara (via logerrit)
 reportdesign/source/ui/inc/ScrollHelper.hxx|   18 +-
 reportdesign/source/ui/report/ScrollHelper.cxx |   22 +++---
 reportdesign/source/ui/report/ViewsWindow.cxx  |8 ++--
 reportdesign/source/ui/report/dlgedfunc.cxx|   21 +
 4 files changed, 39 insertions(+), 30 deletions(-)

New commits:
commit 800551502416d3d80c8d14a53335dad5190290a4
Author: Caolán McNamara 
AuthorDate: Fri Aug 5 16:16:53 2022 +0100
Commit: Caolán McNamara 
CommitDate: Sat Aug 6 13:08:15 2022 +0200

tdf#117388 use native scrollbar under gtk in reportdesigner

Change-Id: If7a66055dbae6d8ee31768ff438eb8105b8f980f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137880
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/reportdesign/source/ui/inc/ScrollHelper.hxx 
b/reportdesign/source/ui/inc/ScrollHelper.hxx
index 076943ff76fc..02b34d6e6034 100644
--- a/reportdesign/source/ui/inc/ScrollHelper.hxx
+++ b/reportdesign/source/ui/inc/ScrollHelper.hxx
@@ -16,9 +16,10 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_REPORTDESIGN_SOURCE_UI_INC_SCROLLHELPER_HXX
-#define INCLUDED_REPORTDESIGN_SOURCE_UI_INC_SCROLLHELPER_HXX
 
+#pragma once
+
+#include 
 #include 
 #include 
 #include 
@@ -44,8 +45,8 @@ namespace rptui
 ,   public IMarkedSection
 {
 private:
-VclPtr   m_aHScroll;
-VclPtr   m_aVScroll;
+VclPtr   m_aHScroll;
+VclPtr   m_aVScroll;
 VclPtrm_aCornerWin;   // window in the 
bottom right corner
 Sizem_aTotalPixelSize;
 VclPtr m_pParent;
@@ -53,10 +54,10 @@ namespace rptui
 ::rtl::Reference
 m_pReportDefinitionMultiPlexer; // 
listener for property changes
 
-DECL_LINK( ScrollHdl, ScrollBar*, void);
+DECL_LINK( ScrollHdl, weld::Scrollbar&, void);
 Size ResizeScrollBars();
 void ImplInitSettings();
-void impl_initScrollBar( ScrollBar& _rScrollBar ) const;
+void impl_initScrollBar(ScrollAdaptor& rScrollBar) const;
 
 OScrollWindowHelper(OScrollWindowHelper const &) = delete;
 void operator =(OScrollWindowHelper const &) = delete;
@@ -79,8 +80,8 @@ namespace rptui
 PointgetThumbPos() const { return 
Point(m_aHScroll->GetThumbPos(),m_aVScroll->GetThumbPos())/*m_aScrollOffset*/; }
 voidsetTotalSize(sal_Int32 _nWidth, sal_Int32 
_nHeight);
 const Size& getTotalSize() const { return 
m_aTotalPixelSize; }
-ScrollBar&   GetHScroll() { return *m_aHScroll; }
-ScrollBar&   GetVScroll() { return *m_aVScroll; }
+ScrollAdaptor&   GetHScroll() { return *m_aHScroll; }
+ScrollAdaptor&   GetVScroll() { return *m_aVScroll; }
 
 // forwards
 voidSetMode( DlgEdMode _eMode );
@@ -205,6 +206,5 @@ namespace rptui
 sal_uInt16 getZoomFactor(SvxZoomType _eType) const;
 };
 }
-#endif // INCLUDED_REPORTDESIGN_SOURCE_UI_INC_SCROLLHELPER_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/ui/report/ScrollHelper.cxx 
b/reportdesign/source/ui/report/ScrollHelper.cxx
index bf5f261cfd7f..de342a17807c 100644
--- a/reportdesign/source/ui/report/ScrollHelper.cxx
+++ b/reportdesign/source/ui/report/ScrollHelper.cxx
@@ -34,7 +34,7 @@ namespace rptui
 using namespace ::com::sun::star;
 
 
-static void lcl_setScrollBar(sal_Int32 _nNewValue,const Point& _aPos,const 
Size& _aSize,ScrollBar& _rScrollBar)
+static void lcl_setScrollBar(sal_Int32 _nNewValue,const Point& _aPos,const 
Size& _aSize,ScrollAdaptor& _rScrollBar)
 {
 _rScrollBar.SetPosSizePixel(_aPos,_aSize);
 _rScrollBar.SetPageSize( _nNewValue );
@@ -45,8 +45,8 @@ static void lcl_setScrollBar(sal_Int32 _nNewValue,const 
Point& _aPos,const Size&
 OScrollWindowHelper::OScrollWindowHelper( ODesignView* _pDesignView)
 : OScrollWindowHelper_BASE( _pDesignView,WB_DIALOGCONTROL)
 ,OPropertyChangeListener(m_aMutex)
-,m_aHScroll( VclPtr::Create(this, WB_HSCROLL|WB_REPEAT|WB_DRAG) 
)
-,m_aVScroll( VclPtr::Create(this, WB_VSCROLL|WB_REPEAT|WB_DRAG) 
)
+,m_aHScroll( VclPtr::Create(this, true) )
+,m_aVScroll( VclPtr::Create(this, false) )
 ,m_aCornerWin( VclPtr::Create(this) )
 ,m_pParent(_pDesignView)
 ,m_aReportWindow(VclPtr::Create(this,m_pParent))
@@ -83,20 +83,12 @@ void OScrollWindowHelper::dispose()
 OScrollWindowHelper_BASE::dispose();
 }
 
-
-void OScrollWindowHelper::impl_initScrollBar( ScrollBar& _rScrollBar ) const
+void OScrollWindowHelper::impl_initScrollBar( ScrollAdaptor& _rScrollBar ) 
const
 {
-AllSettings aSettings( _rScrollBar.GetSettings() );
-StyleSettings aStyle( 

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

2022-08-06 Thread Noel Grandin (via logerrit)
 reportdesign/source/ui/misc/UITools.cxx |  127 
 1 file changed, 66 insertions(+), 61 deletions(-)

New commits:
commit 9a444884c3b221c9bd7b0aa4476c160921c7fc35
Author: Noel Grandin 
AuthorDate: Fri Aug 5 14:11:41 2022 +0200
Commit: Noel Grandin 
CommitDate: Sat Aug 6 09:09:33 2022 +0200

tdf#150222 reporbuilder, set font for a text box crashes

regression from
commit c4cf2e82e8d0aaef9b1daedc033d6edf647e5284
Author: Samuel Mehrbrodt 
Date:   Mon Jun 13 08:53:22 2022 +0200
tdf#128150 Add OOXML import/export for "use background fill"

which modified XATTR_FILL_LAST.

Ideally, I would just adjust the ranges for the pool, but I can't do
that because we are using static defaults, and the range for static
defaults has to be contiguous.

Also update the aItemInfos array to avoid a DBG_UTIL check that
complains about mapping a SID to itself

Change-Id: Ie76bdc83fa0a0ad07b6b2afdb678193889373cb2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137867
Tested-by: Julien Nabet 
Reviewed-by: Julien Nabet 
Reviewed-by: Noel Grandin 

diff --git a/reportdesign/source/ui/misc/UITools.cxx 
b/reportdesign/source/ui/misc/UITools.cxx
index b77f3f77a77b..1c0ca7733e6a 100644
--- a/reportdesign/source/ui/misc/UITools.cxx
+++ b/reportdesign/source/ui/misc/UITools.cxx
@@ -120,46 +120,50 @@
 #include 
 #include 
 
-#define ITEMID_FONT 
TypedWhichId(XATTR_FILL_LAST + 1)
-#define ITEMID_FONTHEIGHT   
TypedWhichId(XATTR_FILL_LAST + 2)
-#define ITEMID_LANGUAGE 
TypedWhichId(XATTR_FILL_LAST + 3)
-
-#define ITEMID_POSTURE  
TypedWhichId(XATTR_FILL_LAST + 4)
-#define ITEMID_WEIGHT   
TypedWhichId(XATTR_FILL_LAST + 5)
-#define ITEMID_SHADOWED 
TypedWhichId(XATTR_FILL_LAST + 6)
-#define ITEMID_WORDLINEMODE 
TypedWhichId(XATTR_FILL_LAST + 7)
-#define ITEMID_CONTOUR  
TypedWhichId(XATTR_FILL_LAST + 8)
-#define ITEMID_CROSSEDOUT   
TypedWhichId(XATTR_FILL_LAST + 9)
-#define ITEMID_UNDERLINE
TypedWhichId(XATTR_FILL_LAST + 10)
-
-#define ITEMID_COLOR
TypedWhichId(XATTR_FILL_LAST + 11)
-#define ITEMID_KERNING  
TypedWhichId(XATTR_FILL_LAST + 12)
-#define ITEMID_CASEMAP  
TypedWhichId(XATTR_FILL_LAST + 13)
-
-#define ITEMID_ESCAPEMENT   
TypedWhichId(XATTR_FILL_LAST + 14)
-#define ITEMID_FONTLIST XATTR_FILL_LAST + 15
-#define ITEMID_AUTOKERN 
TypedWhichId(XATTR_FILL_LAST + 16)
-#define ITEMID_COLOR_TABLE  
TypedWhichId(XATTR_FILL_LAST + 17)
-#define ITEMID_BLINK
TypedWhichId(XATTR_FILL_LAST + 18)
-#define ITEMID_EMPHASISMARK 
TypedWhichId(XATTR_FILL_LAST + 19)
-#define ITEMID_TWOLINES 
TypedWhichId(XATTR_FILL_LAST + 20)
-#define ITEMID_CHARROTATE   
TypedWhichId(XATTR_FILL_LAST + 21)
-#define ITEMID_CHARSCALE_W  
TypedWhichId(XATTR_FILL_LAST + 22)
-#define ITEMID_CHARRELIEF   
TypedWhichId(XATTR_FILL_LAST + 23)
-#define ITEMID_CHARHIDDEN   
TypedWhichId(XATTR_FILL_LAST + 24)
-#define ITEMID_BRUSH
TypedWhichId(XATTR_FILL_LAST + 25)
-#define ITEMID_HORJUSTIFY   
TypedWhichId(XATTR_FILL_LAST + 26)
-#define ITEMID_VERJUSTIFY   
TypedWhichId(XATTR_FILL_LAST + 27)
-#define ITEMID_FONT_ASIAN   
TypedWhichId(XATTR_FILL_LAST + 28)
-#define ITEMID_FONTHEIGHT_ASIAN 
TypedWhichId(XATTR_FILL_LAST + 29)
-#define ITEMID_LANGUAGE_ASIAN   
TypedWhichId(XATTR_FILL_LAST + 30)
-#define ITEMID_POSTURE_ASIAN
TypedWhichId(XATTR_FILL_LAST + 31)
-#define ITEMID_WEIGHT_ASIAN 
TypedWhichId(XATTR_FILL_LAST + 32)
-#define ITEMID_FONT_COMPLEX 
TypedWhichId(XATTR_FILL_LAST + 33)
-#define ITEMID_FONTHEIGHT_COMPLEX   
TypedWhichId(XATTR_FILL_LAST + 34)
-#define ITEMID_LANGUAGE_COMPLEX 
TypedWhichId(XATTR_FILL_LAST + 35)
-#define ITEMID_POSTURE_COMPLEX  
TypedWhichId(XATTR_FILL_LAST + 36)
-#define ITEMID_WEIGHT_COMPLEX   
TypedWhichId(XATTR_FILL_LAST + 37)
+/// Note that we deliberately overlap an existing item id, so that we can have 
contiguous item ids for
+/// the static defaults.
+#define ITEMID_FIRSTXATTR_FILL_LAST
+
+#define ITEMID_FONT TypedWhichId(ITEMID_FIRST)
+#define ITEMID_FONTHEIGHT   
TypedWhichId(ITEMID_FIRST + 1)
+#define ITEMID_LANGUAGE 
TypedWhichId(ITEMID_FIRST + 2)
+
+#define ITEMID_POSTURE  
TypedWhichId(ITEMID_FIRST + 3)
+#define ITEMID_WEIGHT   
TypedWhichId(ITEMID_FIRST + 4)
+#define ITEMID_SHADOWED 
TypedWhichId(ITEMID_FIRST + 5)
+#define ITEMID_WORDLINEMODE 
TypedWhichId(ITEMID_FIRST + 6)
+#define 

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

2022-03-30 Thread Caolán McNamara (via logerrit)
 reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx |8 +---
 reportdesign/source/filter/xml/xmlImportDocumentHandler.hxx |3 +++
 2 files changed, 8 insertions(+), 3 deletions(-)

New commits:
commit 70f3a94949cce612be9eff14fca94976acfc61a4
Author: Caolán McNamara 
AuthorDate: Tue Mar 29 20:00:09 2022 +0100
Commit: Caolán McNamara 
CommitDate: Wed Mar 30 09:38:49 2022 +0200

tdf#117162 ImportDocumentHandler expected XDocumentHandler argument

but SvXMLImport not longer supports XDocumentHandler since

commit fe2b4e7dc6533535736a8f08496f316427386179
Date:   Tue Oct 6 18:27:27 2020 +0200

make SvXMLImport fast-parser only

here use a SvXMLLegacyToFastDocHandler to try and glue the two
parts together again. Though the use of reflection::XProxyFactory
is a bit worrying here wrt this change so unforseen side effects
are possible. Full change over to fast-parser only is probably
advisable.

Change-Id: Ie14d1d9fa8534c187efc67a6c1cc0989316c4634
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132285
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx 
b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
index 3d8b2c1be603..963264436092 100644
--- a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
@@ -331,13 +331,15 @@ void SAL_CALL ImportDocumentHandler::initialize( const 
uno::Sequence< uno::Any >
 {
 ::osl::MutexGuard aGuard(m_aMutex);
 comphelper::SequenceAsHashMap aArgs(_aArguments);
-m_xDelegatee = 
aArgs.getUnpackedValueOrDefault("DocumentHandler",m_xDelegatee);
+m_xDocumentHandler = 
aArgs.getUnpackedValueOrDefault("DocumentHandler",m_xDocumentHandler);
 m_xModel = aArgs.getUnpackedValueOrDefault("Model",m_xModel);
 
-OSL_ENSURE(m_xDelegatee.is(),"No document handler available!");
-if ( !m_xDelegatee.is() || !m_xModel.is() )
+OSL_ENSURE(m_xDocumentHandler.is(), "No document handler available!");
+if (!m_xDocumentHandler.is() || !m_xModel.is())
 throw uno::Exception("no delegatee and no model", nullptr);
 
+m_xDelegatee.set(new 
SvXMLLegacyToFastDocHandler(dynamic_cast(m_xDocumentHandler.get(;
+
 m_xDatabaseDataProvider.set(m_xModel->getDataProvider(),uno::UNO_QUERY);
 if ( !m_xDatabaseDataProvider.is() )
 {
diff --git a/reportdesign/source/filter/xml/xmlImportDocumentHandler.hxx 
b/reportdesign/source/filter/xml/xmlImportDocumentHandler.hxx
index 342194a9612a..aadea441ca62 100644
--- a/reportdesign/source/filter/xml/xmlImportDocumentHandler.hxx
+++ b/reportdesign/source/filter/xml/xmlImportDocumentHandler.hxx
@@ -23,12 +23,14 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
 #include 
+#include 
 #include 
 
 class SvXMLTokenMap;
@@ -77,6 +79,7 @@ private:
 ::std::vector< OUString>  
m_aDetailFields;
 css::uno::Sequence< css::beans::PropertyValue >   
m_aArguments;
 css::uno::Reference< css::uno::XComponentContext >
m_xContext;
+css::uno::Reference  
m_xDocumentHandler;
 css::uno::Reference< css::xml::sax::XDocumentHandler >
m_xDelegatee;
 css::uno::Reference< css::uno::XAggregation > m_xProxy;
 css::uno::Reference< css::lang::XTypeProvider >   
m_xTypeProvider;


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

2021-11-27 Thread Noel Grandin (via logerrit)
 reportdesign/source/core/api/ReportDefinition.cxx   |   15 ---
 reportdesign/source/core/inc/Functions.hxx  |4 ++--
 reportdesign/source/core/inc/Groups.hxx |4 ++--
 reportdesign/source/core/inc/ReportControlModel.hxx |4 ++--
 reportdesign/source/core/inc/Section.hxx|4 ++--
 reportdesign/source/ui/inc/ReportController.hxx |4 ++--
 reportdesign/source/ui/report/ReportController.cxx  |2 +-
 7 files changed, 19 insertions(+), 18 deletions(-)

New commits:
commit e7f2dcf29ba3d726549c38060723d8ae5f443c88
Author: Noel Grandin 
AuthorDate: Fri Nov 26 18:44:27 2021 +0200
Commit: Noel Grandin 
CommitDate: Sat Nov 27 15:53:12 2021 +0100

use more OInterfaceContainerHelper3 in reportdesign

Change-Id: I742f8a684bb689af8593c3ad5d8918b30c6a7ab1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125942
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/reportdesign/source/core/api/ReportDefinition.cxx 
b/reportdesign/source/core/api/ReportDefinition.cxx
index 39785167d6c0..116de59b0690 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -91,6 +91,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -451,11 +452,11 @@ uno::Sequence< uno::Any > SAL_CALL 
OStyle::getPropertyDefaults( const uno::Seque
 struct OReportDefinitionImpl
 {
 uno::WeakReference< uno::XInterface >   m_xParent;
-::comphelper::OInterfaceContainerHelper2  
m_aStorageChangeListeners;
-::comphelper::OInterfaceContainerHelper2  
m_aCloseListener;
-::comphelper::OInterfaceContainerHelper2  
m_aModifyListeners;
-::comphelper::OInterfaceContainerHelper2  
m_aLegacyEventListeners;
-::comphelper::OInterfaceContainerHelper2  
m_aDocEventListeners;
+::comphelper::OInterfaceContainerHelper3 
m_aStorageChangeListeners;
+::comphelper::OInterfaceContainerHelper3 
m_aCloseListener;
+::comphelper::OInterfaceContainerHelper3 
m_aModifyListeners;
+::comphelper::OInterfaceContainerHelper3 
m_aLegacyEventListeners;
+::comphelper::OInterfaceContainerHelper3 
m_aDocEventListeners;
 ::std::vector< uno::Reference< frame::XController> >m_aControllers;
 uno::Sequence< beans::PropertyValue >   m_aArgs;
 
@@ -1069,7 +1070,7 @@ void SAL_CALL OReportDefinition::close(sal_Bool 
bDeliverOwnership)
 // notify our container listeners
 lang::EventObject aEvt( static_cast< ::cppu::OWeakObject* >( this ) );
 aGuard.clear();
-m_pImpl->m_aCloseListener.forEach(
+m_pImpl->m_aCloseListener.forEach(
 [, ] (uno::Reference 
const& xListener) {
 return xListener->queryClosing(aEvt, bDeliverOwnership);
 });
@@ -1418,7 +1419,7 @@ void SAL_CALL OReportDefinition::switchToStorage(
 m_pImpl->m_pObjectContainer->SwitchPersistence(m_pImpl->m_xStorage);
 }
 // notify our container listeners
-
m_pImpl->m_aStorageChangeListeners.forEach(
+m_pImpl->m_aStorageChangeListeners.forEach(
 [this, ] (uno::Reference 
const& xListener) {
 return 
xListener->notifyStorageChange(static_cast(this), xStorage);
 });
diff --git a/reportdesign/source/core/inc/Functions.hxx 
b/reportdesign/source/core/inc/Functions.hxx
index 84a35bc5e285..94a54beeb02d 100644
--- a/reportdesign/source/core/inc/Functions.hxx
+++ b/reportdesign/source/core/inc/Functions.hxx
@@ -22,7 +22,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -39,7 +39,7 @@ namespace reportdesign
 public FunctionsBase
 {
 typedef ::std::vector< css::uno::Reference< css::report::XFunction > > 
 TFunctions;
-::comphelper::OInterfaceContainerHelper2
m_aContainerListeners;
+
::comphelper::OInterfaceContainerHelper3 
m_aContainerListeners;
 css::uno::Reference< css::uno::XComponentContext >
m_xContext;
 css::uno::WeakReference< css::report::XFunctionsSupplier >
m_xParent;
 TFunctions
m_aFunctions;
diff --git a/reportdesign/source/core/inc/Groups.hxx 
b/reportdesign/source/core/inc/Groups.hxx
index 82dcb82bf83b..9897abd3af76 100644
--- a/reportdesign/source/core/inc/Groups.hxx
+++ b/reportdesign/source/core/inc/Groups.hxx
@@ -22,7 +22,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 
@@ -38,7 +38,7 @@ namespace reportdesign
 public GroupsBase
 {
 typedef ::std::vector< css::uno::Reference< css::report::XGroup > > 
TGroups;
-::comphelper::OInterfaceContainerHelper2
m_aContainerListeners;
+
::comphelper::OInterfaceContainerHelper3 
m_aContainerListeners;
  

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

2021-11-14 Thread Noel Grandin (via logerrit)
 reportdesign/source/core/sdr/RptObject.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 92857b181a715de08bd4264f4dc4161367d2b3c7
Author: Noel Grandin 
AuthorDate: Sun Nov 14 16:30:39 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon Nov 15 08:35:08 2021 +0100

tdf#145323 reportbuilder Moving a field corrupts the field

regression from
commit 09cb778b6eb7d3a5b9029965a1320b49c90e7295
clean up SdrObject cloning

Change-Id: I7f234dee1dca704195eeebba874c80e73c7abe91
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125196
Tested-by: Noel Grandin 
Reviewed-by: Noel Grandin 

diff --git a/reportdesign/source/core/sdr/RptObject.cxx 
b/reportdesign/source/core/sdr/RptObject.cxx
index 284fc4c9c5ae..b4bc3b4fb28c 100644
--- a/reportdesign/source/core/sdr/RptObject.cxx
+++ b/reportdesign/source/core/sdr/RptObject.cxx
@@ -587,7 +587,7 @@ OUnoObject::OUnoObject(
 
 OUnoObject::OUnoObject(
 SdrModel& rSdrModel, OUnoObject const & rSource)
-:   SdrUnoObj(rSdrModel, rSource.getUnoControlModelTypeName())
+:   SdrUnoObj(rSdrModel, rSource)
 ,OObjectBase(rSource.getServiceName())
 ,m_nObjectType(rSource.m_nObjectType)
 // tdf#119067


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

2021-10-30 Thread Mike Kaganski (via logerrit)
 reportdesign/source/core/api/ReportDefinition.cxx   |   20 ++---
 reportdesign/source/core/api/ReportEngineJFree.cxx  |   43 ---
 reportdesign/source/filter/xml/xmlControlProperty.cxx   |2 
 reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx |2 
 reportdesign/source/filter/xml/xmlfilter.cxx|   12 +--
 reportdesign/source/ui/dlg/CondFormat.cxx   |   16 +---
 reportdesign/source/ui/dlg/DateTime.cxx |   25 +++---
 reportdesign/source/ui/dlg/GroupsSorting.cxx|   45 +---
 reportdesign/source/ui/dlg/Navigator.cxx|7 -
 reportdesign/source/ui/inspection/GeometryHandler.cxx   |3 
 reportdesign/source/ui/misc/RptUndo.cxx |   23 ++
 reportdesign/source/ui/misc/UITools.cxx |5 -
 reportdesign/source/ui/report/DesignView.cxx|   12 +--
 reportdesign/source/ui/report/ReportController.cxx  |   14 +--
 reportdesign/source/ui/report/ReportSection.cxx |   15 ++--
 15 files changed, 111 insertions(+), 133 deletions(-)

New commits:
commit c5196e281f51b2894aa903469ba8c15a6723eb4c
Author: Mike Kaganski 
AuthorDate: Fri Oct 29 09:55:58 2021 +0300
Commit: Mike Kaganski 
CommitDate: Sat Oct 30 20:55:43 2021 +0200

Prepare for removal of non-const operator[] from Sequence in reportdesign

Change-Id: I7631aeb90bf224ba7a00025df6e3fa444b216a42
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124380
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/reportdesign/source/core/api/ReportDefinition.cxx 
b/reportdesign/source/core/api/ReportDefinition.cxx
index 6e8c0950b72e..36babe9b72a0 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -208,7 +208,7 @@ static void lcl_extractAndStartStatusIndicator( const 
utl::MediaDescriptor& _rDe
 
 sal_Int32 nLength = _rCallArgs.getLength();
 _rCallArgs.realloc( nLength + 1 );
-_rCallArgs[ nLength ] <<= _rxStatusIndicator;
+_rCallArgs.getArray()[ nLength ] <<= _rxStatusIndicator;
 }
 }
 catch (const uno::Exception&)
@@ -706,7 +706,7 @@ uno::Sequence< OUString > SAL_CALL 
OReportDefinition::getSupportedServiceNames(
 {
 sal_Int32 nLen = aSupported.getLength();
 aSupported.realloc( nLen + 1 );
-aSupported[ nLen ] = SERVICE_REPORTDEFINITION;
+aSupported.getArray()[ nLen ] = SERVICE_REPORTDEFINITION;
 }
 
 // outta here
@@ -1246,7 +1246,7 @@ void OReportDefinition::impl_loadFromStorage_nolck_throw( 
const uno::Reference<
 beans::PropertyValue aPropVal;
 aPropVal.Name = "Storage";
 aPropVal.Value <<= _xStorageToLoadFrom;
-aDelegatorArguments[nPos] <<= aPropVal;
+aDelegatorArguments.getArray()[nPos] <<= aPropVal;
 
 rptui::OXUndoEnvironment& rEnv = m_pImpl->m_pReportModel->GetUndoEnv();
 rptui::OXUndoEnvironment::OUndoEnvLock aLock(rEnv);
@@ -1328,8 +1328,9 @@ void SAL_CALL OReportDefinition::storeToStorage( const 
uno::Reference< embed::XS
 
 
 sal_Int32 nArgsLen = aDelegatorArguments.getLength();
-aDelegatorArguments.realloc(nArgsLen+1);
-aDelegatorArguments[nArgsLen++] <<= xInfoSet;
+aDelegatorArguments.realloc(nArgsLen+3);
+auto pDelegatorArguments = aDelegatorArguments.getArray();
+pDelegatorArguments[nArgsLen++] <<= xInfoSet;
 
 uno::Reference< document::XEmbeddedObjectResolver > xObjectResolver;
 uno::Reference xGraphicStorageHandler;
@@ -1338,9 +1339,8 @@ void SAL_CALL OReportDefinition::storeToStorage( const 
uno::Reference< embed::XS
 xGraphicHelper.clear();
 xObjectResolver = SvXMLEmbeddedObjectHelper::Create( 
_xStorageToSaveTo,*this, SvXMLEmbeddedObjectHelperMode::Write ).get();
 
-aDelegatorArguments.realloc(nArgsLen+2);
-aDelegatorArguments[nArgsLen++] <<= xGraphicStorageHandler;
-aDelegatorArguments[nArgsLen++] <<= xObjectResolver;
+pDelegatorArguments[nArgsLen++] <<= xGraphicStorageHandler;
+pDelegatorArguments[nArgsLen++] <<= xObjectResolver;
 
 uno::Reference 
xCom(static_cast(this),uno::UNO_QUERY);
 // Try to write to settings.xml, meta.xml, and styles.xml; only really 
care about success of
@@ -1607,9 +1607,7 @@ void SAL_CALL OReportDefinition::load( const 
uno::Sequence< beans::PropertyValue
 const size_t nLastOpenMode = SAL_N_ELEMENTS( nOpenModes ) - 1;
 for ( size_t i=nFirstOpenMode; i <= nLastOpenMode; ++i )
 {
-uno::Sequence< uno::Any > aStorageCreationArgs(2);
-aStorageCreationArgs[0] = aStorageSource;
-aStorageCreationArgs[1] <<= nOpenModes[i];
+uno::Sequence< uno::Any > aStorageCreationArgs{ aStorageSource, 
uno::Any(nOpenModes[i]) };
 
 try
 {
diff --git a/reportdesign/source/core/api/ReportEngineJFree.cxx 
b/reportdesign/source/core/api/ReportEngineJFree.cxx
index 

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

2021-10-26 Thread Julien Nabet (via logerrit)
 reportdesign/source/ui/inspection/metadata.cxx |  100 +++--
 1 file changed, 44 insertions(+), 56 deletions(-)

New commits:
commit baa6f7737d2b009739a244afd641eee35425015e
Author: Julien Nabet 
AuthorDate: Tue Oct 26 22:15:24 2021 +0200
Commit: Julien Nabet 
CommitDate: Tue Oct 26 23:44:26 2021 +0200

Replace macros from reportdesign/source/ui/inspection/metadata.cxx

Change-Id: I779b6a20b814815b480876d8e65ef6b8e80f9443
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124241
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/reportdesign/source/ui/inspection/metadata.cxx 
b/reportdesign/source/ui/inspection/metadata.cxx
index 9cbf8620d66e..59bbdb21d7d7 100644
--- a/reportdesign/source/ui/inspection/metadata.cxx
+++ b/reportdesign/source/ui/inspection/metadata.cxx
@@ -78,16 +78,6 @@ namespace rptui
 
 //= OPropertyInfoService
 
-#define DEF_INFO( ident, uinameres, helpid, flags )   \
-OPropertyInfoImpl( PROPERTY_##ident, PROPERTY_ID_##ident, \
-   RptResId( RID_STR_##uinameres ), HID_RPT_PROP_##helpid, 
flags )
-
-#define DEF_INFO_1( ident, uinameres, helpid, flag1 ) \
-DEF_INFO( ident, uinameres, helpid, PropUIFlags::flag1 )
-
-#define DEF_INFO_2( ident, uinameres, helpid, flag1, flag2 ) \
-DEF_INFO( ident, uinameres, helpid, PropUIFlags::flag1 | 
PropUIFlags::flag2 )
-
 sal_uInt16  OPropertyInfoService::s_nCount = 0;
 OPropertyInfoImpl*  OPropertyInfoService::s_pPropertyInfos = nullptr;
 
@@ -98,52 +88,50 @@ namespace rptui
 
 static OPropertyInfoImpl aPropertyInfos[] =
 {
-/*
-DEF_INFO_?( propname and id,   resource id, help id,   
flags ),
-*/
- DEF_INFO_1( FORCENEWPAGE,  FORCENEWPAGE,  
 FORCENEWPAGE,   Composeable )
-,DEF_INFO_1( NEWROWORCOL,   NEWROWORCOL,   
 NEWROWORCOL,Composeable )
-,DEF_INFO_1( KEEPTOGETHER,  KEEPTOGETHER,  
 KEEPTOGETHER,   Composeable )
-,DEF_INFO_1( CANGROW,   CANGROW,   
 CANGROW,Composeable )
-,DEF_INFO_1( CANSHRINK, CANSHRINK, 
 CANSHRINK,  Composeable )
-,DEF_INFO_1( REPEATSECTION, REPEATSECTION, 
 REPEATSECTION,  Composeable )
-,DEF_INFO_1( PRINTREPEATEDVALUES,   PRINTREPEATEDVALUES,   
 PRINTREPEATEDVALUES,Composeable )
-,DEF_INFO_1( CONDITIONALPRINTEXPRESSION,
CONDITIONALPRINTEXPRESSION, CONDITIONALPRINTEXPRESSION, Composeable )
-,DEF_INFO_1( STARTNEWCOLUMN,STARTNEWCOLUMN,
 STARTNEWCOLUMN, Composeable )
-,DEF_INFO_1( RESETPAGENUMBER,   RESETPAGENUMBER,   
 RESETPAGENUMBER,Composeable )
-,DEF_INFO_1( PRINTWHENGROUPCHANGE,  PRINTWHENGROUPCHANGE,  
 PRINTWHENGROUPCHANGE,   Composeable )
-,DEF_INFO_1( VISIBLE,   VISIBLE,   
 VISIBLE,Composeable )
-,DEF_INFO_1( GROUPKEEPTOGETHER, GROUPKEEPTOGETHER, 
 GROUPKEEPTOGETHER,  Composeable )
-,DEF_INFO_1( PAGEHEADEROPTION,  PAGEHEADEROPTION,  
 PAGEHEADEROPTION,   Composeable )
-,DEF_INFO_1( PAGEFOOTEROPTION,  PAGEFOOTEROPTION,  
 PAGEFOOTEROPTION,   Composeable )
-,DEF_INFO_1( POSITIONX, POSITIONX, 
 RPT_POSITIONX,  Composeable )
-,DEF_INFO_1( POSITIONY, POSITIONY, 
 RPT_POSITIONY,  Composeable )
-,DEF_INFO_1( WIDTH, WIDTH, 
 RPT_WIDTH,  Composeable )
-,DEF_INFO_1( HEIGHT,HEIGHT,
 RPT_HEIGHT, Composeable )
-,DEF_INFO_1( AUTOGROW,  AUTOGROW,  
 RPT_AUTOGROW,   Composeable )
-,DEF_INFO_1( FONT,  FONT,  
 RPT_FONT,   Composeable )
-,DEF_INFO_1( PREEVALUATED,  PREEVALUATED,  
 PREEVALUATED,   Composeable )
-,DEF_INFO_1( DEEPTRAVERSING,DEEPTRAVERSING,
 DEEPTRAVERSING, Composeable )
-,DEF_INFO_1( FORMULA,   FORMULA,   
 FORMULA,Composeable )
-,DEF_INFO_1( INITIALFORMULA,INITIALFORMULA,
 INITIALFORMULA, Composeable )
-,DEF_INFO_2( TYPE,

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

2021-10-22 Thread Julien Nabet (via logerrit)
 reportdesign/source/filter/xml/xmlExport.cxx |   17 ++---
 1 file changed, 6 insertions(+), 11 deletions(-)

New commits:
commit db43de861f7b5b66993245ab9e7719fdce61caf8
Author: Julien Nabet 
AuthorDate: Fri Oct 22 18:21:13 2021 +0200
Commit: Julien Nabet 
CommitDate: Fri Oct 22 19:17:27 2021 +0200

Revert "Simplify vector initialization in reportdesign"

since it needs 2 allocations instead of one

This reverts commit ac10792ed4ca8d92f60c95ab4acd5b911e42cec7.

Change-Id: I5b07664b7930ae1a04a6f755ddbe5ef56a880f56
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124071
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/reportdesign/source/filter/xml/xmlExport.cxx 
b/reportdesign/source/filter/xml/xmlExport.cxx
index df89720fe7c5..d9a673e81250 100644
--- a/reportdesign/source/filter/xml/xmlExport.cxx
+++ b/reportdesign/source/filter/xml/xmlExport.cxx
@@ -18,7 +18,6 @@
  */
 
 #include 
-#include 
 #include "xmlExport.hxx"
 #include "xmlAutoStyle.hxx"
 #include 
@@ -498,19 +497,15 @@ void ORptExport::exportSectionAutoStyle(const 
Reference& _xProp)
 const sal_Int32 nOffset = 
rptui::getStyleProperty(xReport,PROPERTY_LEFTMARGIN);
 const sal_Int32 nCount  = _xProp->getCount();
 
-::std::vector aColumnPos
-{
-nOffset,
-aSize.Width - 
rptui::getStyleProperty(xReport,PROPERTY_RIGHTMARGIN)
-};
+::std::vector aColumnPos;
 aColumnPos.reserve(2*(nCount + 1));
+aColumnPos.push_back(nOffset);
+aColumnPos.push_back(aSize.Width - 
rptui::getStyleProperty(xReport,PROPERTY_RIGHTMARGIN));
 
-::std::vector aRowPos
-{
-0,
-o3tl::narrowing(_xProp->getHeight())
-};
+::std::vector aRowPos;
 aRowPos.reserve(2*(nCount + 1));
+aRowPos.push_back(0);
+aRowPos.push_back(_xProp->getHeight());
 
 
 ::std::vector aRowPosAutoGrow;


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

2021-06-09 Thread Julien Nabet (via logerrit)
 reportdesign/source/ui/inspection/DataProviderHandler.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 92556e330ede97e11ae2cbc487bb298e6bbcb6bf
Author: Julien Nabet 
AuthorDate: Wed Jun 9 09:18:20 2021 +0200
Commit: Julien Nabet 
CommitDate: Wed Jun 9 10:22:39 2021 +0200

Even more simplification in initializations (reportdesign)

following 
https://cgit.freedesktop.org/libreoffice/core/commit/?id=bd536744ec947090819d59e0f0ec9f2c454aa428
author  Julien Nabet   2021-06-08 22:00:41 +0200
committer   Julien Nabet   2021-06-09 07:43:32 
+0200
commit  bd536744ec947090819d59e0f0ec9f2c454aa428 (patch)
treec970950805e3953e5b7c663fa8095cbd20beb737
parent  96f8ed6619a73655f9c3b94e6a4a3979cc67f551 (diff)
Simplify Sequences initializations (reportdesign)

Thank you Mike!

Change-Id: Ib1dbcb3def89c2060534e30304cd8f35e5486efd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116880
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/reportdesign/source/ui/inspection/DataProviderHandler.cxx 
b/reportdesign/source/ui/inspection/DataProviderHandler.cxx
index ef1c58ada24f..d9665d6883dc 100644
--- a/reportdesign/source/ui/inspection/DataProviderHandler.cxx
+++ b/reportdesign/source/ui/inspection/DataProviderHandler.cxx
@@ -226,8 +226,7 @@ void DataProviderHandler::impl_updateChartTitle_throw(const 
uno::Any& _aValue)
 OUString sStr;
 _aValue >>= sStr;
 xFormatted->setString(sStr);
-uno::Sequence< uno::Reference< chart2::XFormattedString> > aArgs { 
xFormatted };
-xTitle->setText(aArgs);
+xTitle->setText({ xFormatted });
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-06-08 Thread Julien Nabet (via logerrit)
 reportdesign/source/core/api/ReportDefinition.cxx |   13 ++---
 reportdesign/source/core/api/Shape.cxx|6 +-
 reportdesign/source/ui/inspection/DataProviderHandler.cxx |3 +--
 reportdesign/source/ui/inspection/GeometryHandler.cxx |   14 --
 4 files changed, 12 insertions(+), 24 deletions(-)

New commits:
commit bd536744ec947090819d59e0f0ec9f2c454aa428
Author: Julien Nabet 
AuthorDate: Tue Jun 8 22:00:41 2021 +0200
Commit: Julien Nabet 
CommitDate: Wed Jun 9 07:43:32 2021 +0200

Simplify Sequences initializations (reportdesign)

Change-Id: I06f2675ee1270f04c6107761fbfc26a5570cc9c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116866
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/reportdesign/source/core/api/ReportDefinition.cxx 
b/reportdesign/source/core/api/ReportDefinition.cxx
index 2fda942e438b..fd6bf1bb56c1 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -1926,10 +1926,7 @@ void SAL_CALL OReportDefinition::setMimeType( const 
OUString& _mimetype )
 
 uno::Sequence< OUString > SAL_CALL OReportDefinition::getAvailableMimeTypes(  )
 {
-uno::Sequence< OUString > s_aList(2);
-s_aList[0] = MIMETYPE_OASIS_OPENDOCUMENT_TEXT_ASCII;
-s_aList[1] = MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET_ASCII;
-return s_aList;
+return { MIMETYPE_OASIS_OPENDOCUMENT_TEXT_ASCII, 
MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET_ASCII };
 }
 
 // css::XUnoTunnel
@@ -2649,13 +2646,7 @@ uno::Any SAL_CALL OReportDefinition::getTransferData( 
const datatransfer::DataFl
 
 uno::Sequence< datatransfer::DataFlavor > SAL_CALL 
OReportDefinition::getTransferDataFlavors(  )
 {
-uno::Sequence< datatransfer::DataFlavor > aRet(1);
-
-aRet[0] = datatransfer::DataFlavor( "image/png",
-"PNG",
-cppu::UnoType>::get() );
-
-return aRet;
+return { { "image/png", "PNG", cppu::UnoType>::get() } };
 }
 
 sal_Bool SAL_CALL OReportDefinition::isDataFlavorSupported( const 
datatransfer::DataFlavor& aFlavor )
diff --git a/reportdesign/source/core/api/Shape.cxx 
b/reportdesign/source/core/api/Shape.cxx
index 8c37f99afda9..464d7ac46cbc 100644
--- a/reportdesign/source/core/api/Shape.cxx
+++ b/reportdesign/source/core/api/Shape.cxx
@@ -137,11 +137,7 @@ uno::Sequence< OUString > SAL_CALL 
OShape::getSupportedServiceNames(  )
 }
 else
 {
-uno::Sequence< OUString > aServices(2);
-aServices.getArray()[0] = SERVICE_SHAPE;
-aServices.getArray()[1] = m_sServiceName;
-
-return aServices;
+return { SERVICE_SHAPE, m_sServiceName };
 }
 }
 
diff --git a/reportdesign/source/ui/inspection/DataProviderHandler.cxx 
b/reportdesign/source/ui/inspection/DataProviderHandler.cxx
index dd770ff9fd5b..ef1c58ada24f 100644
--- a/reportdesign/source/ui/inspection/DataProviderHandler.cxx
+++ b/reportdesign/source/ui/inspection/DataProviderHandler.cxx
@@ -226,8 +226,7 @@ void DataProviderHandler::impl_updateChartTitle_throw(const 
uno::Any& _aValue)
 OUString sStr;
 _aValue >>= sStr;
 xFormatted->setString(sStr);
-uno::Sequence< uno::Reference< chart2::XFormattedString> > aArgs(1);
-aArgs[0] = xFormatted;
+uno::Sequence< uno::Reference< chart2::XFormattedString> > aArgs { 
xFormatted };
 xTitle->setText(aArgs);
 }
 }
diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx 
b/reportdesign/source/ui/inspection/GeometryHandler.cxx
index 512b6837be30..280e9060e67f 100644
--- a/reportdesign/source/ui/inspection/GeometryHandler.cxx
+++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx
@@ -1354,12 +1354,14 @@ uno::Sequence< OUString > SAL_CALL 
GeometryHandler::getActuatingProperties()
 {
 ::osl::MutexGuard aGuard( m_aMutex );
 
-uno::Sequence< OUString > aSeq(5);
-aSeq[0] = PROPERTY_BACKTRANSPARENT;
-aSeq[1] = PROPERTY_CONTROLBACKGROUNDTRANSPARENT;
-aSeq[2] = PROPERTY_FORMULALIST;
-aSeq[3] = PROPERTY_TYPE;
-aSeq[4] = PROPERTY_DATAFIELD;
+uno::Sequence< OUString > aSeq
+{
+PROPERTY_BACKTRANSPARENT,
+PROPERTY_CONTROLBACKGROUNDTRANSPARENT,
+PROPERTY_FORMULALIST,
+PROPERTY_TYPE,
+PROPERTY_DATAFIELD
+};
 
 return 
::comphelper::concatSequences(m_xFormComponentHandler->getActuatingProperties(),aSeq);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-12 Thread Caolán McNamara (via logerrit)
 reportdesign/source/ui/inc/UITools.hxx  |2 +-
 reportdesign/source/ui/misc/UITools.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 2f8e96ccdc062c76a596e626d2b605f3cc9b539e
Author: Caolán McNamara 
AuthorDate: Fri Mar 12 12:07:46 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Mar 12 17:01:16 2021 +0100

we just use the OutputDevice api for setZoomFactor

Change-Id: Ia72d9a82b266b2172581c757c30bfb80529849c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112389
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/reportdesign/source/ui/inc/UITools.hxx 
b/reportdesign/source/ui/inc/UITools.hxx
index 13aafb14fc90..5fe175440e61 100644
--- a/reportdesign/source/ui/inc/UITools.hxx
+++ b/reportdesign/source/ui/inc/UITools.hxx
@@ -174,7 +174,7 @@ namespace rptui
 @param  _aZoom  the zoom scale
 @param  _rWindowwhere to set the map mode
 */
-void setZoomFactor(const Fraction& _aZoom, vcl::Window& _rWindow);
+void setZoomFactor(const Fraction& _aZoom, OutputDevice& _rWindow);
 }
 #endif // INCLUDED_REPORTDESIGN_SOURCE_UI_INC_UITOOLS_HXX
 
diff --git a/reportdesign/source/ui/misc/UITools.cxx 
b/reportdesign/source/ui/misc/UITools.cxx
index 3a96710a2a5b..92785547d4d3 100644
--- a/reportdesign/source/ui/misc/UITools.cxx
+++ b/reportdesign/source/ui/misc/UITools.cxx
@@ -1020,7 +1020,7 @@ void correctOverlapping(SdrObject* 
_pControl,OReportSection const & _aReportSect
 
rSectionView.InsertObjectAtView(_pControl,*rSectionView.GetSdrPageView(), 
SdrInsertFlags::ADDMARK);
 }
 
-void setZoomFactor(const Fraction& _aZoom, vcl::Window& _rWindow)
+void setZoomFactor(const Fraction& _aZoom, OutputDevice& _rWindow)
 {
 MapMode aMapMode( _rWindow.GetMapMode() );
 aMapMode.SetScaleX(_aZoom);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-02-23 Thread Caolán McNamara (via logerrit)
 reportdesign/source/ui/report/ReportSection.cxx |   10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

New commits:
commit acb442a5ffce156e6af4781643df76d4bebe5df5
Author: Caolán McNamara 
AuthorDate: Tue Feb 23 10:28:23 2021 +
Commit: Caolán McNamara 
CommitDate: Tue Feb 23 14:53:48 2021 +0100

construct XPopupMenu without directly creating a VCLXPopupMenu

Change-Id: If890828855a61cb315939424499949300549a968
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111382
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/reportdesign/source/ui/report/ReportSection.cxx 
b/reportdesign/source/ui/report/ReportSection.cxx
index 45b04485c51e..2e1f294b24d8 100644
--- a/reportdesign/source/ui/report/ReportSection.cxx
+++ b/reportdesign/source/ui/report/ReportSection.cxx
@@ -42,8 +42,8 @@
 #include 
 #include 
 #include 
-#include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -432,7 +432,13 @@ void OReportSection::Command( const CommandEvent& _rCEvt )
 if (!xMenuController.is())
 return;
 
-rtl::Reference xPopupMenu(new VCLXPopupMenu);
+css::uno::Reference xPopupMenu(
+xContext->getServiceManager()->createInstanceWithContext(
+"com.sun.star.awt.PopupMenu", xContext), css::uno::UNO_QUERY);
+
+if (!xPopupMenu.is())
+return;
+
 xMenuController->setPopupMenu(xPopupMenu);
 
 Point aPos = _rCEvt.GetMousePosPixel();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-02-23 Thread Caolán McNamara (via logerrit)
 reportdesign/source/ui/report/ReportSection.cxx |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit c9dda083b401516500afff024ce3f663292db341
Author: Caolán McNamara 
AuthorDate: Tue Feb 23 10:22:56 2021 +
Commit: Caolán McNamara 
CommitDate: Tue Feb 23 12:32:50 2021 +0100

use XPopupMenu::execute to run the menu

instead of cheating and pulling the vcl::Menu out of it

Change-Id: I09292eaf8b3f5e32fc1e27e0020b84606cdf67cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111381
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/reportdesign/source/ui/report/ReportSection.cxx 
b/reportdesign/source/ui/report/ReportSection.cxx
index 690e40e93892..45b04485c51e 100644
--- a/reportdesign/source/ui/report/ReportSection.cxx
+++ b/reportdesign/source/ui/report/ReportSection.cxx
@@ -39,6 +39,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -50,7 +51,6 @@
 #include 
 
 #include 
-#include 
 
 #include 
 #include 
@@ -437,7 +437,10 @@ void OReportSection::Command( const CommandEvent& _rCEvt )
 
 Point aPos = _rCEvt.GetMousePosPixel();
 m_pView->EndAction();
-static_cast(xPopupMenu->GetMenu())->Execute(this, aPos);
+
+xPopupMenu->execute(GetComponentInterface(),
+css::awt::Rectangle(aPos.X(), aPos.Y(), 1, 1),
+css::awt::PopupMenuDirection::EXECUTE_DOWN);
 
 css::uno::Reference xComponent(xMenuController, 
css::uno::UNO_QUERY);
 xComponent->dispose();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-01-16 Thread homeboy445 (via logerrit)
 reportdesign/source/ui/report/DesignView.cxx |1 +
 sc/source/core/data/documen2.cxx |1 +
 2 files changed, 2 insertions(+)

New commits:
commit 5b4486a898968eb5019376ca6c4bd07a97ec537d
Author: homeboy445 
AuthorDate: Thu Jan 7 19:02:57 2021 +0530
Commit: Jan-Marek Glogowski 
CommitDate: Sat Jan 16 12:18:31 2021 +0100

tdf#97087 Give unique, comphrehensible names to idles

Change-Id: I6823486a45311f81f0ed789dedff6c02b8fb3893
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109056
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/reportdesign/source/ui/report/DesignView.cxx 
b/reportdesign/source/ui/report/DesignView.cxx
index e4eb5f653659..6accf6c82559 100644
--- a/reportdesign/source/ui/report/DesignView.cxx
+++ b/reportdesign/source/ui/report/DesignView.cxx
@@ -88,6 +88,7 @@ ODesignView::ODesignView(   vcl::Window* pParent,
 ,m_aScrollWindow(VclPtr::Create(this))
 ,m_pPropWin(nullptr)
 ,m_pCurrentView(nullptr)
+,m_aMarkIdle("reportdesign ODesignView Mark Idle")
 ,m_eMode( DlgEdMode::Select )
 ,m_eActObj( OBJ_NONE )
 ,m_aGridSizeCoarse( 1000, 1000 )// #i93595# 100TH_MM changed to grid 
using coarse 1 cm grid
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index 2e607a669896..56e4fac4d711 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -119,6 +119,7 @@ ScDocument::ScDocument( ScDocumentMode eMode, 
SfxObjectShell* pDocShell ) :
 nUnoObjectId( 0 ),
 nRangeOverflowType( 0 ),
 aCurTextWidthCalcPos(MaxCol(),0,0),
+aTrackIdle("sc ScDocument Track Idle"),
 nFormulaCodeInTree(0),
 nXMLImportedFormulaCount( 0 ),
 nInterpretLevel(0),
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-21 Thread Caolán McNamara (via logerrit)
 reportdesign/source/ui/dlg/GroupsSorting.cxx |   12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)

New commits:
commit 72227d7adcd05056eb6b048edc5bc56f6c29aa29
Author: Caolán McNamara 
AuthorDate: Sun Dec 20 20:41:26 2020 +
Commit: Caolán McNamara 
CommitDate: Mon Dec 21 09:45:50 2020 +0100

weld reportdesign groupsortmenu menu

Change-Id: I933258d60b4792f880cdd757481635f9319e73ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108067
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx 
b/reportdesign/source/ui/dlg/GroupsSorting.cxx
index e79e32357a8d..77adb2664252 100644
--- a/reportdesign/source/ui/dlg/GroupsSorting.cxx
+++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx
@@ -37,7 +37,6 @@
 
 #include 
 #include 
-#include 
 #include 
 #include 
 
@@ -691,10 +690,13 @@ void OFieldExpressionControl::Command(const CommandEvent& 
rEvt)
 bEnable = true;
 nIndex = NextSelectedRow();
 }
-VclBuilder aBuilder(nullptr, AllSettings::GetUIRootDir(), 
"modules/dbreport/ui/groupsortmenu.ui", "");
-VclPtr aContextMenu(aBuilder.get_menu("menu"));
-aContextMenu->EnableItem(aContextMenu->GetItemId("delete"), 
IsDeleteAllowed() && bEnable);
-if (aContextMenu->Execute(this, rEvt.GetMousePosPixel()))
+
+::tools::Rectangle aRect(rEvt.GetMousePosPixel(), Size(1, 1));
+weld::Window* pPopupParent = weld::GetPopupParent(*this, 
aRect);
+std::unique_ptr 
xBuilder(Application::CreateBuilder(pPopupParent, 
"modules/dbreport/ui/groupsortmenu.ui"));
+std::unique_ptr 
xContextMenu(xBuilder->weld_menu("menu"));
+xContextMenu->set_sensitive("delete", IsDeleteAllowed() && 
bEnable);
+if (!xContextMenu->popup_at_rect(pPopupParent, 
aRect).isEmpty())
 {
 if( m_nDeleteEvent )
 Application::RemoveUserEvent( m_nDeleteEvent );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-14 Thread Noel (via logerrit)
 reportdesign/source/filter/xml/xmlCell.cxx|8 +--
 sc/source/filter/xml/XMLTrackedChangesContext.cxx |3 -
 sw/source/filter/xml/xmltbli.cxx  |   47 ++
 xmloff/source/chart/SchXMLTableContext.cxx|5 --
 xmloff/source/table/XMLTableImport.cxx|   10 +---
 5 files changed, 32 insertions(+), 41 deletions(-)

New commits:
commit 1b69f0c2731ec66e76073ab0f2936b7112bf1e77
Author: Noel 
AuthorDate: Mon Dec 14 15:05:37 2020 +0200
Commit: Noel Grandin 
CommitDate: Mon Dec 14 17:46:15 2020 +0100

use more direct parsing on FastAttributeList

instead of first allocating an OUString

Change-Id: I796b1b2d47eb3cb9bebb00ae1bbd465010ebf494
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107691
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/reportdesign/source/filter/xml/xmlCell.cxx 
b/reportdesign/source/filter/xml/xmlCell.cxx
index 27155525ba69..adfac9d59cc6 100644
--- a/reportdesign/source/filter/xml/xmlCell.cxx
+++ b/reportdesign/source/filter/xml/xmlCell.cxx
@@ -62,18 +62,16 @@ OXMLCell::OXMLCell( ORptFilter& rImport
 
 for (auto  : sax_fastparser::castToFastAttributeList( _xAttrList ))
 {
-OUString sValue = aIter.toString();
-
 switch( aIter.getToken() )
 {
 case XML_ELEMENT(TABLE, XML_STYLE_NAME):
-m_sStyleName = sValue;
+m_sStyleName = aIter.toString();
 break;
 case XML_ELEMENT(TABLE, XML_NUMBER_COLUMNS_SPANNED):
-m_pContainer->setColumnSpanned(sValue.toInt32());
+m_pContainer->setColumnSpanned(aIter.toInt32());
 break;
 case XML_ELEMENT(TABLE, XML_NUMBER_ROWS_SPANNED):
-m_pContainer->setRowSpanned(sValue.toInt32());
+m_pContainer->setRowSpanned(aIter.toInt32());
 break;
 default:
 XMLOFF_WARN_UNKNOWN("reportdesign", aIter);
diff --git a/sc/source/filter/xml/XMLTrackedChangesContext.cxx 
b/sc/source/filter/xml/XMLTrackedChangesContext.cxx
index 2accb0987344..d8292c5feecd 100644
--- a/sc/source/filter/xml/XMLTrackedChangesContext.cxx
+++ b/sc/source/filter/xml/XMLTrackedChangesContext.cxx
@@ -666,9 +666,8 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL 
ScXMLChangeTextPContext
 sal_Int32 nRepeat(0);
 for( auto& aIter : sax_fastparser::castToFastAttributeList(mxAttrList) 
)
 {
-const OUString sValue = aIter.toString();
 if (aIter.getToken() == XML_ELEMENT(TEXT, XML_C))
-nRepeat = sValue.toInt32();
+nRepeat = aIter.toInt32();
 else
 XMLOFF_WARN_UNKNOWN("sc", aIter);
 }
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index 77f7ee7f9128..be694b483d00 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -356,15 +356,14 @@ SwXMLTableCellContext_Impl::SwXMLTableCellContext_Impl(
 m_sSaveParaDefault = 
GetImport().GetTextImport()->GetCellParaStyleDefault();
 for( auto& aIter : sax_fastparser::castToFastAttributeList(xAttrList) )
 {
-const OUString sValue = aIter.toString();
 switch( aIter.getToken() )
 {
 case XML_ELEMENT(TABLE, XML_STYLE_NAME):
-m_aStyleName = sValue;
-GetImport().GetTextImport()->SetCellParaStyleDefault(sValue);
+m_aStyleName = aIter.toString();
+GetImport().GetTextImport()->SetCellParaStyleDefault(m_aStyleName);
 break;
 case XML_ELEMENT(TABLE, XML_NUMBER_COLUMNS_SPANNED):
-m_nColSpan = static_cast(std::max(1, 
sValue.toInt32()));
+m_nColSpan = static_cast(std::max(1, 
aIter.toInt32()));
 if (m_nColSpan > 256)
 {
 SAL_INFO("sw.xml", "ignoring huge table:number-columns-spanned 
" << m_nColSpan);
@@ -372,7 +371,7 @@ SwXMLTableCellContext_Impl::SwXMLTableCellContext_Impl(
 }
 break;
 case XML_ELEMENT(TABLE, XML_NUMBER_ROWS_SPANNED):
-m_nRowSpan = static_cast(std::max(1, 
sValue.toInt32()));
+m_nRowSpan = static_cast(std::max(1, 
aIter.toInt32()));
 if (m_nRowSpan > 8192 || (m_nRowSpan > 256 && 
utl::ConfigManager::IsFuzzing()))
 {
 SAL_INFO("sw.xml", "ignoring huge table:number-rows-spanned " 
<< m_nRowSpan);
@@ -380,7 +379,7 @@ SwXMLTableCellContext_Impl::SwXMLTableCellContext_Impl(
 }
 break;
 case XML_ELEMENT(TABLE, XML_NUMBER_COLUMNS_REPEATED):
-m_nColRepeat = static_cast(std::max(1, 
sValue.toInt32()));
+m_nColRepeat = static_cast(std::max(1, 
aIter.toInt32()));
 if (m_nColRepeat > 256)
 {
 SAL_INFO("sw.xml", "ignoring huge 
table:number-columns-repeated " << m_nColRepeat);
@@ -391,14 

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

2020-11-02 Thread Caolán McNamara (via logerrit)
 reportdesign/source/filter/xml/xmlfilter.cxx |   24 
 1 file changed, 8 insertions(+), 16 deletions(-)

New commits:
commit f821939c1d2befafda70a8e8c3ed88748ab75762
Author: Caolán McNamara 
AuthorDate: Mon Nov 2 16:21:29 2020 +
Commit: Caolán McNamara 
CommitDate: Mon Nov 2 20:47:30 2020 +0100

tdf#137916 get report xml importer working again

Change-Id: I238373bdfd35001c09a67b73cc38f5a96640e2ba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105190
Reviewed-by: Noel Grandin 
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins

diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx 
b/reportdesign/source/filter/xml/xmlfilter.cxx
index d3d495d79d0f..487ee306aa16 100644
--- a/reportdesign/source/filter/xml/xmlfilter.cxx
+++ b/reportdesign/source/filter/xml/xmlfilter.cxx
@@ -114,7 +114,7 @@ static ErrCode ReadThroughComponent(
 const uno::Reference& xInputStream,
 const uno::Reference& xModelComponent,
 const uno::Reference & rContext,
-const uno::Reference< XDocumentHandler >& _xFilter )
+const uno::Reference& rFastParser )
 {
 OSL_ENSURE(xInputStream.is(), "input stream missing");
 OSL_ENSURE(xModelComponent.is(), "document missing");
@@ -125,27 +125,18 @@ static ErrCode ReadThroughComponent(
 aParserInput.aInputStream = xInputStream;
 
 // get filter
-SAL_WARN_IF( !_xFilter.is(), "reportdesign", "Can't instantiate filter 
component." );
-if( !_xFilter.is() )
+SAL_WARN_IF( !rFastParser.is(), "reportdesign", "Can't instantiate filter 
component." );
+if( !rFastParser.is() )
 return ErrCode(1);
 
 // connect model and filter
-uno::Reference < XImporter > xImporter( _xFilter, UNO_QUERY );
+uno::Reference < XImporter > xImporter( rFastParser, UNO_QUERY );
 xImporter->setTargetDocument( xModelComponent );
 
 // finally, parser the stream
 try
 {
-uno::Reference < XFastParser > xFastParser( _xFilter, UNO_QUERY );\
-if (xFastParser.is())
-xFastParser->parseStream( aParserInput );
-else
-{
-uno::Reference< XParser > xParser = 
xml::sax::Parser::create(rContext);
-// connect parser and filter
-xParser->setDocumentHandler( _xFilter );
-xParser->parseStream( aParserInput );
-}
+rFastParser->parseStream( aParserInput );
 }
 catch (const SAXParseException&)
 {
@@ -233,7 +224,8 @@ static ErrCode ReadThroughComponent(
 if ( _xProp.is() )
 aFilterCompArgs[ nArgs++ ] <<= _xProp;
 
-Reference< xml::sax::XDocumentHandler > xDocHandler(
+// the underlying SvXMLImport implements XFastParser, XImporter, 
XFastDocumentHandler
+Reference< XFastParser > xFastParser(
 
rxContext->getServiceManager()->createInstanceWithArgumentsAndContext(_sFilterName,
 aFilterCompArgs, rxContext),
 uno::UNO_QUERY_THROW );
 uno::Reference< XInputStream > xInputStream = 
xDocStream->getInputStream();
@@ -241,7 +233,7 @@ static ErrCode ReadThroughComponent(
 return ReadThroughComponent( xInputStream
 ,xModelComponent
 ,rxContext
-,xDocHandler );
+,xFastParser );
 }
 
 // TODO/LATER: better error handling
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-26 Thread Andrea Gelmini (via logerrit)
 reportdesign/source/ui/inc/dlgedfunc.hxx|2 +-
 reportdesign/source/ui/report/dlgedfunc.cxx |6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit dd4863e82b63aa43b607edd5918737718c4c6d5a
Author: Andrea Gelmini 
AuthorDate: Fri Sep 25 11:25:47 2020 +0200
Commit: Julien Nabet 
CommitDate: Sat Sep 26 09:54:20 2020 +0200

Fix typo in code

It passed "make check" on Linux

Change-Id: If5061bcbbeeed134fae784187598ce7ea04280c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103445
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/reportdesign/source/ui/inc/dlgedfunc.hxx 
b/reportdesign/source/ui/inc/dlgedfunc.hxx
index 804b814ee6dc..403f548e0080 100644
--- a/reportdesign/source/ui/inc/dlgedfunc.hxx
+++ b/reportdesign/source/ui/inc/dlgedfunc.hxx
@@ -82,7 +82,7 @@ protected:
 */
 voidactivateOle(SdrObject* _pObj);
 
-void checkTwoCklicks(const MouseEvent& rMEvt);
+void checkTwoClicks(const MouseEvent& rMEvt);
 
 public:
 DlgEdFunc( OReportSection* pParent );
diff --git a/reportdesign/source/ui/report/dlgedfunc.cxx 
b/reportdesign/source/ui/report/dlgedfunc.cxx
index 1753205cdb29..799d9e611155 100644
--- a/reportdesign/source/ui/report/dlgedfunc.cxx
+++ b/reportdesign/source/ui/report/dlgedfunc.cxx
@@ -217,7 +217,7 @@ bool DlgEdFunc::MouseButtonUp( const MouseEvent& /*rMEvt*/ )
 return false;
 }
 
-void DlgEdFunc::checkTwoCklicks(const MouseEvent& rMEvt)
+void DlgEdFunc::checkTwoClicks(const MouseEvent& rMEvt)
 {
 deactivateOle();
 
@@ -723,7 +723,7 @@ bool DlgEdFuncInsert::MouseButtonUp( const MouseEvent& 
rMEvt )
 m_rView.PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt);
 m_rView.MarkObj(aVEvt.pRootObj, pPV);
 }
-checkTwoCklicks(rMEvt);
+checkTwoClicks(rMEvt);
 
m_pParent->getSectionWindow()->getViewsWindow()->getView()->getReportView()->UpdatePropertyBrowserDelayed(m_rView);
 return bReturn;
 }
@@ -832,7 +832,7 @@ bool DlgEdFuncSelect::MouseButtonUp( const MouseEvent& 
rMEvt )
 checkMovementAllowed(rMEvt);
 
 m_pParent->getSectionWindow()->getViewsWindow()->EndAction();
-checkTwoCklicks(rMEvt);
+checkTwoClicks(rMEvt);
 
 m_pParent->SetPointer( m_rView.GetPreferredPointer( aPnt, m_pParent) );
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-26 Thread Andrea Gelmini (via logerrit)
 reportdesign/source/filter/xml/xmlStyleImport.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit de8163cfd10716cba3714cfdc0fa139a52aee669
Author: Andrea Gelmini 
AuthorDate: Fri Sep 25 11:24:28 2020 +0200
Commit: Julien Nabet 
CommitDate: Sat Sep 26 09:49:12 2020 +0200

Fix typo in code

It passed "make check" on Linux

Change-Id: Ic348406fd8b4dfff77687328dfd6824262af9f8a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103424
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/reportdesign/source/filter/xml/xmlStyleImport.cxx 
b/reportdesign/source/filter/xml/xmlStyleImport.cxx
index a6cb71fa3d7a..07c2336349c2 100644
--- a/reportdesign/source/filter/xml/xmlStyleImport.cxx
+++ b/reportdesign/source/filter/xml/xmlStyleImport.cxx
@@ -45,10 +45,10 @@ using namespace xmloff::token;
 
 namespace {
 
-class OSpecialHanldeXMLImportPropertyMapper : public SvXMLImportPropertyMapper
+class OSpecialHandleXMLImportPropertyMapper : public SvXMLImportPropertyMapper
 {
 public:
-OSpecialHanldeXMLImportPropertyMapper(const rtl::Reference< 
XMLPropertySetMapper >& rMapper,SvXMLImport& _rImport) : 
SvXMLImportPropertyMapper(rMapper ,_rImport)
+OSpecialHandleXMLImportPropertyMapper(const rtl::Reference< 
XMLPropertySetMapper >& rMapper,SvXMLImport& _rImport) : 
SvXMLImportPropertyMapper(rMapper ,_rImport)
 {
 }
 /** this method is called for every item that has the 
MID_FLAG_SPECIAL_ITEM_IMPORT flag set */
@@ -189,7 +189,7 @@ rtl::Reference < SvXMLImportPropertyMapper >
 if( !m_xCellImpPropMapper.is() )
 {
 m_xCellImpPropMapper =
-new 
XMLTextImportPropertyMapper/*OSpecialHanldeXMLImportPropertyMapper*/( 
rImport.GetCellStylesPropertySetMapper(), m_rImport );
+new 
XMLTextImportPropertyMapper/*OSpecialHandleXMLImportPropertyMapper*/( 
rImport.GetCellStylesPropertySetMapper(), m_rImport );
 
 
m_xCellImpPropMapper->ChainImportMapper(XMLTextImportHelper::CreateParaExtPropMapper(m_rImport));
 }
@@ -208,7 +208,7 @@ rtl::Reference < SvXMLImportPropertyMapper >
 case XmlStyleFamily::TABLE_ROW:
 {
 if( !m_xRowImpPropMapper.is() )
-m_xRowImpPropMapper =new 
OSpecialHanldeXMLImportPropertyMapper( rImport.GetRowStylesPropertySetMapper(), 
m_rImport );
+m_xRowImpPropMapper =new 
OSpecialHandleXMLImportPropertyMapper( rImport.GetRowStylesPropertySetMapper(), 
m_rImport );
 xMapper = m_xRowImpPropMapper;
 }
  break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-01 Thread Andrea Gelmini (via logerrit)
 reportdesign/source/filter/xml/xmlExport.cxx|6 +++---
 reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx |6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 34aaf2a45e11fef533e0885ccf39731a79a99b91
Author: Andrea Gelmini 
AuthorDate: Mon Aug 31 14:31:17 2020 +0200
Commit: Julien Nabet 
CommitDate: Tue Sep 1 09:24:19 2020 +0200

Fix typo in code

It passed "make check" on Linux

Change-Id: I537cdfbeea47bf3ea679942b43dc381a8c3a59e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101774
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/reportdesign/source/filter/xml/xmlExport.cxx 
b/reportdesign/source/filter/xml/xmlExport.cxx
index 6bae91a3c289..e692bf76724f 100644
--- a/reportdesign/source/filter/xml/xmlExport.cxx
+++ b/reportdesign/source/filter/xml/xmlExport.cxx
@@ -1242,9 +1242,9 @@ void ORptExport::exportReportAttributes(const 
Reference& _xRe
 if ( SvXMLUnitConverter::convertEnum( sValue, _xReport->getCommandType(), 
aXML_CommandTypeEnumMap ) )
 AddAttribute(XML_NAMESPACE_REPORT, 
XML_COMMAND_TYPE,sValue.makeStringAndClear());
 
-OUString sComamnd = _xReport->getCommand();
-if ( !sComamnd.isEmpty() )
-AddAttribute(XML_NAMESPACE_REPORT, XML_COMMAND, sComamnd);
+OUString sCommand = _xReport->getCommand();
+if ( !sCommand.isEmpty() )
+AddAttribute(XML_NAMESPACE_REPORT, XML_COMMAND, sCommand);
 
 OUString sFilter( _xReport->getFilter() );
 if ( !sFilter.isEmpty() )
diff --git a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx 
b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
index 0edf26d7cb78..416e3e1e0974 100644
--- a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
@@ -135,9 +135,9 @@ void SAL_CALL ExportDocumentHandler::startElement(const 
OUString & _sName, const
 {
 
pList->AddAttribute(lcl_createAttribute(XML_NP_RPT,XML_COMMAND_TYPE),sValue.makeStringAndClear());
 }
-const OUString sComamnd = m_xDatabaseDataProvider->getCommand();
-if ( !sComamnd.isEmpty() )
-
pList->AddAttribute(lcl_createAttribute(XML_NP_RPT,XML_COMMAND),sComamnd);
+const OUString sCommand = m_xDatabaseDataProvider->getCommand();
+if ( !sCommand.isEmpty() )
+
pList->AddAttribute(lcl_createAttribute(XML_NP_RPT,XML_COMMAND),sCommand);
 
 const OUString sFilter( m_xDatabaseDataProvider->getFilter() );
 if ( !sFilter.isEmpty() )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-01 Thread Andrea Gelmini (via logerrit)
 reportdesign/source/filter/xml/xmlExport.cxx|4 ++--
 reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx |4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 053ed44d0ddd071fa6894d6c05667bf796ad653f
Author: Andrea Gelmini 
AuthorDate: Mon Aug 31 14:30:03 2020 +0200
Commit: Julien Nabet 
CommitDate: Tue Sep 1 09:23:49 2020 +0200

Fix typo in code

It passed "make check" on Linux

Change-Id: I26db93c5a2aa8c11fa0334c19b413552f421c4f8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101773
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/reportdesign/source/filter/xml/xmlExport.cxx 
b/reportdesign/source/filter/xml/xmlExport.cxx
index 47b2dc6e3f29..6bae91a3c289 100644
--- a/reportdesign/source/filter/xml/xmlExport.cxx
+++ b/reportdesign/source/filter/xml/xmlExport.cxx
@@ -1238,8 +1238,8 @@ void ORptExport::exportReportAttributes(const 
Reference& _xRe
 return;
 
 OUStringBuffer sValue;
-const SvXMLEnumMapEntry* aXML_CommnadTypeEnumMap = 
OXMLHelper::GetCommandTypeOptions();
-if ( SvXMLUnitConverter::convertEnum( sValue, _xReport->getCommandType(), 
aXML_CommnadTypeEnumMap ) )
+const SvXMLEnumMapEntry* aXML_CommandTypeEnumMap = 
OXMLHelper::GetCommandTypeOptions();
+if ( SvXMLUnitConverter::convertEnum( sValue, _xReport->getCommandType(), 
aXML_CommandTypeEnumMap ) )
 AddAttribute(XML_NAMESPACE_REPORT, 
XML_COMMAND_TYPE,sValue.makeStringAndClear());
 
 OUString sComamnd = _xReport->getCommand();
diff --git a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx 
b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
index 5e02ded4d7b9..0edf26d7cb78 100644
--- a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
@@ -125,13 +125,13 @@ void SAL_CALL ExportDocumentHandler::startElement(const 
OUString & _sName, const
 SvXMLAttributeList* pList = new SvXMLAttributeList();
 uno::Reference< xml::sax::XAttributeList > xNewAttribs = pList;
 OUStringBuffer sValue;
-static const SvXMLEnumMapEntry aXML_CommnadTypeEnumMap[] =
+static const SvXMLEnumMapEntry aXML_CommandTypeEnumMap[] =
 {
 { XML_TABLE, sdb::CommandType::TABLE },
 { XML_QUERY, sdb::CommandType::QUERY },
 { XML_TOKEN_INVALID, 0 }
 };
-if ( SvXMLUnitConverter::convertEnum( sValue, 
static_cast(m_xDatabaseDataProvider->getCommandType()),aXML_CommnadTypeEnumMap
 ) )
+if ( SvXMLUnitConverter::convertEnum( sValue, 
static_cast(m_xDatabaseDataProvider->getCommandType()),aXML_CommandTypeEnumMap
 ) )
 {
 
pList->AddAttribute(lcl_createAttribute(XML_NP_RPT,XML_COMMAND_TYPE),sValue.makeStringAndClear());
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-08-29 Thread Andrea Gelmini (via logerrit)
 reportdesign/source/filter/xml/xmlExport.cxx |6 +++---
 reportdesign/source/filter/xml/xmlExport.hxx |2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit e0e217f3c10235adee056dac367916335c94b5bd
Author: Andrea Gelmini 
AuthorDate: Fri Aug 28 14:48:19 2020 +0200
Commit: Noel Grandin 
CommitDate: Sat Aug 29 11:42:03 2020 +0200

Fix typo in code

It passed "make check" on Linux

Change-Id: If8332bfaff7af36c83b402581f4c42b576b6eb39
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101626
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/reportdesign/source/filter/xml/xmlExport.cxx 
b/reportdesign/source/filter/xml/xmlExport.cxx
index a7b0cef80aaf..47b2dc6e3f29 100644
--- a/reportdesign/source/filter/xml/xmlExport.cxx
+++ b/reportdesign/source/filter/xml/xmlExport.cxx
@@ -308,14 +308,14 @@ void ORptExport::exportFunction(const uno::Reference< 
XFunction>& _xFunction)
 SvXMLElementExport aFunction(*this,XML_NAMESPACE_REPORT, XML_FUNCTION, 
true, true);
 }
 
-void ORptExport::exportMasterDetailFields(const Reference& 
_xReportComponet)
+void ORptExport::exportMasterDetailFields(const Reference& 
_xReportComponent)
 {
-const uno::Sequence< OUString> aMasterFields = 
_xReportComponet->getMasterFields();
+const uno::Sequence< OUString> aMasterFields = 
_xReportComponent->getMasterFields();
 if ( !aMasterFields.hasElements() )
 return;
 
 SvXMLElementExport aElement(*this,XML_NAMESPACE_REPORT, 
XML_MASTER_DETAIL_FIELDS, true, true);
-const uno::Sequence< OUString> aDetailFields = 
_xReportComponet->getDetailFields();
+const uno::Sequence< OUString> aDetailFields = 
_xReportComponent->getDetailFields();
 
 OSL_ENSURE(aDetailFields.getLength() == aMasterFields.getLength(),"not 
equal length for master and detail fields!");
 
diff --git a/reportdesign/source/filter/xml/xmlExport.hxx 
b/reportdesign/source/filter/xml/xmlExport.hxx
index 348bb75a2b9c..f82d85aa7e11 100644
--- a/reportdesign/source/filter/xml/xmlExport.hxx
+++ b/reportdesign/source/filter/xml/xmlExport.hxx
@@ -106,7 +106,7 @@ private:
 voidexportReportAttributes(const 
Reference& _xReport);
 voidexportFunctions(const Reference& 
_xFunctions); /// 
 voidexportFunction(const Reference< XFunction>& 
_xFunction);
-voidexportMasterDetailFields(const 
Reference& _xReportComponet);
+voidexportMasterDetailFields(const 
Reference& _xReportComponent);
 voidexportComponent(const Reference& 
_xReportComponent);
 voidexportGroup(const Reference& 
_xReportDefinition,sal_Int32 _nPos,bool _bExportAutoStyle = false);
 voidexportStyleName(XPropertySet* 
_xProp,SvXMLAttributeList& _rAtt,const OUString& _sName);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-07-01 Thread Stephan Bergmann (via logerrit)
 reportdesign/source/core/misc/reportformula.cxx   |4 ++--
 reportdesign/source/filter/xml/xmlStyleImport.cxx |8 
 2 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 70246cf9c6fc36ae2f669eb349b795de2543968a
Author: Stephan Bergmann 
AuthorDate: Wed Jul 1 16:44:40 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Jul 1 19:51:12 2020 +0200

Upcoming improved loplugin:staticanonymous -> redundantstatic: reportdesign

Change-Id: Ia5047d90b14e886f5ba8de805462ca9b946ad65a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97635
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/reportdesign/source/core/misc/reportformula.cxx 
b/reportdesign/source/core/misc/reportformula.cxx
index b035493e6e42..5cd19dc4d55c 100644
--- a/reportdesign/source/core/misc/reportformula.cxx
+++ b/reportdesign/source/core/misc/reportformula.cxx
@@ -27,8 +27,8 @@ namespace rptui
 namespace
 {
 
-static const char sExpressionPrefix[] = "rpt:";
-static const char sFieldPrefix[] =  "field:";
+const char sExpressionPrefix[] = "rpt:";
+const char sFieldPrefix[] =  "field:";
 }
 
 
diff --git a/reportdesign/source/filter/xml/xmlStyleImport.cxx 
b/reportdesign/source/filter/xml/xmlStyleImport.cxx
index edb20e072bfc..6d8148311ccc 100644
--- a/reportdesign/source/filter/xml/xmlStyleImport.cxx
+++ b/reportdesign/source/filter/xml/xmlStyleImport.cxx
@@ -143,10 +143,10 @@ void OControlStyleContext::SetAttribute( sal_uInt16 
nPrefixKey,
 }
 
 
-static const OUStringLiteral g_sTableStyleFamilyName( 
XML_STYLE_FAMILY_TABLE_TABLE_STYLES_NAME );
-static const OUStringLiteral g_sColumnStyleFamilyName( 
XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_NAME );
-static const OUStringLiteral g_sRowStyleFamilyName( 
XML_STYLE_FAMILY_TABLE_ROW_STYLES_NAME );
-static const OUStringLiteral g_sCellStyleFamilyName( 
XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME );
+const OUStringLiteral g_sTableStyleFamilyName( 
XML_STYLE_FAMILY_TABLE_TABLE_STYLES_NAME );
+const OUStringLiteral g_sColumnStyleFamilyName( 
XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_NAME );
+const OUStringLiteral g_sRowStyleFamilyName( 
XML_STYLE_FAMILY_TABLE_ROW_STYLES_NAME );
+const OUStringLiteral g_sCellStyleFamilyName( 
XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME );
 
 OReportStylesContext::OReportStylesContext( ORptFilter& rImport,
 const bool bTempAutoStyles ) :
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-06-26 Thread Stephan Bergmann (via logerrit)
 reportdesign/source/filter/xml/xmlExport.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 26d24bcb0c27b96575719b33eca3217169198881
Author: Stephan Bergmann 
AuthorDate: Fri Jun 26 11:24:11 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Jun 26 12:50:22 2020 +0200

Upcoming improved loplugin:elidestringvar: reportdesign

Change-Id: I252db93acdf471062fe2a66bc49c732e2e7c5415
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97201
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/reportdesign/source/filter/xml/xmlExport.cxx 
b/reportdesign/source/filter/xml/xmlExport.cxx
index fa04c4baa46c..0151bad80865 100644
--- a/reportdesign/source/filter/xml/xmlExport.cxx
+++ b/reportdesign/source/filter/xml/xmlExport.cxx
@@ -278,9 +278,8 @@ ORptExport::ORptExport(const Reference< XComponentContext 
>& _rxContext, OUStrin
 m_xParaPropMapper = new OSpecialHandleXMLExportPropertyMapper( 
xPropMapper);
 
 const OUString& sFamily( GetXMLToken(XML_PARAGRAPH) );
-OUString aPrefix( 'P');
 GetAutoStylePool()->AddFamily( XmlStyleFamily::TEXT_PARAGRAPH, sFamily,
-  m_xParaPropMapper, aPrefix );
+  m_xParaPropMapper, "P" );
 
 GetAutoStylePool()->AddFamily(XmlStyleFamily::TABLE_CELL, 
XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME,
 m_xCellStylesExportPropertySetMapper, 
XML_STYLE_FAMILY_TABLE_CELL_STYLES_PREFIX);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-06-04 Thread Stephan Bergmann (via logerrit)
 reportdesign/source/core/sdr/RptObject.cxx |3 +--
 reportdesign/source/ui/report/ReportController.cxx |6 ++
 reportdesign/source/ui/report/propbrw.cxx  |3 +--
 3 files changed, 4 insertions(+), 8 deletions(-)

New commits:
commit 6f5943bb23853e65a93503c498bc30b57d9ec15f
Author: Stephan Bergmann 
AuthorDate: Thu Jun 4 15:13:03 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Jun 4 19:49:59 2020 +0200

Upcoming loplugin:elidestringvar: reportdesign

Change-Id: I60637ad6c50aee618af48689885d44eca8eabcb5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95523
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/reportdesign/source/core/sdr/RptObject.cxx 
b/reportdesign/source/core/sdr/RptObject.cxx
index 623758dcf788..df0062753b6f 100644
--- a/reportdesign/source/core/sdr/RptObject.cxx
+++ b/reportdesign/source/core/sdr/RptObject.cxx
@@ -615,8 +615,7 @@ void OUnoObject::impl_initializeModel_nothrow()
 if ( xFormatted.is() )
 {
 const Reference< XPropertySet > xModelProps( GetUnoControlModel(), 
UNO_QUERY_THROW );
-const OUString sTreatAsNumberProperty = "TreatAsNumber";
-xModelProps->setPropertyValue( sTreatAsNumberProperty, makeAny( 
false ) );
+xModelProps->setPropertyValue( "TreatAsNumber", makeAny( false ) );
 xModelProps->setPropertyValue( 
PROPERTY_VERTICALALIGN,m_xReportComponent->getPropertyValue(PROPERTY_VERTICALALIGN));
 }
 }
diff --git a/reportdesign/source/ui/report/ReportController.cxx 
b/reportdesign/source/ui/report/ReportController.cxx
index 3bf9e9e072f7..087724e5f851 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -2821,8 +2821,7 @@ Reference OReportController::getXFrame()
 m_xFrameLoader.set( frame::Desktop::create(m_xContext) );
 }
 const sal_Int32 nFrameSearchFlag = frame::FrameSearchFlag::TASKS | 
frame::FrameSearchFlag::CREATE;
-const OUString sTarget("_blank");
-Reference xFrame = 
m_xFrameLoader->findFrame(sTarget,nFrameSearchFlag);
+Reference xFrame = 
m_xFrameLoader->findFrame("_blank",nFrameSearchFlag);
 return xFrame;
 }
 
@@ -3989,13 +3988,12 @@ void OReportController::checkChartEnabled()
 return;
 
 m_bChartEnabledAsked = true;
-const OUString sConfigName( "/org.openoffice.Office.ReportDesign" );
 const OUString sPropertyName( "UserData/Chart" );
 
 try
 {
 ::utl::OConfigurationTreeRoot aConfiguration(
-::utl::OConfigurationTreeRoot::createWithComponentContext( 
m_xContext, sConfigName ) );
+::utl::OConfigurationTreeRoot::createWithComponentContext( 
m_xContext, "/org.openoffice.Office.ReportDesign" ) );
 
 bool bChartEnabled = false;
 if ( aConfiguration.hasByHierarchicalName(sPropertyName) )
diff --git a/reportdesign/source/ui/report/propbrw.cxx 
b/reportdesign/source/ui/report/propbrw.cxx
index edc4e78e665a..8afd92cc5979 100644
--- a/reportdesign/source/ui/report/propbrw.cxx
+++ b/reportdesign/source/ui/report/propbrw.cxx
@@ -135,8 +135,7 @@ PropBrw::PropBrw(const Reference< XComponentContext >& 
_xORB, vcl::Window* pPare
 m_xBrowserController = 
inspection::ObjectInspector::createWithModel(m_xInspectorContext, 
xInspectorModel);
 if ( !m_xBrowserController.is() )
 {
-const OUString sServiceName( 
"com.sun.star.inspection.ObjectInspector" );
-ShowServiceNotAvailableError(pParent ? pParent->GetFrameWeld() 
: nullptr, sServiceName, true);
+ShowServiceNotAvailableError(pParent ? pParent->GetFrameWeld() 
: nullptr, "com.sun.star.inspection.ObjectInspector", true);
 }
 else
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-04-15 Thread Noel Grandin (via logerrit)
 reportdesign/source/core/api/ReportDefinition.cxx  |7 ---
 reportdesign/source/ui/misc/UITools.cxx|   12 
 reportdesign/source/ui/report/ReportController.cxx |   12 
 reportdesign/source/ui/report/dlgedfunc.cxx|6 --
 4 files changed, 24 insertions(+), 13 deletions(-)

New commits:
commit cf3cd2d064fe83190eef997e3069d1c35afca0b1
Author: Noel Grandin 
AuthorDate: Wed Apr 15 09:13:14 2020 +0200
Commit: Noel Grandin 
CommitDate: Wed Apr 15 11:24:38 2020 +0200

loplugin:buriedassign in reportdesign

Change-Id: I1caeeb8e0a6f02f1dd37f7399702af1b2a400b28
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92242
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/reportdesign/source/core/api/ReportDefinition.cxx 
b/reportdesign/source/core/api/ReportDefinition.cxx
index 900fbd88c18d..fe91c466c337 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -1173,10 +1173,11 @@ void SAL_CALL OReportDefinition::connectController( 
const uno::Reference< frame:
 ::osl::MutexGuard aGuard(m_aMutex);
 ::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed);
 m_pImpl->m_aControllers.push_back(_xController);
-sal_Int32 nCount;
-if ( _xController.is() && m_pImpl->m_xViewData.is() && ( nCount = 
m_pImpl->m_xViewData->getCount()) != 0)
+if ( _xController.is() && m_pImpl->m_xViewData.is() )
 {
-_xController->restoreViewData(m_pImpl->m_xViewData->getByIndex(nCount 
- 1));
+sal_Int32 nCount = m_pImpl->m_xViewData->getCount();
+if (nCount)
+
_xController->restoreViewData(m_pImpl->m_xViewData->getByIndex(nCount - 1));
 }
 }
 
diff --git a/reportdesign/source/ui/misc/UITools.cxx 
b/reportdesign/source/ui/misc/UITools.cxx
index 2361f0d8cb1d..1d9cdd4c31a8 100644
--- a/reportdesign/source/ui/misc/UITools.cxx
+++ b/reportdesign/source/ui/misc/UITools.cxx
@@ -903,10 +903,12 @@ SdrObject* isOver(const tools::Rectangle& _rRect, SdrPage 
const & _rPage, SdrVie
 {
 SdrObject* pOverlappedObj = nullptr;
 SdrObjListIter aIter(&_rPage,SdrIterMode::DeepNoGroups);
-SdrObject* pObjIter = nullptr;
 
-while( !pOverlappedObj && (pObjIter = aIter.Next()) != nullptr )
+while( !pOverlappedObj )
 {
+SdrObject* pObjIter = aIter.Next();
+if( !pObjIter )
+break;
 if ( _pIgnore != pObjIter
 && (_bAllObjects || !_rView.IsObjMarked(pObjIter))
 && (dynamic_cast(pObjIter) != nullptr || 
dynamic_cast(pObjIter) != nullptr))
@@ -944,10 +946,12 @@ SdrObject* isOver(const tools::Rectangle& _rRect,SdrPage 
const & _rPage,SdrView
 {
 SdrObject* pOverlappedObj = nullptr;
 SdrObjListIter aIter(&_rPage,SdrIterMode::DeepNoGroups);
-SdrObject* pObjIter = nullptr;
 
-while( !pOverlappedObj && (pObjIter = aIter.Next()) != nullptr )
+while( !pOverlappedObj )
 {
+SdrObject* pObjIter = aIter.Next();
+if( !pObjIter )
+break;
 if (checkArrayForOccurrence(pObjIter, _pIgnoreList, 
_nIgnoreListLength))
 {
 continue;
diff --git a/reportdesign/source/ui/report/ReportController.cxx 
b/reportdesign/source/ui/report/ReportController.cxx
index ee1e90d4cf83..bf61da78c8d2 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -1189,16 +1189,20 @@ void OReportController::Execute(sal_uInt16 _nId, const 
Sequence< PropertyValue >
 
executeMethodWithUndo(RID_STR_UNDO_REMOVE_SELECTION,::std::mem_fn(::Delete));
 break;
 case SID_GRID_USE:
-getDesignView()->setGridSnap(m_bGridUse = !m_bGridUse);
+m_bGridUse = !m_bGridUse;
+getDesignView()->setGridSnap(m_bGridUse);
 break;
 case SID_HELPLINES_MOVE:
-getDesignView()->setDragStripes(m_bHelplinesMove = 
!m_bHelplinesMove);
+m_bHelplinesMove = !m_bHelplinesMove;
+getDesignView()->setDragStripes(m_bHelplinesMove);
 break;
 case SID_GRID_VISIBLE:
-getDesignView()->toggleGrid(m_bGridVisible = !m_bGridVisible);
+m_bGridVisible = !m_bGridVisible;
+getDesignView()->toggleGrid(m_bGridVisible);
 break;
 case SID_RULER:
-getDesignView()->showRuler(m_bShowRuler = !m_bShowRuler);
+m_bShowRuler = !m_bShowRuler;
+getDesignView()->showRuler(m_bShowRuler);
 break;
 case SID_OBJECT_SELECT:
 getDesignView()->SetMode(DlgEdMode::Select);
diff --git a/reportdesign/source/ui/report/dlgedfunc.cxx 
b/reportdesign/source/ui/report/dlgedfunc.cxx
index a7f82f7c5bb8..3eaa42d6ab5b 100644
--- a/reportdesign/source/ui/report/dlgedfunc.cxx
+++ b/reportdesign/source/ui/report/dlgedfunc.cxx
@@ -568,10 +568,12 @@ bool DlgEdFunc::isRectangleHit(const 

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

2020-04-07 Thread Noel Grandin (via logerrit)
 reportdesign/source/filter/xml/xmlfilter.cxx|2 --
 reportdesign/source/ui/report/ReportSection.cxx |2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)

New commits:
commit 97ac4de1e3a41a346e19aa3ca3a4e05594073ae7
Author: Noel Grandin 
AuthorDate: Tue Apr 7 08:49:44 2020 +0200
Commit: Noel Grandin 
CommitDate: Tue Apr 7 10:03:19 2020 +0200

loplugin:unusedvariableplus in reportdesign

Change-Id: Ie8568f524a1f804e07890ee7828a81f1752fcfd0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91793
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx 
b/reportdesign/source/filter/xml/xmlfilter.cxx
index 8f493a9c8532..ddd4a6a28dad 100644
--- a/reportdesign/source/filter/xml/xmlfilter.cxx
+++ b/reportdesign/source/filter/xml/xmlfilter.cxx
@@ -423,8 +423,6 @@ bool ORptFilter::implImport( const Sequence< PropertyValue 
>& rDescriptor )
 
 if ( !sFileName.isEmpty() )
 {
-uno::Reference xCom = GetModel();
-
 tools::SvRef pMedium = new SfxMedium(
 sFileName, ( StreamMode::READ | StreamMode::NOCREATE ) );
 
diff --git a/reportdesign/source/ui/report/ReportSection.cxx 
b/reportdesign/source/ui/report/ReportSection.cxx
index 689f0a0c67f3..7482b51925b7 100644
--- a/reportdesign/source/ui/report/ReportSection.cxx
+++ b/reportdesign/source/ui/report/ReportSection.cxx
@@ -126,9 +126,9 @@ void OReportSection::dispose()
 m_pFunc.reset();
 
 {
-::std::unique_ptr aTemp( m_pView);
 if ( m_pView )
 m_pView->EndListening( *m_pModel );
+delete m_pView;
 m_pView = nullptr;
 }
 m_pParent.clear();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-04-02 Thread Noel Grandin (via logerrit)
 reportdesign/source/core/api/Section.cxx|   32 
 reportdesign/source/core/sdr/PropertyForward.cxx|   92 +-
 reportdesign/source/core/sdr/RptObject.cxx  |  222 ++---
 reportdesign/source/core/sdr/UndoActions.cxx|  122 +-
 reportdesign/source/filter/xml/xmlAutoStyle.cxx |   36 
 reportdesign/source/filter/xml/xmlColumn.cxx|   76 -
 reportdesign/source/filter/xml/xmlControlProperty.cxx   |   22 
 reportdesign/source/filter/xml/xmlExport.cxx|  494 +--
 reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx |   20 
 reportdesign/source/filter/xml/xmlFixedContent.cxx  |   46 -
 reportdesign/source/filter/xml/xmlHelper.cxx|  112 +-
 reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx |   66 -
 reportdesign/source/filter/xml/xmlSubDocument.cxx   |   63 -
 reportdesign/source/ui/dlg/AddField.cxx |   92 +-
 reportdesign/source/ui/dlg/CondFormat.cxx   |   22 
 reportdesign/source/ui/dlg/Condition.cxx|   44 
 reportdesign/source/ui/dlg/GroupsSorting.cxx|  238 ++---
 reportdesign/source/ui/dlg/Navigator.cxx|   56 -
 reportdesign/source/ui/inspection/DataProviderHandler.cxx   |   34 
 reportdesign/source/ui/inspection/GeometryHandler.cxx   |  146 +--
 reportdesign/source/ui/misc/RptUndo.cxx |   86 -
 reportdesign/source/ui/misc/statusbarcontroller.cxx |   94 +-
 reportdesign/source/ui/report/DesignView.cxx|   30 
 reportdesign/source/ui/report/ReportController.cxx  |  531 +---
 reportdesign/source/ui/report/ReportControllerObserver.cxx  |   48 -
 reportdesign/source/ui/report/ReportSection.cxx |  316 +++
 reportdesign/source/ui/report/ReportWindow.cxx  |   50 -
 reportdesign/source/ui/report/SectionView.cxx   |   52 -
 reportdesign/source/ui/report/StartMarker.cxx   |   30 
 reportdesign/source/ui/report/ViewsWindow.cxx   |   42 
 reportdesign/source/ui/report/dlgedfunc.cxx |  102 +-
 reportdesign/source/ui/report/propbrw.cxx   |   30 
 32 files changed, 1722 insertions(+), 1724 deletions(-)

New commits:
commit ff7e960701ccacbd62bd2251f26561eeba8ebe8a
Author: Noel Grandin 
AuthorDate: Thu Apr 2 12:06:45 2020 +0200
Commit: Noel Grandin 
CommitDate: Thu Apr 2 20:07:00 2020 +0200

loplugin:flatten in reportdesign

Change-Id: I6d8b2730cede4453e7afd581cc24ed101ca6c81b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91557
Tested-by: Noel Grandin 
Reviewed-by: Noel Grandin 

diff --git a/reportdesign/source/core/api/Section.cxx 
b/reportdesign/source/core/api/Section.cxx
index 6aa10a6acaa2..761ed63e5c67 100644
--- a/reportdesign/source/core/api/Section.cxx
+++ b/reportdesign/source/core/api/Section.cxx
@@ -194,22 +194,22 @@ void OSection::init()
 uno::Reference< report::XReportDefinition> xReport = getReportDefinition();
 std::shared_ptr pModel = 
OReportDefinition::getSdrModel(xReport);
 assert(pModel && "No model set at the report definition!");
-if ( pModel )
-{
-uno::Reference const xSection(this);
-SdrPage & rSdrPage(*pModel->createNewPage(xSection));
-m_xDrawPage.set(rSdrPage.getUnoPage(), uno::UNO_QUERY_THROW);
-m_xDrawPage_ShapeGrouper.set(m_xDrawPage, uno::UNO_QUERY_THROW);
-// apparently we may also get OReportDrawPage which doesn't support 
this
-m_xDrawPage_FormSupplier.set(m_xDrawPage, uno::UNO_QUERY);
-m_xDrawPage_Tunnel.set(m_xDrawPage, uno::UNO_QUERY_THROW);
-// fdo#53872: now also exchange the XDrawPage in the SdrPage so that
-// rSdrPage.getUnoPage returns this
-rSdrPage.SetUnoPage(this);
-// createNewPage _should_ have stored away 2 uno::References to this,
-// so our ref count cannot be 1 here, so this isn't destroyed here
-assert(m_refCount > 1);
-}
+if ( !pModel )
+return;
+
+uno::Reference const xSection(this);
+SdrPage & rSdrPage(*pModel->createNewPage(xSection));
+m_xDrawPage.set(rSdrPage.getUnoPage(), uno::UNO_QUERY_THROW);
+m_xDrawPage_ShapeGrouper.set(m_xDrawPage, uno::UNO_QUERY_THROW);
+// apparently we may also get OReportDrawPage which doesn't support this
+m_xDrawPage_FormSupplier.set(m_xDrawPage, uno::UNO_QUERY);
+m_xDrawPage_Tunnel.set(m_xDrawPage, uno::UNO_QUERY_THROW);
+// fdo#53872: now also exchange the XDrawPage in the SdrPage so that
+// rSdrPage.getUnoPage returns this
+rSdrPage.SetUnoPage(this);
+// createNewPage _should_ have stored away 2 uno::References to this,
+// so our ref count cannot be 1 here, so this isn't destroyed here
+assert(m_refCount > 1);
 }
 
 // XSection
diff --git a/reportdesign/source/core/sdr/PropertyForward.cxx 

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

2020-03-09 Thread Noel Grandin (via logerrit)
 reportdesign/source/filter/xml/xmlCondPrtExpr.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit cb5fc86005a85af06d8ad0bf1ac7aab7649c0048
Author: Noel Grandin 
AuthorDate: Sun Mar 8 21:31:12 2020 +0200
Commit: Noel Grandin 
CommitDate: Mon Mar 9 10:11:30 2020 +0100

tdf#130878 improvement to previous fix

which does not cause tons of extra pages to show up

Change-Id: Ia80d66de2056d78d8cecd2814239951d0de97018
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90193
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/reportdesign/source/filter/xml/xmlCondPrtExpr.cxx 
b/reportdesign/source/filter/xml/xmlCondPrtExpr.cxx
index 4c8132d30636..63c7649bcb52 100644
--- a/reportdesign/source/filter/xml/xmlCondPrtExpr.cxx
+++ b/reportdesign/source/filter/xml/xmlCondPrtExpr.cxx
@@ -80,7 +80,8 @@ void OXMLCondPrtExpr::characters( const OUString& rChars )
 
 void OXMLCondPrtExpr::endFastElement( sal_Int32 )
 {
-
m_xComponent->setPropertyValue(PROPERTY_CONDITIONALPRINTEXPRESSION,makeAny(m_aCharBuffer.makeStringAndClear()));
+if (m_aCharBuffer.getLength())
+
m_xComponent->setPropertyValue(PROPERTY_CONDITIONALPRINTEXPRESSION,makeAny(m_aCharBuffer.makeStringAndClear()));
 }
 
 } // namespace rptxml
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-03-04 Thread Noel Grandin (via logerrit)
 reportdesign/source/filter/xml/xmlStyleImport.cxx |9 --
 reportdesign/source/filter/xml/xmlStyleImport.hxx |6 -
 reportdesign/source/filter/xml/xmlfilter.cxx  |   73 +++---
 reportdesign/source/filter/xml/xmlfilter.hxx  |4 -
 4 files changed, 16 insertions(+), 76 deletions(-)

New commits:
commit baef7c68ddd62197fad3ff420a0fbb48bee1d7ef
Author: Noel Grandin 
AuthorDate: Wed Mar 4 14:18:08 2020 +0200
Commit: Noel Grandin 
CommitDate: Wed Mar 4 17:01:33 2020 +0100

use FastParser in OReportStylesContext

Change-Id: I7894d862f2b2fa3206d81682dcbe17474a24d120
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89967
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/reportdesign/source/filter/xml/xmlStyleImport.cxx 
b/reportdesign/source/filter/xml/xmlStyleImport.cxx
index 0d8ad1e260a5..ae6b578ee0b0 100644
--- a/reportdesign/source/filter/xml/xmlStyleImport.cxx
+++ b/reportdesign/source/filter/xml/xmlStyleImport.cxx
@@ -150,11 +150,8 @@ static const OUStringLiteral g_sRowStyleFamilyName( 
XML_STYLE_FAMILY_TABLE_ROW_S
 static const OUStringLiteral g_sCellStyleFamilyName( 
XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME );
 
 OReportStylesContext::OReportStylesContext( ORptFilter& rImport,
-sal_uInt16 nPrfx ,
-const OUString& rLName ,
-const Reference< XAttributeList > & xAttrList,
 const bool bTempAutoStyles ) :
-SvXMLStylesContext( rImport, nPrfx, rLName, xAttrList ),
+SvXMLStylesContext( rImport ),
 m_rImport(rImport),
 m_nNumberFormatIndex(-1),
 bAutoStyles(bTempAutoStyles)
@@ -169,9 +166,9 @@ OReportStylesContext::~OReportStylesContext()
 }
 
 
-void OReportStylesContext::EndElement()
+void OReportStylesContext::endFastElement(sal_Int32 nElement)
 {
-SvXMLStylesContext::EndElement();
+SvXMLStylesContext::endFastElement(nElement);
 if (bAutoStyles)
 GetImport().GetTextImport()->SetAutoStyles( this );
 else
diff --git a/reportdesign/source/filter/xml/xmlStyleImport.hxx 
b/reportdesign/source/filter/xml/xmlStyleImport.hxx
index 8b8cf3781e92..2a120bfcfa9f 100644
--- a/reportdesign/source/filter/xml/xmlStyleImport.hxx
+++ b/reportdesign/source/filter/xml/xmlStyleImport.hxx
@@ -108,13 +108,11 @@ namespace rptxml
 public:
 
 
-OReportStylesContext( ORptFilter& rImport, sal_uInt16 nPrfx ,
-const OUString& rLName ,
-const css::uno::Reference< css::xml::sax::XAttributeList > & 
xAttrList,
+OReportStylesContext( ORptFilter& rImport,
 const bool bAutoStyles );
 virtual ~OReportStylesContext() override;
 
-virtual void EndElement() override;
+virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
 
 virtual rtl::Reference < SvXMLImportPropertyMapper > 
GetImportPropertyMapper(
 XmlStyleFamily nFamily ) const override;
diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx 
b/reportdesign/source/filter/xml/xmlfilter.cxx
index b9d6827620b7..8f493a9c8532 100644
--- a/reportdesign/source/filter/xml/xmlfilter.cxx
+++ b/reportdesign/source/filter/xml/xmlfilter.cxx
@@ -631,33 +631,16 @@ public:
 return pStyleContext;
 }
 break;
-}
-return nullptr;
-}
-
-virtual SvXMLImportContextRef CreateChildContext(sal_uInt16 const nPrefix,
-const OUString& rLocalName,
-const uno::Reference & xAttrList) override
-{
-SvXMLImportContext *pContext = nullptr;
-
-ORptFilter & rImport(static_cast(GetImport()));
-const SvXMLTokenMap& rTokenMap = rImport.GetDocContentElemTokenMap();
-switch (rTokenMap.Get(nPrefix, rLocalName))
-{
-case XML_TOK_CONTENT_STYLES:
+case XML_ELEMENT(OFFICE, XML_STYLES):
 rImport.GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP );
-pContext = rImport.CreateStylesContext(rLocalName, xAttrList, 
false);
+return rImport.CreateStylesContext(false);
 break;
-case XML_TOK_CONTENT_AUTOSTYLES:
+case XML_ELEMENT(OFFICE, XML_AUTOMATIC_STYLES):
 // don't use the autostyles from the styles-document for the 
progress
-pContext = rImport.CreateStylesContext(rLocalName, xAttrList, 
true);
-break;
-default:
+return rImport.CreateStylesContext(true);
 break;
 }
-
-return pContext;
+return nullptr;
 }
 };
 
@@ -711,29 +694,12 @@ public:
 rImport.GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP );
 return rImport.CreateFontDeclsContext();
 break;
-}
-return nullptr;
-}
-
-virtual SvXMLImportContextRef CreateChildContext(sal_uInt16 const nPrefix,
-const OUString& rLocalName,
-const uno::Reference & 

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

2020-02-07 Thread Mehmet Emin Başoğlu (via logerrit)
 reportdesign/source/core/sdr/RptObject.cxx |   11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)

New commits:
commit 91a3411bb74ad81663a4204f4547c523a1237f7b
Author: Mehmet Emin Başoğlu 
AuthorDate: Mon Jan 27 11:44:37 2020 +0300
Commit: Stephan Bergmann 
CommitDate: Fri Feb 7 13:34:45 2020 +0100

tdf#54938: Adapt supportsService implementations to cppu::supportsService

Change-Id: I5484047a8b0e87d012ca3a37466b9ebf718257b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87494
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/reportdesign/source/core/sdr/RptObject.cxx 
b/reportdesign/source/core/sdr/RptObject.cxx
index 64399bd9117c..ab478828dd7d 100644
--- a/reportdesign/source/core/sdr/RptObject.cxx
+++ b/reportdesign/source/core/sdr/RptObject.cxx
@@ -425,14 +425,13 @@ void OObjectBase::_propertyChange( const  
beans::PropertyChangeEvent& /*evt*/ )
 
 bool OObjectBase::supportsService( const OUString& _sServiceName ) const
 {
-bool bSupports = false;
-
+// TODO: cache xServiceInfo as member?
 Reference< lang::XServiceInfo > xServiceInfo( m_xReportComponent , 
UNO_QUERY );
-// TODO: cache xServiceInfo as member?
-if ( xServiceInfo.is() )
-bSupports = xServiceInfo->supportsService( _sServiceName );
 
-return bSupports;
+if ( xServiceInfo.is() )
+return cppu::supportsService(xServiceInfo.get(), _sServiceName);
+else
+return false;
 }
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-01-26 Thread Stephan Bergmann (via logerrit)
 reportdesign/source/ui/report/ReportSection.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 32922b3f1fc47415b40a701345a76a33e2d69a64
Author: Stephan Bergmann 
AuthorDate: Sun Jan 26 15:15:23 2020 +0100
Commit: Stephan Bergmann 
CommitDate: Sun Jan 26 19:39:22 2020 +0100

iAvoid explicit casts to smaller sal_uInt32 from larger long

...in what might be attempts to avoid warnings about signed vs. unsigned
comparisons.

Change-Id: I0e689d8b730170f35107cbdf46c3d8cd9a593367
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87456
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/reportdesign/source/ui/report/ReportSection.cxx 
b/reportdesign/source/ui/report/ReportSection.cxx
index 84236084c00d..7991fea3f1b5 100644
--- a/reportdesign/source/ui/report/ReportSection.cxx
+++ b/reportdesign/source/ui/report/ReportSection.cxx
@@ -276,7 +276,7 @@ void OReportSection::Paste(const uno::Sequence< 
beans::NamedValue >& _aAllreadyC
 }
 m_pView->AddUndo( 
m_pView->GetModel()->GetSdrUndoFactory().CreateUndoNewObject( *pNewObj ) );
 m_pView->MarkObj( pNewObj, 
m_pView->GetSdrPageView() );
-if ( m_xSection.is() && 
(static_cast(aRet.getHeight() + aRet.Top()) > 
m_xSection->getHeight()) )
+if ( m_xSection.is() && 
(o3tl::make_unsigned(aRet.getHeight() + aRet.Top()) > m_xSection->getHeight()) )
 m_xSection->setHeight(aRet.getHeight() + 
aRet.Top());
 }
 }
@@ -540,7 +540,7 @@ void 
OReportSection::impl_adjustObjectSizePosition(sal_Int32 i_nPaperWidth,sal_I
 tools::Rectangle 
aRet(VCLPoint(xReportComponent->getPosition()),VCLSize(xReportComponent->getSize()));
 aRet.setHeight(aRet.getHeight() + 1);
 aRet.setWidth(aRet.getWidth() + 1);
-if ( m_xSection.is() && 
(static_cast(aRet.getHeight() + aRet.Top()) > 
m_xSection->getHeight()) )
+if ( m_xSection.is() && 
(o3tl::make_unsigned(aRet.getHeight() + aRet.Top()) > m_xSection->getHeight()) )
 m_xSection->setHeight(aRet.getHeight() + aRet.Top());
 
 pObject->RecalcBoundRect();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-01-22 Thread Noel Grandin (via logerrit)
 reportdesign/source/filter/xml/xmlfilter.cxx |   26 ++
 1 file changed, 10 insertions(+), 16 deletions(-)

New commits:
commit e4ba4e56eff11bf914819b19f427e30d6acd1ac0
Author: Noel Grandin 
AuthorDate: Wed Jan 22 10:14:46 2020 +0200
Commit: Noel Grandin 
CommitDate: Wed Jan 22 10:45:56 2020 +0100

use fastparser in RptMLMasterStylesContext_Impl

Change-Id: If66ee8d6441fea0a2bb9c6b8a956ecd94f025746
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87177
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx 
b/reportdesign/source/filter/xml/xmlfilter.cxx
index 46ed887f092c..3897a5200b5f 100644
--- a/reportdesign/source/filter/xml/xmlfilter.cxx
+++ b/reportdesign/source/filter/xml/xmlfilter.cxx
@@ -93,10 +93,7 @@ class RptMLMasterStylesContext_Impl:
 public:
 
 
-RptMLMasterStylesContext_Impl(
-ORptFilter& rImport, sal_uInt16 nPrfx,
-const OUString& rLName ,
-const uno::Reference< xml::sax::XAttributeList > & xAttrList );
+RptMLMasterStylesContext_Impl( ORptFilter& rImport );
 
 RptMLMasterStylesContext_Impl(const RptMLMasterStylesContext_Impl&) = 
delete;
 RptMLMasterStylesContext_Impl& operator=(const 
RptMLMasterStylesContext_Impl&) = delete;
@@ -105,11 +102,8 @@ public:
 
 }
 
-RptMLMasterStylesContext_Impl::RptMLMasterStylesContext_Impl(
-ORptFilter& rImport, sal_uInt16 nPrfx,
-const OUString& rLName ,
-const uno::Reference< xml::sax::XAttributeList > & xAttrList ) :
-XMLTextMasterStylesContext( rImport, nPrfx, rLName, xAttrList )
+RptMLMasterStylesContext_Impl::RptMLMasterStylesContext_Impl( ORptFilter& 
rImport ) :
+XMLTextMasterStylesContext( rImport )
 {
 }
 
@@ -630,6 +624,13 @@ public:
 rImport.GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP );
 return rImport.CreateFontDeclsContext();
 break;
+case XML_ELEMENT(OFFICE, XML_MASTER_STYLES):
+{
+SvXMLStylesContext* pStyleContext = new 
RptMLMasterStylesContext_Impl(rImport);
+rImport.SetMasterStyles(pStyleContext);
+return pStyleContext;
+}
+break;
 }
 return nullptr;
 }
@@ -652,13 +653,6 @@ public:
 // don't use the autostyles from the styles-document for the 
progress
 pContext = rImport.CreateStylesContext(rLocalName, xAttrList, 
true);
 break;
-case XML_TOK_CONTENT_MASTERSTYLES:
-{
-SvXMLStylesContext* pStyleContext = new 
RptMLMasterStylesContext_Impl(rImport, nPrefix, rLocalName, 
xAttrList);//CreateMasterStylesContext( rLocalName,xAttrList );
-pContext = pStyleContext;
-rImport.SetMasterStyles(pStyleContext);
-}
-break;
 default:
 break;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-01-19 Thread Noel Grandin (via logerrit)
 reportdesign/source/filter/xml/xmlfilter.cxx |   96 ---
 reportdesign/source/filter/xml/xmlfilter.hxx |5 -
 2 files changed, 43 insertions(+), 58 deletions(-)

New commits:
commit fc1f85127968d1c2e0a53dace51bf8a78f9e6ca5
Author: Noel Grandin 
AuthorDate: Sun Jan 19 21:09:42 2020 +0200
Commit: Noel Grandin 
CommitDate: Mon Jan 20 07:09:20 2020 +0100

use more FastParser in ORptFilter

Change-Id: I517a26a3ea64d86a1f494e3b9ea52ee28604e0b9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87046
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx 
b/reportdesign/source/filter/xml/xmlfilter.cxx
index 69d4251fc337..d6cedca1f54a 100644
--- a/reportdesign/source/filter/xml/xmlfilter.cxx
+++ b/reportdesign/source/filter/xml/xmlfilter.cxx
@@ -590,13 +590,20 @@ namespace {
 class RptXMLDocumentSettingsContext : public SvXMLImportContext
 {
 public:
-RptXMLDocumentSettingsContext(SvXMLImport & rImport,
-   sal_uInt16 const nPrefix,
-   const OUString& rLocalName)
-: SvXMLImportContext(rImport, nPrefix, rLocalName)
+RptXMLDocumentSettingsContext(SvXMLImport & rImport)
+: SvXMLImportContext(rImport)
 {
 }
 
+virtual void SAL_CALL startFastElement( sal_Int32 /*nElement*/,
+const css::uno::Reference< css::xml::sax::XFastAttributeList 
>& ) override {}
+
+virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL 
createFastChildContext(
+sal_Int32 /*nElement*/, const css::uno::Reference< 
css::xml::sax::XFastAttributeList >& /*xAttrList*/ ) override
+{
+return nullptr;
+}
+
 virtual SvXMLImportContextRef CreateChildContext(sal_uInt16 const nPrefix,
const OUString& rLocalName,
const uno::Reference & xAttrList) override
@@ -612,13 +619,20 @@ public:
 class RptXMLDocumentStylesContext : public SvXMLImportContext
 {
 public:
-RptXMLDocumentStylesContext(SvXMLImport & rImport,
-sal_uInt16 const nPrefix,
-const OUString& rLocalName)
-: SvXMLImportContext(rImport, nPrefix, rLocalName)
+RptXMLDocumentStylesContext(SvXMLImport & rImport)
+: SvXMLImportContext(rImport)
 {
 }
 
+virtual void SAL_CALL startFastElement( sal_Int32 /*nElement*/,
+const css::uno::Reference< css::xml::sax::XFastAttributeList 
>& ) override {}
+
+virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL 
createFastChildContext(
+sal_Int32 /*nElement*/, const css::uno::Reference< 
css::xml::sax::XFastAttributeList >& /*xAttrList*/ ) override
+{
+return nullptr;
+}
+
 virtual SvXMLImportContextRef CreateChildContext(sal_uInt16 const nPrefix,
 const OUString& rLocalName,
 const uno::Reference & xAttrList) override
@@ -687,13 +701,20 @@ namespace {
 class RptXMLDocumentContentContext : public SvXMLImportContext
 {
 public:
-RptXMLDocumentContentContext(SvXMLImport & rImport,
-sal_uInt16 const nPrefix,
-const OUString& rLocalName)
-: SvXMLImportContext(rImport, nPrefix, rLocalName)
+RptXMLDocumentContentContext(SvXMLImport & rImport)
+: SvXMLImportContext(rImport)
 {
 }
 
+virtual void SAL_CALL startFastElement( sal_Int32 /*nElement*/,
+const css::uno::Reference< css::xml::sax::XFastAttributeList 
>& ) override {}
+
+virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL 
createFastChildContext(
+sal_Int32 /*nElement*/, const css::uno::Reference< 
css::xml::sax::XFastAttributeList >& /*xAttrList*/ ) override
+{
+return nullptr;
+}
+
 virtual SvXMLImportContextRef CreateChildContext(sal_uInt16 const nPrefix,
 const OUString& rLocalName,
 const uno::Reference & xAttrList) override
@@ -725,30 +746,6 @@ public:
 
 }
 
-SvXMLImportContext* ORptFilter::CreateDocumentContext( sal_uInt16 nPrefix,
-  const OUString& rLocalName,
-  const uno::Reference< 
xml::sax::XAttributeList >& /*xAttrList*/ )
-{
-SvXMLImportContext *pContext = nullptr;
-
-const SvXMLTokenMap& rTokenMap = GetDocElemTokenMap();
-switch( rTokenMap.Get( nPrefix, rLocalName ) )
-{
-case XML_TOK_DOC_SETTINGS:
-GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP );
-pContext = new RptXMLDocumentSettingsContext(*this, nPrefix, 
rLocalName);
-break;
-case XML_TOK_DOC_STYLES:
-pContext = new RptXMLDocumentStylesContext(*this, nPrefix, 
rLocalName);
-break;
-case XML_TOK_DOC_CONTENT:
-pContext = new RptXMLDocumentContentContext(*this, nPrefix, 
rLocalName);
-break;
-}
-
-return pContext;
-}
-
 SvXMLImportContext *ORptFilter::CreateFastContext( sal_Int32 nElement,
   

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

2020-01-16 Thread Caolán McNamara (via logerrit)
 reportdesign/source/ui/inc/ScrollHelper.hxx |1 -
 sd/source/ui/dlg/PaneChildWindows.cxx   |1 -
 sfx2/source/sidebar/Deck.cxx|1 -
 3 files changed, 3 deletions(-)

New commits:
commit e3f70972d2f93ac87ca281ad8655d0f2c13f1f96
Author: Caolán McNamara 
AuthorDate: Thu Jan 16 11:55:26 2020 +
Commit: Caolán McNamara 
CommitDate: Thu Jan 16 13:54:59 2020 +0100

remove some unneeded includes

Change-Id: I993ed47c6b4a43f6293bdf5c2803599d75337bb1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86918
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/reportdesign/source/ui/inc/ScrollHelper.hxx 
b/reportdesign/source/ui/inc/ScrollHelper.hxx
index 119a1764bd4c..a42cd269aa98 100644
--- a/reportdesign/source/ui/inc/ScrollHelper.hxx
+++ b/reportdesign/source/ui/inc/ScrollHelper.hxx
@@ -27,7 +27,6 @@
 #include 
 #include 
 #include 
-#include 
 #include "MarkedSection.hxx"
 #include "ReportWindow.hxx"
 
diff --git a/sd/source/ui/dlg/PaneChildWindows.cxx 
b/sd/source/ui/dlg/PaneChildWindows.cxx
index b44e128823bf..a40acd367d6c 100644
--- a/sd/source/ui/dlg/PaneChildWindows.cxx
+++ b/sd/source/ui/dlg/PaneChildWindows.cxx
@@ -25,7 +25,6 @@
 #include 
 #include 
 
-#include 
 #include 
 #include 
 
diff --git a/sfx2/source/sidebar/Deck.cxx b/sfx2/source/sidebar/Deck.cxx
index 345460a03cbd..1f23749e3d4a 100644
--- a/sfx2/source/sidebar/Deck.cxx
+++ b/sfx2/source/sidebar/Deck.cxx
@@ -32,7 +32,6 @@
 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-01-13 Thread Noel Grandin (via logerrit)
 reportdesign/source/filter/xml/xmlfilter.cxx |   25 +++--
 1 file changed, 15 insertions(+), 10 deletions(-)

New commits:
commit 7ae61449ccbeaf6a0b2aa8e81aad394b18565943
Author: Noel Grandin 
AuthorDate: Mon Jan 13 19:08:39 2020 +0200
Commit: Noel Grandin 
CommitDate: Tue Jan 14 07:10:37 2020 +0100

use FastParser in reportdesign

Change-Id: Ib012e7c814184eaeaab57200107e8bf4887058f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86707
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx 
b/reportdesign/source/filter/xml/xmlfilter.cxx
index 2a510dee12af..917dd5209411 100644
--- a/reportdesign/source/filter/xml/xmlfilter.cxx
+++ b/reportdesign/source/filter/xml/xmlfilter.cxx
@@ -130,21 +130,15 @@ static ErrCode ReadThroughComponent(
 OSL_ENSURE(xModelComponent.is(), "document missing");
 OSL_ENSURE(rContext.is(), "factory missing");
 
-// prepare ParserInputSrouce
+// prepare Parser InputSource
 InputSource aParserInput;
 aParserInput.aInputStream = xInputStream;
 
-// get parser
-uno::Reference< XParser > xParser = xml::sax::Parser::create(rContext);
-SAL_INFO( "reportdesign", "parser created" );
 // get filter
-OSL_ENSURE( _xFilter.is(), "Can't instantiate filter component." );
+SAL_WARN_IF( !_xFilter.is(), "reportdesign", "Can't instantiate filter 
component." );
 if( !_xFilter.is() )
 return ErrCode(1);
 
-// connect parser and filter
-xParser->setDocumentHandler( _xFilter );
-
 // connect model and filter
 uno::Reference < XImporter > xImporter( _xFilter, UNO_QUERY );
 xImporter->setTargetDocument( xModelComponent );
@@ -152,11 +146,20 @@ static ErrCode ReadThroughComponent(
 // finally, parser the stream
 try
 {
-xParser->parseStream( aParserInput );
+uno::Reference < XFastParser > xFastParser( _xFilter, UNO_QUERY );\
+if (xFastParser.is())
+xFastParser->parseStream( aParserInput );
+else
+{
+uno::Reference< XParser > xParser = 
xml::sax::Parser::create(rContext);
+// connect parser and filter
+xParser->setDocumentHandler( _xFilter );
+xParser->parseStream( aParserInput );
+}
 }
 catch (const SAXParseException&)
 {
-TOOLS_WARN_EXCEPTION( "reportdesign", "SAX parse exception caught 
while importing");
+TOOLS_WARN_EXCEPTION( "reportdesign", "");
 return ErrCode(1);
 }
 catch (const SAXException&)
@@ -169,10 +172,12 @@ static ErrCode ReadThroughComponent(
 }
 catch (const IOException&)
 {
+TOOLS_WARN_EXCEPTION( "reportdesign", "");
 return ErrCode(1);
 }
 catch (const Exception&)
 {
+TOOLS_WARN_EXCEPTION( "reportdesign", "");
 return ErrCode(1);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-01-07 Thread Andrea Gelmini (via logerrit)
 reportdesign/source/ui/inc/DesignView.hxx  |4 ++--
 reportdesign/source/ui/inc/ReportWindow.hxx|4 ++--
 reportdesign/source/ui/inc/ScrollHelper.hxx|4 ++--
 reportdesign/source/ui/inc/ViewsWindow.hxx |4 ++--
 reportdesign/source/ui/report/DesignView.cxx   |4 ++--
 reportdesign/source/ui/report/ReportWindow.cxx |4 ++--
 reportdesign/source/ui/report/ScrollHelper.cxx |4 ++--
 reportdesign/source/ui/report/ViewsWindow.cxx  |4 ++--
 8 files changed, 16 insertions(+), 16 deletions(-)

New commits:
commit 416eef52da04708c727b8824e96ee1398fcf8e92
Author: Andrea Gelmini 
AuthorDate: Fri Jan 3 22:06:49 2020 +0100
Commit: Julien Nabet 
CommitDate: Tue Jan 7 16:27:42 2020 +0100

Fix typo in code

Change-Id: I768c5ae5a4c2c0b2f50a8eb541a5c7397c355345
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86206
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/reportdesign/source/ui/inc/DesignView.hxx 
b/reportdesign/source/ui/inc/DesignView.hxx
index 7b78d7327cf4..7b904b22db11 100644
--- a/reportdesign/source/ui/inc/DesignView.hxx
+++ b/reportdesign/source/ui/inc/DesignView.hxx
@@ -214,9 +214,9 @@ namespace rptui
 
 /** collapse all sections given by their position
 *
-* \param _aCollpasedSections The position of the sections which should 
be collapsed.
+* \param _aCollapsedSections The position of the sections which should 
be collapsed.
 */
-void collapseSections(const css::uno::Sequence< 
css::beans::PropertyValue>& _aCollpasedSections);
+void collapseSections(const css::uno::Sequence< 
css::beans::PropertyValue>& _aCollapsedSections);
 
 OUString  getCurrentPage() const;
 void setCurrentPage(const OUString& _sLastActivePage);
diff --git a/reportdesign/source/ui/inc/ReportWindow.hxx 
b/reportdesign/source/ui/inc/ReportWindow.hxx
index 99fc3aae3a47..1c42e10575d2 100644
--- a/reportdesign/source/ui/inc/ReportWindow.hxx
+++ b/reportdesign/source/ui/inc/ReportWindow.hxx
@@ -191,9 +191,9 @@ namespace rptui
 
 /** collapse all sections given by their position
 *
-* \param _aCollpasedSections The position of the sections which should 
be collapsed.
+* \param _aCollapsedSections The position of the sections which should 
be collapsed.
 */
-void collapseSections(const css::uno::Sequence< 
css::beans::PropertyValue>& _aCollpasedSections);
+void collapseSections(const css::uno::Sequence< 
css::beans::PropertyValue>& _aCollapsedSections);
 
 /** align all marked objects in all sections
 */
diff --git a/reportdesign/source/ui/inc/ScrollHelper.hxx 
b/reportdesign/source/ui/inc/ScrollHelper.hxx
index 22a3d428c967..119a1764bd4c 100644
--- a/reportdesign/source/ui/inc/ScrollHelper.hxx
+++ b/reportdesign/source/ui/inc/ScrollHelper.hxx
@@ -183,9 +183,9 @@ namespace rptui
 
 /** collapse all sections given by their position
 *
-* \param _aCollpasedSections The position of the sections which should 
be collapsed.
+* \param _aCollapsedSections The position of the sections which should 
be collapsed.
 */
-void collapseSections(const css::uno::Sequence< 
css::beans::PropertyValue>& _aCollpasedSections);
+void collapseSections(const css::uno::Sequence< 
css::beans::PropertyValue>& _aCollapsedSections);
 
 /** align all marked objects in all sections
 */
diff --git a/reportdesign/source/ui/inc/ViewsWindow.hxx 
b/reportdesign/source/ui/inc/ViewsWindow.hxx
index e019e79e8332..d668df78ab4f 100644
--- a/reportdesign/source/ui/inc/ViewsWindow.hxx
+++ b/reportdesign/source/ui/inc/ViewsWindow.hxx
@@ -276,9 +276,9 @@ namespace rptui
 
 /** collapse all sections given by their position
 *
-* \param _aCollpasedSections The position of the sections which should 
be collapsed.
+* \param _aCollapsedSections The position of the sections which should 
be collapsed.
 */
-void collapseSections(const css::uno::Sequence< 
css::beans::PropertyValue>& _aCollpasedSections);
+void collapseSections(const css::uno::Sequence< 
css::beans::PropertyValue>& _aCollapsedSections);
 
 /** zoom the ruler and view windows
 */
diff --git a/reportdesign/source/ui/report/DesignView.cxx 
b/reportdesign/source/ui/report/DesignView.cxx
index e20ce6663e15..0f54a3203e6f 100644
--- a/reportdesign/source/ui/report/DesignView.cxx
+++ b/reportdesign/source/ui/report/DesignView.cxx
@@ -563,9 +563,9 @@ void 
ODesignView::fillCollapsedSections(::std::vector& _rCollapsedPo
 m_aScrollWindow->fillCollapsedSections(_rCollapsedPositions);
 }
 
-void ODesignView::collapseSections(const uno::Sequence< beans::PropertyValue>& 
_aCollpasedSections)
+void ODesignView::collapseSections(const uno::Sequence< beans::PropertyValue>& 
_aCollapsedSections)
 {
-m_aScrollWindow->collapseSections(_aCollpasedSections);
+  

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

2020-01-07 Thread Andrea Gelmini (via logerrit)
 reportdesign/source/filter/xml/xmlHelper.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 13cd47a9769800a4b04f65af1649d6126bbd8969
Author: Andrea Gelmini 
AuthorDate: Fri Jan 3 21:14:31 2020 +0100
Commit: Julien Nabet 
CommitDate: Tue Jan 7 16:26:12 2020 +0100

Fix typo in code

Change-Id: I1ba1b2e1f0568ee3874d171fe33686968e21a484
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86205
Reviewed-by: Julien Nabet 
Tested-by: Jenkins

diff --git a/reportdesign/source/filter/xml/xmlHelper.cxx 
b/reportdesign/source/filter/xml/xmlHelper.cxx
index 714b1db2460f..9aee4a698f94 100644
--- a/reportdesign/source/filter/xml/xmlHelper.cxx
+++ b/reportdesign/source/filter/xml/xmlHelper.cxx
@@ -52,7 +52,7 @@
 #include 
 #include 
 
-#define XML_RPT_ALGINMENT   (XML_DB_TYPES_START+1)
+#define XML_RPT_ALIGNMENT   (XML_DB_TYPES_START+1)
 namespace rptxml
 {
 using namespace ::xmloff::token;
@@ -77,7 +77,7 @@ const XMLPropertyHandler* 
OPropertyHandlerFactory::GetPropertyHandler(sal_Int32
 
 switch(nType)
 {
-case XML_RPT_ALGINMENT:
+case XML_RPT_ALIGNMENT:
 {
 static SvXMLEnumMapEntry const 
pXML_VerticalAlign_Enum[] =
 {
@@ -120,7 +120,7 @@ rtl::Reference < XMLPropertySetMapper > 
OXMLHelper::GetCellStylePropertyMap(bool
 
 MAP_CONST_C_ASCII(  PROPERTY_CONTROLBACKGROUND,
 FO,   BACKGROUND_COLOR, 
XML_TYPE_COLORTRANSPARENT|MID_FLAG_MULTI_PROPERTY, 0 ),
-MAP_CONST_C_ASCII(  PROPERTY_VERTICALALIGN,   STYLE,
VERTICAL_ALIGN,   XML_RPT_ALGINMENT, 0 ),
+MAP_CONST_C_ASCII(  PROPERTY_VERTICALALIGN,   STYLE,
VERTICAL_ALIGN,   XML_RPT_ALIGNMENT, 0 ),
 MAP_CONST_C_ASCII(  PROPERTY_CONTROLBACKGROUNDTRANSPARENT,
 FO,   BACKGROUND_COLOR, 
XML_TYPE_ISTRANSPARENT|MID_FLAG_MERGE_ATTRIBUTE, 0 ),
 MAP_CONST_P_ASCII(  PROPERTY_CONTROLBACKGROUND,
@@ -146,7 +146,7 @@ rtl::Reference < XMLPropertySetMapper > 
OXMLHelper::GetCellStylePropertyMap(bool
 MAP_CONST_C_ASCII(  PROPERTY_CONTROLBACKGROUNDTRANSPARENT,
 FO,   BACKGROUND_COLOR, 
XML_TYPE_ISTRANSPARENT|MID_FLAG_MERGE_ATTRIBUTE, 0 ),
 MAP_CONST_C_ASCII(  PROPERTY_VERTICALALIGN,
-STYLE,VERTICAL_ALIGN,  
 XML_RPT_ALGINMENT, 0 ),
+STYLE,VERTICAL_ALIGN,  
 XML_RPT_ALIGNMENT, 0 ),
 MAP_CONST_C_ASCII(  "BorderLeft",   FO, BORDER_LEFT,   
XML_TYPE_BORDER, 0 ),
 MAP_CONST_C_ASCII(  "BorderRight",  FO, BORDER_RIGHT,  
XML_TYPE_BORDER, 0 ),
 MAP_CONST_C_ASCII(  "BorderTop",FO, BORDER_TOP,
XML_TYPE_BORDER, 0 ),
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2019-12-20 Thread Noel Grandin (via logerrit)
 reportdesign/source/filter/xml/xmlExport.hxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 627d757f8d912833cb2b62432e2d3c488e4f553b
Author: Noel Grandin 
AuthorDate: Wed Dec 18 14:19:16 2019 +0200
Commit: Noel Grandin 
CommitDate: Fri Dec 20 13:54:04 2019 +0100

loplugin:duplicate-defines

already in reportdesign/source/filter/xml/xmlEnums.hxx

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

diff --git a/reportdesign/source/filter/xml/xmlExport.hxx 
b/reportdesign/source/filter/xml/xmlExport.hxx
index 97355c888158..f45b8e65171d 100644
--- a/reportdesign/source/filter/xml/xmlExport.hxx
+++ b/reportdesign/source/filter/xml/xmlExport.hxx
@@ -57,8 +57,6 @@ using namespace css::io;
 using namespace css::xml::sax;
 
 
-#define PROGRESS_BAR_STEP 20
-
 class ORptExport : public SvXMLExport
 {
 public:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2019-12-11 Thread Andrea Gelmini (via logerrit)
 reportdesign/source/ui/misc/UITools.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 6212190403404d72846c82458c77d91286b910c2
Author: Andrea Gelmini 
AuthorDate: Wed Dec 11 08:43:57 2019 +0100
Commit: Julien Nabet 
CommitDate: Wed Dec 11 14:39:53 2019 +0100

Removed duplicated include

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

diff --git a/reportdesign/source/ui/misc/UITools.cxx 
b/reportdesign/source/ui/misc/UITools.cxx
index b752425b6e94..bf4d9a98d9f5 100644
--- a/reportdesign/source/ui/misc/UITools.cxx
+++ b/reportdesign/source/ui/misc/UITools.cxx
@@ -120,7 +120,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2019-12-10 Thread Jim Raykowski (via logerrit)
 reportdesign/source/ui/dlg/dlgpage.cxx  |7 -
 reportdesign/source/ui/misc/UITools.cxx |  152 +---
 reportdesign/uiconfig/dbreport/ui/chardialog.ui |2 
 3 files changed, 113 insertions(+), 48 deletions(-)

New commits:
commit 48e8c03710a540341a0d901273c42acfe0189498
Author: Jim Raykowski 
AuthorDate: Tue Dec 4 12:02:28 2018 -0900
Commit: Mike Kaganski 
CommitDate: Wed Dec 11 08:22:34 2019 +0100

tdf#105225 Use new background tab page in Base:Report Builder

Section Setup, Page Setup, and Character Settings dialogs

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

diff --git a/reportdesign/source/ui/dlg/dlgpage.cxx 
b/reportdesign/source/ui/dlg/dlgpage.cxx
index dd2c5f32b2e1..9a8d3710dba0 100644
--- a/reportdesign/source/ui/dlg/dlgpage.cxx
+++ b/reportdesign/source/ui/dlg/dlgpage.cxx
@@ -46,12 +46,12 @@ ORptPageDialog::ORptPageDialog(weld::Window* pParent, const 
SfxItemSet* pAttr, c
 
 if (rDialog == "BackgroundDialog")
 {
-AddTabPage("background", pFact->GetTabPageCreatorFunc( 
RID_SVXPAGE_BACKGROUND ), nullptr );
+AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BKG 
), nullptr );
 }
 else if (rDialog == "PageDialog")
 {
 AddTabPage("page", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PAGE ), 
nullptr );
-AddTabPage("background", pFact->GetTabPageCreatorFunc( 
RID_SVXPAGE_BACKGROUND ), nullptr );
+AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BKG 
), nullptr );
 }
 else if (rDialog == "CharDialog")
 {
@@ -59,7 +59,7 @@ ORptPageDialog::ORptPageDialog(weld::Window* pParent, const 
SfxItemSet* pAttr, c
 AddTabPage("fonteffects", pFact->GetTabPageCreatorFunc( 
RID_SVXPAGE_CHAR_EFFECTS ), nullptr );
 AddTabPage("position", pFact->GetTabPageCreatorFunc( 
RID_SVXPAGE_CHAR_POSITION ), nullptr );
 AddTabPage("asianlayout", pFact->GetTabPageCreatorFunc( 
RID_SVXPAGE_CHAR_TWOLINES ), nullptr );
-AddTabPage("background", pFact->GetTabPageCreatorFunc( 
RID_SVXPAGE_BACKGROUND ), nullptr );
+AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BKG 
), nullptr );
 AddTabPage("alignment", pFact->GetTabPageCreatorFunc( 
RID_SVXPAGE_ALIGNMENT ), nullptr );
 }
 else
@@ -75,7 +75,6 @@ void ORptPageDialog::PageCreated(const OString& rId, 
SfxTabPage )
 SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
 if (rId == "background")
 {
-
aSet.Put(SfxUInt32Item(SID_FLAG_TYPE,static_cast(SvxBackgroundTabFlags::SHOW_HIGHLIGHTING)));
 rPage.PageCreated(aSet);
 }
 }
diff --git a/reportdesign/source/ui/misc/UITools.cxx 
b/reportdesign/source/ui/misc/UITools.cxx
index dca6d9210768..b752425b6e94 100644
--- a/reportdesign/source/ui/misc/UITools.cxx
+++ b/reportdesign/source/ui/misc/UITools.cxx
@@ -108,46 +108,65 @@
 #include 
 #include 
 
-#define ITEMID_FONT 10
-#define ITEMID_FONTHEIGHT   11
-#define ITEMID_LANGUAGE 12
-
-#define ITEMID_POSTURE  13
-#define ITEMID_WEIGHT   14
-#define ITEMID_SHADOWED 15
-#define ITEMID_WORDLINEMODE 16
-#define ITEMID_CONTOUR  17
-#define ITEMID_CROSSEDOUT   18
-#define ITEMID_UNDERLINE19
-
-#define ITEMID_COLOR20
-#define ITEMID_KERNING  21
-#define ITEMID_CASEMAP  22
-
-#define ITEMID_ESCAPEMENT   23
-#define ITEMID_FONTLIST 24
-#define ITEMID_AUTOKERN 25
-#define ITEMID_COLOR_TABLE  26
-#define ITEMID_BLINK27
-#define ITEMID_EMPHASISMARK 28
-#define ITEMID_TWOLINES 29
-#define ITEMID_CHARROTATE   30
-#define ITEMID_CHARSCALE_W  31
-#define ITEMID_CHARRELIEF   32
-#define ITEMID_CHARHIDDEN   33
-#define ITEMID_BRUSH34
-#define ITEMID_HORJUSTIFY   35
-#define ITEMID_VERJUSTIFY   36
-#define ITEMID_FONT_ASIAN   37
-#define ITEMID_FONTHEIGHT_ASIAN 38
-#define ITEMID_LANGUAGE_ASIAN   39
-#define ITEMID_POSTURE_ASIAN40
-#define ITEMID_WEIGHT_ASIAN 41
-#define ITEMID_FONT_COMPLEX 42
-#define ITEMID_FONTHEIGHT_COMPLEX   43
-#define ITEMID_LANGUAGE_COMPLEX 44
-#define ITEMID_POSTURE_COMPLEX  45
-#define ITEMID_WEIGHT_COMPLEX   46
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#define ITEMID_FONT XATTR_FILL_LAST + 1
+#define ITEMID_FONTHEIGHT   XATTR_FILL_LAST + 2

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

2019-12-05 Thread Andrea Gelmini (via logerrit)
 reportdesign/source/ui/inc/metadata.hxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 0027c01b3ef976d34f2f75cace43a26b59b07460
Author: Andrea Gelmini 
AuthorDate: Wed Dec 4 20:22:32 2019 +0100
Commit: Julien Nabet 
CommitDate: Thu Dec 5 10:25:07 2019 +0100

Fix typo

Change-Id: Ibeac785fb1b1f30187fa5aa5350292bf96b307a0
Reviewed-on: https://gerrit.libreoffice.org/84489
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/reportdesign/source/ui/inc/metadata.hxx 
b/reportdesign/source/ui/inc/metadata.hxx
index 30bc0c34f07e..63281076dddc 100644
--- a/reportdesign/source/ui/inc/metadata.hxx
+++ b/reportdesign/source/ui/inc/metadata.hxx
@@ -24,7 +24,7 @@
 #include 
 #include 
 
-//= UI flags (for all browseable properties)
+//= UI flags (for all browsable properties)
 enum class PropUIFlags {
 NONE  = 0x0001,  // no special flag
 Composeable   = 0x0002,  // the property is "composeable", i.e. an 
intersection of property
@@ -86,7 +86,7 @@ namespace rptui
 };
 
 
-//= property ids (for all browseable properties)
+//= property ids (for all browsable properties)
 //= The ID is used for the view order in the property browser.
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-12-04 Thread Caolán McNamara (via logerrit)
 reportdesign/source/ui/dlg/GroupsSorting.cxx   |  333 -
 reportdesign/source/ui/inc/GroupsSorting.hxx   |   62 -
 reportdesign/source/ui/inc/ReportController.hxx|2 
 reportdesign/source/ui/report/ReportController.cxx |   35 -
 reportdesign/uiconfig/dbreport/ui/floatingsort.ui  |  714 ++---
 5 files changed, 560 insertions(+), 586 deletions(-)

New commits:
commit 2701708942061e05f5516f940f626e1a5a257226
Author: Caolán McNamara 
AuthorDate: Mon Dec 2 20:41:11 2019 +
Commit: Caolán McNamara 
CommitDate: Wed Dec 4 09:54:08 2019 +0100

weld OGroupsSortingDialog

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

diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx 
b/reportdesign/source/ui/dlg/GroupsSorting.cxx
index 67234233bf7e..f9702f0385bc 100644
--- a/reportdesign/source/ui/dlg/GroupsSorting.cxx
+++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx
@@ -20,6 +20,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -38,6 +39,7 @@
 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -104,12 +106,12 @@ class OFieldExpressionControl : public 
::svt::EditBrowseBox
 sal_Int32   m_nDataPos;
 sal_Int32   m_nCurrentPos;
 ImplSVEvent *   m_nDeleteEvent;
-VclPtrm_pParent;
+OGroupsSortingDialog*   m_pParent;
 boolm_bIgnoreEvent;
 rtl::Reference 
aContainerListener;
 
 public:
-OFieldExpressionControl(OGroupsSortingDialog* _pParentDialog, vcl::Window 
*_pParent);
+OFieldExpressionControl(OGroupsSortingDialog* pParentDialog, const 
css::uno::Reference );
 virtual ~OFieldExpressionControl() override;
 virtual void dispose() override;
 
@@ -128,8 +130,6 @@ public:
 
 sal_Int32   getGroupPosition(sal_Int32 _nRow) const { return _nRow != 
BROWSER_ENDOFSELECTION ? m_aGroupPositions[_nRow] : sal_Int32(NO_GROUP); }
 
-::svt::ComboBoxControl*  getExpressionControl() const { return 
m_pComboCell; }
-
 /** returns the sequence with the selected groups
 */
 uno::Sequence fillSelectedGroups();
@@ -184,9 +184,8 @@ void 
OFieldExpressionControlContainerListener::elementReplaced(const css::contai
 void OFieldExpressionControlContainerListener::elementRemoved(const 
css::container::ContainerEvent& rEvent)
 { mpParent->elementRemoved(rEvent); }
 
-
-OFieldExpressionControl::OFieldExpressionControl(OGroupsSortingDialog* 
_pParentDialog, vcl::Window *_pParent)
-:EditBrowseBox( _pParent, EditBrowseBoxFlags::NONE, WB_TABSTOP,
+OFieldExpressionControl::OFieldExpressionControl(OGroupsSortingDialog* 
pParentDialog, const css::uno::Reference )
+:EditBrowseBox( VCLUnoHelper::GetWindow(rParent), 
EditBrowseBoxFlags::NONE, WB_TABSTOP,
 BrowserMode::COLUMNSELECTION | BrowserMode::MULTISELECTION 
| BrowserMode::AUTOSIZE_LASTCOL |
   BrowserMode::KEEPHIGHLIGHT | BrowserMode::HLINES 
| BrowserMode::VLINES)
 ,m_aGroupPositions(GROUPS_START_LEN,-1)
@@ -194,20 +193,18 @@ 
OFieldExpressionControl::OFieldExpressionControl(OGroupsSortingDialog* _pParentD
 ,m_nDataPos(-1)
 ,m_nCurrentPos(-1)
 ,m_nDeleteEvent(nullptr)
-,m_pParent(_pParentDialog)
+,m_pParent(pParentDialog)
 ,m_bIgnoreEvent(false)
 ,aContainerListener(new OFieldExpressionControlContainerListener(this))
 {
 SetBorderStyle(WindowBorderStyle::MONO);
 }
 
-
 OFieldExpressionControl::~OFieldExpressionControl()
 {
 disposeOnce();
 }
 
-
 void OFieldExpressionControl::dispose()
 {
 uno::Reference< report::XGroups > xGroups = m_pParent->getGroups();
@@ -218,7 +215,7 @@ void OFieldExpressionControl::dispose()
 Application::RemoveUserEvent( m_nDeleteEvent );
 
 m_pComboCell.disposeAndClear();
-m_pParent.clear();
+m_pParent = nullptr;
 ::svt::EditBrowseBox::dispose();
 }
 
@@ -380,7 +377,6 @@ void OFieldExpressionControl::lateInit()
 m_pComboCell->SetHelpId(HID_RPT_FIELDEXPRESSION);
 
 m_pComboCell->SetGetFocusHdl(LINK(m_pParent, OGroupsSortingDialog, 
OnControlFocusGot));
-m_pComboCell->SetLoseFocusHdl(LINK(m_pParent, OGroupsSortingDialog, 
OnControlFocusLost));
 
 
 // set browse mode
@@ -791,98 +787,82 @@ Size OFieldExpressionControl::GetOptimalSize() const
 return LogicToPixel(Size(106, 75), MapMode(MapUnit::MapAppFont));
 }
 
-OGroupsSortingDialog::OGroupsSortingDialog(vcl::Window* _pParent, bool 
_bReadOnly,
-   OReportController* _pController)
-: FloatingWindow(_pParent, "FloatingSort", 
"modules/dbreport/ui/floatingsort.ui")
+OGroupsSortingDialog::OGroupsSortingDialog(weld::Window* pParent, bool 
bReadOnly,
+   OReportController* pController)
+: 

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

2019-11-13 Thread Noel Grandin (via logerrit)
 reportdesign/source/filter/xml/xmlfilter.cxx |5 ++---
 sc/source/filter/xml/xmlexternaltabi.cxx |   10 --
 sc/source/filter/xml/xmlexternaltabi.hxx |2 --
 sw/source/core/swg/SwXMLSectionList.cxx  |   16 +++-
 4 files changed, 13 insertions(+), 20 deletions(-)

New commits:
commit ead34a4d34db05d5718d96b66f5e39d886c8b699
Author: Noel Grandin 
AuthorDate: Wed Nov 13 09:35:05 2019 +0200
Commit: Noel Grandin 
CommitDate: Wed Nov 13 10:26:35 2019 +0100

no need to store reference to Import here

can just cast the parent member

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

diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx 
b/reportdesign/source/filter/xml/xmlfilter.cxx
index 00f7fe86a9c5..e4df625cacce 100644
--- a/reportdesign/source/filter/xml/xmlfilter.cxx
+++ b/reportdesign/source/filter/xml/xmlfilter.cxx
@@ -86,7 +86,7 @@ using namespace ::com::sun::star::util;
 class RptMLMasterStylesContext_Impl:
 public XMLTextMasterStylesContext
 {
-ORptFilter& m_rImport;
+ORptFilter& GetImport() { return 
static_cast(XMLTextMasterStylesContext::GetImport()); }
 
 public:
 
@@ -106,14 +106,13 @@ 
RptMLMasterStylesContext_Impl::RptMLMasterStylesContext_Impl(
 const OUString& rLName ,
 const uno::Reference< xml::sax::XAttributeList > & xAttrList ) :
 XMLTextMasterStylesContext( rImport, nPrfx, rLName, xAttrList )
-,m_rImport(rImport)
 {
 }
 
 void RptMLMasterStylesContext_Impl::EndElement()
 {
 FinishStyles( true );
-m_rImport.FinishStyles();
+GetImport().FinishStyles();
 }
 
 /// read a component (file + filter version)
diff --git a/sc/source/filter/xml/xmlexternaltabi.cxx 
b/sc/source/filter/xml/xmlexternaltabi.cxx
index 8d0a810dad09..5515fd835ba5 100644
--- a/sc/source/filter/xml/xmlexternaltabi.cxx
+++ b/sc/source/filter/xml/xmlexternaltabi.cxx
@@ -43,7 +43,6 @@ 
ScXMLExternalRefTabSourceContext::ScXMLExternalRefTabSourceContext(
 ScXMLImport& rImport,
 const rtl::Reference& rAttrList, 
ScXMLExternalTabData& rRefInfo ) :
 ScXMLImportContext( rImport ),
-mrScImport(rImport),
 mrExternalRefInfo(rRefInfo)
 {
 using namespace ::xmloff::token;
@@ -98,7 +97,7 @@ static bool lcl_isValidRelativeURL(const OUString& rUrl)
 
 void SAL_CALL ScXMLExternalRefTabSourceContext::endFastElement( sal_Int32 
/*nElement*/ )
 {
-ScDocument* pDoc = mrScImport.GetDocument();
+ScDocument* pDoc = GetScImport().GetDocument();
 if (!pDoc)
 return;
 
@@ -111,7 +110,6 @@ void SAL_CALL 
ScXMLExternalRefTabSourceContext::endFastElement( sal_Int32 /*nEle
 ScXMLExternalRefRowsContext::ScXMLExternalRefRowsContext(
 ScXMLImport& rImport, ScXMLExternalTabData& rRefInfo ) :
 ScXMLImportContext( rImport ),
-mrScImport(rImport),
 mrExternalRefInfo(rRefInfo)
 {
 }
@@ -126,7 +124,7 @@ Reference< XFastContextHandler > SAL_CALL 
ScXMLExternalRefRowsContext::createFas
 // #i101319# row elements inside group, rows or header-rows
 // are treated like row elements directly in the table element
 
-const SvXMLTokenMap& rTokenMap = mrScImport.GetTableRowsElemTokenMap();
+const SvXMLTokenMap& rTokenMap = GetScImport().GetTableRowsElemTokenMap();
 sal_uInt16 nToken = rTokenMap.Get( nElement );
 sax_fastparser::FastAttributeList *pAttribList =
 sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList 
);
@@ -137,10 +135,10 @@ Reference< XFastContextHandler > SAL_CALL 
ScXMLExternalRefRowsContext::createFas
 case XML_TOK_TABLE_ROWS_HEADER_ROWS:
 case XML_TOK_TABLE_ROWS_ROWS:
 return new ScXMLExternalRefRowsContext(
-mrScImport, mrExternalRefInfo);
+GetScImport(), mrExternalRefInfo);
 case XML_TOK_TABLE_ROWS_ROW:
 return new ScXMLExternalRefRowContext(
-mrScImport, pAttribList, mrExternalRefInfo);
+GetScImport(), pAttribList, mrExternalRefInfo);
 default:
 ;
 }
diff --git a/sc/source/filter/xml/xmlexternaltabi.hxx 
b/sc/source/filter/xml/xmlexternaltabi.hxx
index 08e3fb2d2686..5afb5c5f9bfc 100644
--- a/sc/source/filter/xml/xmlexternaltabi.hxx
+++ b/sc/source/filter/xml/xmlexternaltabi.hxx
@@ -40,7 +40,6 @@ public:
 virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
 
 private:
-ScXMLImport&mrScImport;
 ScXMLExternalTabData&   mrExternalRefInfo;
 
 OUString maRelativeUrl;
@@ -61,7 +60,6 @@ public:
 const css::uno::Reference< 
css::xml::sax::XFastAttributeList >& xAttrList ) override;
 
 private:
-ScXMLImport&mrScImport;
 ScXMLExternalTabData&   mrExternalRefInfo;
 };
 
diff --git a/sw/source/core/swg/SwXMLSectionList.cxx 
b/sw/source/core/swg/SwXMLSectionList.cxx
index 1940ebfea478..2f835bd606a3 

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

2019-09-15 Thread Andrea Gelmini (via logerrit)
 reportdesign/source/filter/xml/xmlExport.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 196e7ad850e40e631255ef42bb1653902e201837
Author: Andrea Gelmini 
AuthorDate: Sat Sep 14 21:58:50 2019 +0200
Commit: Julien Nabet 
CommitDate: Sun Sep 15 08:56:36 2019 +0200

Fix typos

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

diff --git a/reportdesign/source/filter/xml/xmlExport.cxx 
b/reportdesign/source/filter/xml/xmlExport.cxx
index 43abca700f9f..4c991cd87732 100644
--- a/reportdesign/source/filter/xml/xmlExport.cxx
+++ b/reportdesign/source/filter/xml/xmlExport.cxx
@@ -518,7 +518,7 @@ void ORptExport::collectStyleNames(sal_Int32 _nFamily, 
const ::std::vector< sal_
 // note: there cannot be 0-height rows, because a call to std::unique 
has removed them
 // it cannot be predicted that the size of _aSizeAutoGrow has any 
relation to the size of
 // _aSize, because of the same std::unique operation (and 
_aSizeAutoGrow wasn't even the same
-// size before that), so the matching elemenent in _aSizeAutoGrow has 
to be found by lookup.
+// size before that), so the matching element in _aSizeAutoGrow has to 
be found by lookup.
 ::std::vector::const_iterator aAutoGrow = 
::std::find(_aSizeAutoGrow.begin(), _aSizeAutoGrow.end(), *aIter2);
 bool bAutoGrow = aAutoGrow != _aSizeAutoGrow.end();
 // the mnIndex is into the array returned by 
OXMLHelper::GetRowStyleProps()
@@ -593,7 +593,7 @@ void ORptExport::exportSectionAutoStyle(const 
Reference& _xProp)
 
 // note: the aRowPos contains top and bottom position of every report 
control; we now compute the
 // top of every row in the resulting table, by sorting and eliminating 
unnecessary duplicate
-// positions. (the same for the colums in the preceding lines.)
+// positions. (the same for the columns in the preceding lines.)
 ::std::sort(aRowPos.begin(),aRowPos.end(),::std::less());
 aRowPos.erase(::std::unique(aRowPos.begin(),aRowPos.end()),aRowPos.end());
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-08-31 Thread Tamás Zolnai (via logerrit)
 reportdesign/source/ui/misc/UITools.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6cc5baa0a15014c442932c60bb60dc2a84edc25f
Author: Tamás Zolnai 
AuthorDate: Sat Aug 31 12:44:12 2019 +0200
Commit: Tamás Zolnai 
CommitDate: Sat Aug 31 14:40:14 2019 +0200

tdf#118710 - Report Builder Character Settings dialog Highlighting tab page

doesn't set background.
Regression from:
62fb96e075e79676b45912a3a8ec2702b1e3aaf2

Change-Id: Ie60a4b4d988ba00b3a425dda73ed6ffeb40394c9
Reviewed-on: https://gerrit.libreoffice.org/78340
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai 

diff --git a/reportdesign/source/ui/misc/UITools.cxx 
b/reportdesign/source/ui/misc/UITools.cxx
index 56de5307d262..bde0449a34b1 100644
--- a/reportdesign/source/ui/misc/UITools.cxx
+++ b/reportdesign/source/ui/misc/UITools.cxx
@@ -622,7 +622,7 @@ bool openCharDialog( const 
uno::Reference& _rxRep
 { SID_ATTR_CHAR_SCALEWIDTH, true },
 { SID_ATTR_CHAR_RELIEF, true },
 { SID_ATTR_CHAR_HIDDEN, true },
-{ SID_ATTR_BRUSH, true },
+{ SID_ATTR_BRUSH_CHAR, true },
 { SID_ATTR_ALIGN_HOR_JUSTIFY, true },
 { SID_ATTR_ALIGN_VER_JUSTIFY, true },
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-07-20 Thread Noel Grandin (via logerrit)
 reportdesign/source/core/api/ReportDefinition.cxx |4 ++--
 reportdesign/source/core/api/ReportEngineJFree.cxx|2 +-
 reportdesign/source/core/sdr/ReportDrawPage.cxx   |2 +-
 reportdesign/source/core/sdr/RptObject.cxx|4 ++--
 reportdesign/source/filter/xml/xmlfilter.cxx  |4 ++--
 reportdesign/source/ui/inspection/GeometryHandler.cxx |2 +-
 reportdesign/source/ui/report/ViewsWindow.cxx |2 +-
 7 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 140b070bb187e3d5e35a588a1d187e3a40e11547
Author: Noel Grandin 
AuthorDate: Fri Jul 19 20:09:26 2019 +0200
Commit: Noel Grandin 
CommitDate: Sat Jul 20 13:10:10 2019 +0200

loplugin:referencecasting in reportdesign

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

diff --git a/reportdesign/source/core/api/ReportDefinition.cxx 
b/reportdesign/source/core/api/ReportDefinition.cxx
index 600dd78628b1..f4994d40397d 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -1840,7 +1840,7 @@ uno::Reference< container::XIndexAccess > SAL_CALL 
OReportDefinition::getViewDat
 ::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed);
 if ( !m_pImpl->m_xViewData.is() )
 {
-m_pImpl->m_xViewData.set( 
document::IndexedPropertyValues::create(m_aProps->m_xContext), uno::UNO_QUERY);
+m_pImpl->m_xViewData = 
document::IndexedPropertyValues::create(m_aProps->m_xContext);
 uno::Reference< container::XIndexContainer > 
xContainer(m_pImpl->m_xViewData,uno::UNO_QUERY);
 for (const auto& rxController : m_pImpl->m_aControllers)
 {
@@ -1907,7 +1907,7 @@ uno::Sequence< OUString > SAL_CALL 
OReportDefinition::getDocumentSubStoragesName
 {
 ::osl::MutexGuard aGuard(m_aMutex);
 ::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed);
-uno::Reference 
xNameAccess(m_pImpl->m_xStorage,uno::UNO_QUERY);
+uno::Reference xNameAccess = m_pImpl->m_xStorage;
 return xNameAccess.is() ? xNameAccess->getElementNames() : uno::Sequence< 
OUString >();
 }
 
diff --git a/reportdesign/source/core/api/ReportEngineJFree.cxx 
b/reportdesign/source/core/api/ReportEngineJFree.cxx
index 3c712d8f1878..294572903558 100644
--- a/reportdesign/source/core/api/ReportEngineJFree.cxx
+++ b/reportdesign/source/core/api/ReportEngineJFree.cxx
@@ -275,7 +275,7 @@ uno::Reference< frame::XModel > 
OReportEngineJFree::createDocumentAlive( const u
 if ( !xFrameLoad.is() )
 {
 // if there is no frame given, find the right
-xFrameLoad.set( frame::Desktop::create(m_xContext), 
uno::UNO_QUERY);
+xFrameLoad = frame::Desktop::create(m_xContext);
 sal_Int32 const nFrameSearchFlag = frame::FrameSearchFlag::TASKS | 
frame::FrameSearchFlag::CREATE;
 uno::Reference< frame::XFrame> xFrame = uno::Reference< 
frame::XFrame>(xFrameLoad,uno::UNO_QUERY_THROW)->findFrame("_blank",nFrameSearchFlag);
 xFrameLoad.set( xFrame,uno::UNO_QUERY);
diff --git a/reportdesign/source/core/sdr/ReportDrawPage.cxx 
b/reportdesign/source/core/sdr/ReportDrawPage.cxx
index 15910df12a12..00027a557a7b 100644
--- a/reportdesign/source/core/sdr/ReportDrawPage.cxx
+++ b/reportdesign/source/core/sdr/ReportDrawPage.cxx
@@ -90,7 +90,7 @@ uno::Reference< drawing::XShape >  
OReportDrawPage::CreateShape( SdrObject *pObj
 else
 bChangeOrientation = rUnoObj.GetObjIdentifier() == 
OBJ_DLG_HFIXEDLINE;
 SvxShapeControl* pShape = new SvxShapeControl( pObj );
-
xShape.set(static_cast(static_cast(pShape)),uno::UNO_QUERY);
+xShape = static_cast(pShape);
 pShape->setShapeKind(pObj->GetObjIdentifier());
 }
 else if (dynamic_cast< const OCustomShape* >(pObj) != nullptr)
diff --git a/reportdesign/source/core/sdr/RptObject.cxx 
b/reportdesign/source/core/sdr/RptObject.cxx
index bbfc0e47d41e..7a77b212e25e 100644
--- a/reportdesign/source/core/sdr/RptObject.cxx
+++ b/reportdesign/source/core/sdr/RptObject.cxx
@@ -568,7 +568,7 @@ bool OCustomShape::EndCreate(SdrDragStat& rStat, 
SdrCreateCmd eCmd)
 
 uno::Reference< beans::XPropertySet> OCustomShape::getAwtComponent()
 {
-return uno::Reference< 
beans::XPropertySet>(m_xReportComponent,uno::UNO_QUERY);
+return m_xReportComponent;
 }
 
 
@@ -1072,7 +1072,7 @@ bool OOle2Obj::EndCreate(SdrDragStat& rStat, SdrCreateCmd 
eCmd)
 
 uno::Reference< beans::XPropertySet> OOle2Obj::getAwtComponent()
 {
-return uno::Reference< 
beans::XPropertySet>(m_xReportComponent,uno::UNO_QUERY);
+return m_xReportComponent;
 }
 
 
diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx 
b/reportdesign/source/filter/xml/xmlfilter.cxx
index 5e97042ec818..0f5f539d0da5 100644
--- 

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

2019-07-05 Thread Julien Nabet (via logerrit)
 reportdesign/source/ui/dlg/Formula.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit e011bf1c751833fa4702ee90dee77b6473ebdaf6
Author: Julien Nabet 
AuthorDate: Fri Jul 5 19:25:02 2019 +0200
Commit: Julien Nabet 
CommitDate: Fri Jul 5 22:08:09 2019 +0200

Revert "cid#1448383: Resource leak in object (reportdesign/formula)"

I should have use delete or unique_ptr

This reverts commit 99ec957948ce3af0c40e9cb1560e2de59fbc8912.

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

diff --git a/reportdesign/source/ui/dlg/Formula.cxx 
b/reportdesign/source/ui/dlg/Formula.cxx
index 08794435871e..919deaeec869 100644
--- a/reportdesign/source/ui/dlg/Formula.cxx
+++ b/reportdesign/source/ui/dlg/Formula.cxx
@@ -97,7 +97,6 @@ FormulaDialog::~FormulaDialog()
 StoreFormEditData( m_pFormulaData );
 m_pEdit = nullptr;
 m_pAddField.clear();
-free(m_pFormulaData);
 }
 
 // functions for right side
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-07-04 Thread Julien Nabet (via logerrit)
 reportdesign/source/ui/dlg/Formula.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 99ec957948ce3af0c40e9cb1560e2de59fbc8912
Author: Julien Nabet 
AuthorDate: Thu Jul 4 18:55:03 2019 +0200
Commit: Julien Nabet 
CommitDate: Thu Jul 4 20:15:54 2019 +0200

cid#1448383: Resource leak in object (reportdesign/formula)

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

diff --git a/reportdesign/source/ui/dlg/Formula.cxx 
b/reportdesign/source/ui/dlg/Formula.cxx
index 919deaeec869..08794435871e 100644
--- a/reportdesign/source/ui/dlg/Formula.cxx
+++ b/reportdesign/source/ui/dlg/Formula.cxx
@@ -97,6 +97,7 @@ FormulaDialog::~FormulaDialog()
 StoreFormEditData( m_pFormulaData );
 m_pEdit = nullptr;
 m_pAddField.clear();
+free(m_pFormulaData);
 }
 
 // functions for right side
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-06-21 Thread Arkadiy Illarionov (via logerrit)
 reportdesign/source/core/api/Section.cxx |   16 ++--
 reportdesign/source/core/inc/Section.hxx |3 +--
 reportdesign/source/core/sdr/RptPage.cxx |4 ++--
 3 files changed, 5 insertions(+), 18 deletions(-)

New commits:
commit a4261757b89f6a198261006a8c9aa6b4eb8e19fb
Author: Arkadiy Illarionov 
AuthorDate: Fri Jun 21 00:11:43 2019 +0300
Commit: Arkadiy Illarionov 
CommitDate: Fri Jun 21 19:38:17 2019 +0200

tdf#39593 Remove reportdesign::OSection::getImplementation

Replace with comphelper::getUnoTunnelImplementation.

Change-Id: I3d0837ff3f47392e09ef276f141a8459add7a5ad
Reviewed-on: https://gerrit.libreoffice.org/74471
Tested-by: Jenkins
Reviewed-by: Arkadiy Illarionov 

diff --git a/reportdesign/source/core/api/Section.cxx 
b/reportdesign/source/core/api/Section.cxx
index 69be4b7fc3c8..b030ae5508e7 100644
--- a/reportdesign/source/core/api/Section.cxx
+++ b/reportdesign/source/core/api/Section.cxx
@@ -571,24 +571,12 @@ sal_Bool SAL_CALL OSection::hasForms()
 
 sal_Int64 OSection::getSomething( const uno::Sequence< sal_Int8 > & rId )
 {
-if (rId.getLength() == 16 && 0 == 
memcmp(getUnoTunnelImplementationId().getConstArray(),  rId.getConstArray(), 16 
) )
+if (rId.getLength() == 16 && 0 == memcmp(getUnoTunnelId().getConstArray(), 
 rId.getConstArray(), 16 ) )
 return reinterpret_cast(this);
 return (m_xDrawPage_Tunnel.is()) ? m_xDrawPage_Tunnel->getSomething(rId) : 
0;
 }
 
-
-OSection* OSection::getImplementation( const uno::Reference< uno::XInterface 
>& _rxComponent )
-{
-OSection* pContent( nullptr );
-
-uno::Reference< lang::XUnoTunnel > xUnoTunnel( _rxComponent, 
uno::UNO_QUERY );
-if ( xUnoTunnel.is() )
-pContent = reinterpret_cast< OSection* >( xUnoTunnel->getSomething( 
getUnoTunnelImplementationId() ) );
-
-return pContent;
-}
-
-uno::Sequence< sal_Int8 > OSection::getUnoTunnelImplementationId()
+uno::Sequence< sal_Int8 > OSection::getUnoTunnelId()
 {
 static ::cppu::OImplementationId implId;
 
diff --git a/reportdesign/source/core/inc/Section.hxx 
b/reportdesign/source/core/inc/Section.hxx
index fb4fe75172ad..77a92db780bd 100644
--- a/reportdesign/source/core/inc/Section.hxx
+++ b/reportdesign/source/core/inc/Section.hxx
@@ -223,8 +223,7 @@ namespace reportdesign
 
 // css::lang::XUnoTunnel
 virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< 
sal_Int8 >& aIdentifier ) override;
-static OSection* getImplementation( const css::uno::Reference< 
css::uno::XInterface >& _rxComponent );
-static css::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId();
+static css::uno::Sequence< sal_Int8 > getUnoTunnelId();
 
 void notifyElementAdded(const css::uno::Reference< 
css::drawing::XShape >& xShape);
 void notifyElementRemoved(const css::uno::Reference< 
css::drawing::XShape >& xShape);
diff --git a/reportdesign/source/core/sdr/RptPage.cxx 
b/reportdesign/source/core/sdr/RptPage.cxx
index c20f11f363cd..18484851739b 100644
--- a/reportdesign/source/core/sdr/RptPage.cxx
+++ b/reportdesign/source/core/sdr/RptPage.cxx
@@ -92,7 +92,7 @@ SdrObject* OReportPage::RemoveObject(size_t nObjNum)
 }
 
 // this code is evil, but what else shall I do
-reportdesign::OSection* pSection = 
reportdesign::OSection::getImplementation(m_xSection);
+reportdesign::OSection* pSection = 
comphelper::getUnoTunnelImplementation(m_xSection);
 uno::Reference< drawing::XShape> 
xShape(pObj->getUnoShape(),uno::UNO_QUERY);
 pSection->notifyElementRemoved(xShape);
 if (dynamic_cast< const OUnoObject *>( pObj ) !=  nullptr)
@@ -177,7 +177,7 @@ void OReportPage::NbcInsertObject(SdrObject* pObj, size_t 
nPos)
 }
 
 // this code is evil, but what else shall I do
-reportdesign::OSection* pSection = 
reportdesign::OSection::getImplementation(m_xSection);
+reportdesign::OSection* pSection = 
comphelper::getUnoTunnelImplementation(m_xSection);
 uno::Reference< drawing::XShape> 
xShape(pObj->getUnoShape(),uno::UNO_QUERY);
 pSection->notifyElementAdded(xShape);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[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: reportdesign/source

2019-03-05 Thread Libreoffice Gerrit user
 reportdesign/source/filter/xml/xmlGroup.cxx |   18 ++
 1 file changed, 6 insertions(+), 12 deletions(-)

New commits:
commit 1e1559256bf64a8f782b6dcb70f191eec767d475
Author: Matteo Casalin 
AuthorDate: Mon Feb 18 00:07:40 2019 +0100
Commit: Matteo Casalin 
CommitDate: Tue Mar 5 22:35:21 2019 +0100

Use index only where getToken() needs it

Change-Id: I28da64c9ef9b36288f380300f6622d48483e6c0d
Reviewed-on: https://gerrit.libreoffice.org/68125
Tested-by: Jenkins
Reviewed-by: Matteo Casalin 

diff --git a/reportdesign/source/filter/xml/xmlGroup.cxx 
b/reportdesign/source/filter/xml/xmlGroup.cxx
index 1c976c31a5e8..49f270760616 100644
--- a/reportdesign/source/filter/xml/xmlGroup.cxx
+++ b/reportdesign/source/filter/xml/xmlGroup.cxx
@@ -112,12 +112,10 @@ OXMLGroup::OXMLGroup( ORptFilter& _rImport
 ORptFilter::TGroupFunctionMap::const_iterator 
aFind = aFunctions.find(sValue);
 if ( aFind != aFunctions.end() )
 {
-sal_Int32 nIndex = 0;
 const OUString sCompleteFormula = 
aFind->second->getFormula();
-OUString sExpression = 
sCompleteFormula.getToken(1,'[',nIndex);
-nIndex = 0;
-sExpression = 
sExpression.getToken(0,']',nIndex);
-nIndex = 0;
+OUString sExpression = 
sCompleteFormula.getToken(1,'[');
+sExpression = sExpression.getToken(0,']');
+sal_Int32 nIndex = 0;
 const OUString sFormula = 
sCompleteFormula.getToken(0,'(',nIndex);
 ::sal_Int16 nGroupOn = 
report::GroupOn::DEFAULT;
 
@@ -125,8 +123,7 @@ OXMLGroup::OXMLGroup( ORptFilter& _rImport
 {
 nGroupOn = 
report::GroupOn::PREFIX_CHARACTERS;
 OUString sInterval = 
sCompleteFormula.getToken(1,';',nIndex);
-nIndex = 0;
-sInterval = 
sInterval.getToken(0,')',nIndex);
+sInterval = sInterval.getToken(0,')');
 
m_xGroup->setGroupInterval(sInterval.toInt32());
 }
 else if ( sFormula == "rpt:YEAR")
@@ -153,11 +150,8 @@ OXMLGroup::OXMLGroup( ORptFilter& _rImport
 nGroupOn = report::GroupOn::INTERVAL;
 _rImport.removeFunction(sExpression);
 sExpression = 
sExpression.copy(OUString("INT_count_").getLength());
-
-nIndex = 0;
-OUString sInterval = 
sCompleteFormula.getToken(1,'/',nIndex);
-nIndex = 0;
-sInterval = 
sInterval.getToken(0,')',nIndex);
+OUString sInterval = 
sCompleteFormula.getToken(1,'/');
+sInterval = sInterval.getToken(0,')');
 
m_xGroup->setGroupInterval(sInterval.toInt32());
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: reportdesign/source sal/rtl sax/source sax/test

2019-02-11 Thread Libreoffice Gerrit user
 reportdesign/source/core/api/FormattedField.cxx|8 
 reportdesign/source/core/api/ReportDefinition.cxx  |   24 -
 reportdesign/source/core/misc/conditionupdater.cxx |9 
 reportdesign/source/core/sdr/PropertyForward.cxx   |   16 
 reportdesign/source/core/sdr/RptPage.cxx   |6 
 reportdesign/source/core/sdr/formatnormalizer.cxx  |8 
 reportdesign/source/filter/xml/xmlAutoStyle.cxx|   12 
 reportdesign/source/filter/xml/xmlExport.cxx   |   21 -
 reportdesign/source/filter/xml/xmlReport.cxx   |6 
 reportdesign/source/filter/xml/xmlTable.cxx|  102 ++---
 reportdesign/source/ui/dlg/CondFormat.cxx  |   25 -
 reportdesign/source/ui/dlg/Condition.cxx   |9 
 reportdesign/source/ui/dlg/GroupsSorting.cxx   |   13 
 reportdesign/source/ui/inspection/GeometryHandler.cxx  |   87 ++--
 reportdesign/source/ui/misc/RptUndo.cxx|   10 
 reportdesign/source/ui/misc/UITools.cxx|   26 -
 reportdesign/source/ui/report/DesignView.cxx   |7 
 reportdesign/source/ui/report/ReportController.cxx |   59 +--
 reportdesign/source/ui/report/ReportControllerObserver.cxx |5 
 reportdesign/source/ui/report/ReportSection.cxx|   67 +--
 reportdesign/source/ui/report/ViewsWindow.cxx  |  247 -
 sal/rtl/bootstrap.cxx  |   11 
 sax/source/fastparser/fastparser.cxx   |   20 -
 sax/source/tools/fastattribs.cxx   |4 
 sax/source/tools/fastserializer.cxx|   10 
 sax/test/sax/testwriter.cxx|   26 -
 sax/test/saxdemo.cxx   |   22 -
 27 files changed, 348 insertions(+), 512 deletions(-)

New commits:
commit 3f08be2e511dc2300021486a1cc2f1e8ba530373
Author: Arkadiy Illarionov 
AuthorDate: Tue Feb 12 00:00:22 2019 +0300
Commit: Noel Grandin 
CommitDate: Tue Feb 12 07:37:08 2019 +0100

Simplify containers iterations in reportdesign, sal, sax

Use range-based loop or replace with STL functions

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

diff --git a/reportdesign/source/core/api/FormattedField.cxx 
b/reportdesign/source/core/api/FormattedField.cxx
index a50e79ab19fb..2727c9ed0022 100644
--- a/reportdesign/source/core/api/FormattedField.cxx
+++ b/reportdesign/source/core/api/FormattedField.cxx
@@ -216,13 +216,13 @@ uno::Reference< util::XCloneable > SAL_CALL 
OFormattedField::createClone(  )
 uno::Reference< report::XReportComponent> xSource = this;
 uno::Reference< report::XFormattedField> 
xSet(cloneObject(xSource,m_aProps.aComponent.m_xFactory,SERVICE_FORMATTEDFIELD),uno::UNO_QUERY_THROW);
 
-::std::vector< uno::Reference< report::XFormatCondition> >::const_iterator 
aIter = m_aProps.m_aFormatConditions.begin();
-::std::vector< uno::Reference< report::XFormatCondition> >::const_iterator 
aEnd  = m_aProps.m_aFormatConditions.end();
-for (sal_Int32 i = 0; aIter != aEnd; ++aIter,++i)
+sal_Int32 i = 0;
+for (const auto& rxFormatCondition : m_aProps.m_aFormatConditions)
 {
 uno::Reference< report::XFormatCondition > xCond = 
xSet->createFormatCondition();
-::comphelper::copyProperties(aIter->get(),xCond.get());
+::comphelper::copyProperties(rxFormatCondition.get(), xCond.get());
 xSet->insertByIndex(i,uno::makeAny(xCond));
+++i;
 }
 return xSet.get();
 }
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx 
b/reportdesign/source/core/api/ReportDefinition.cxx
index c1d1699d8835..695334214042 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -1079,15 +1079,13 @@ void SAL_CALL OReportDefinition::close(sal_Bool 
bDeliverOwnership)
 
 
 ::std::vector< uno::Reference< frame::XController> > aCopy = 
m_pImpl->m_aControllers;
-::std::vector< uno::Reference< frame::XController> >::iterator aIter = 
aCopy.begin();
-::std::vector< uno::Reference< frame::XController> >::const_iterator aEnd 
= aCopy.end();
-for (;aIter != aEnd ; ++aIter)
+for (auto& rxController : aCopy)
 {
-if ( aIter->is() )
+if ( rxController.is() )
 {
 try
 {
-uno::Reference< util::XCloseable> xFrame( 
(*aIter)->getFrame(), uno::UNO_QUERY );
+uno::Reference< util::XCloseable> xFrame( 
rxController->getFrame(), uno::UNO_QUERY );
 if ( xFrame.is() )
 xFrame->close( bDeliverOwnership );
 }
@@ -1844,15 +1842,13 @@ uno::Reference< container::XIndexAccess > SAL_CALL 
OReportDefinition::getViewDat
 {
  

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

2018-12-09 Thread Libreoffice Gerrit user
 reportdesign/source/ui/dlg/Navigator.cxx |4 ++--
 svx/source/form/filtnav.cxx  |4 ++--
 svx/source/form/navigatortree.cxx|4 ++--
 vcl/source/control/field.cxx |   18 +-
 4 files changed, 15 insertions(+), 15 deletions(-)

New commits:
commit 519b3fc6ad58eb4ef8ffa6460148fb9f6e7e
Author: Andrea Gelmini 
AuthorDate: Wed Dec 5 22:20:49 2018 +0100
Commit: Julien Nabet 
CommitDate: Sun Dec 9 09:18:51 2018 +0100

Fix typos in code

It passed "make check" on Linux

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

diff --git a/reportdesign/source/ui/dlg/Navigator.cxx 
b/reportdesign/source/ui/dlg/Navigator.cxx
index b28fb5ed7fcb..e766a13cc6a9 100644
--- a/reportdesign/source/ui/dlg/Navigator.cxx
+++ b/reportdesign/source/ui/dlg/Navigator.cxx
@@ -395,8 +395,8 @@ sal_Int8 NavigatorTree::AcceptDrop( const AcceptDropEvent& 
_rEvt )
 }
 else
 {
-SvTreeListEntry* pDropppedOn = GetEntry(aDropPos);
-if (pDropppedOn && (GetChildCount(pDropppedOn) > 0) && 
!IsExpanded(pDropppedOn))
+SvTreeListEntry* pDroppedOn = GetEntry(aDropPos);
+if (pDroppedOn && (GetChildCount(pDroppedOn) > 0) && 
!IsExpanded(pDroppedOn))
 {
 m_aDropActionType = DA_EXPANDNODE;
 bNeedTrigger = true;
diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx
index 8a30a1cab344..97e414984b12 100644
--- a/svx/source/form/filtnav.cxx
+++ b/svx/source/form/filtnav.cxx
@@ -1228,8 +1228,8 @@ sal_Int8 FmFilterNavigator::AcceptDrop( const 
AcceptDropEvent& rEvt )
 }
 else
 {   // is it an entry with children, and not yet expanded?
-SvTreeListEntry* pDropppedOn = GetEntry(aDropPos);
-if (pDropppedOn && (GetChildCount(pDropppedOn) > 0) && 
!IsExpanded(pDropppedOn))
+SvTreeListEntry* pDroppedOn = GetEntry(aDropPos);
+if (pDroppedOn && (GetChildCount(pDroppedOn) > 0) && 
!IsExpanded(pDroppedOn))
 {
 // -> expand
 m_aDropActionType = DA_EXPANDNODE;
diff --git a/svx/source/form/navigatortree.cxx 
b/svx/source/form/navigatortree.cxx
index 555bd5c94367..bdf2a97b0aa4 100644
--- a/svx/source/form/navigatortree.cxx
+++ b/svx/source/form/navigatortree.cxx
@@ -853,8 +853,8 @@ namespace svxform
 bNeedTrigger = true;
 } else
 {   // on an entry with children, not swang open
-SvTreeListEntry* pDropppedOn = GetEntry(aDropPos);
-if (pDropppedOn && (GetChildCount(pDropppedOn) > 0) && 
!IsExpanded(pDropppedOn))
+SvTreeListEntry* pDroppedOn = GetEntry(aDropPos);
+if (pDroppedOn && (GetChildCount(pDroppedOn) > 0) && 
!IsExpanded(pDroppedOn))
 {
 // -> swing open
 m_aDropActionType = DA_EXPANDNODE;
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx
index 7e70ddb554f6..6801c0a7a5d8 100644
--- a/vcl/source/control/field.cxx
+++ b/vcl/source/control/field.cxx
@@ -58,7 +58,7 @@ sal_Int64 ImplPower10( sal_uInt16 n )
 
 bool ImplNumericProcessKeyInput( const KeyEvent& rKEvt,
  bool bStrictFormat, bool bThousandSep,
- const LocaleDataWrapper& rLocaleDataWrappper )
+ const LocaleDataWrapper& rLocaleDataWrapper )
 {
 if ( !bStrictFormat )
 return false;
@@ -71,15 +71,15 @@ bool ImplNumericProcessKeyInput( const KeyEvent& rKEvt,
  (nGroup == KEYGROUP_CURSOR) ||
  (nGroup == KEYGROUP_MISC) ||
  ((cChar >= '0') && (cChar <= '9')) ||
- string::equals(rLocaleDataWrappper.getNumDecimalSep(), cChar) 
||
- (bThousandSep && 
string::equals(rLocaleDataWrappper.getNumThousandSep(), cChar)) ||
- string::equals(rLocaleDataWrappper.getNumDecimalSepAlt(), 
cChar) ||
+ string::equals(rLocaleDataWrapper.getNumDecimalSep(), cChar) 
||
+ (bThousandSep && 
string::equals(rLocaleDataWrapper.getNumThousandSep(), cChar)) ||
+ string::equals(rLocaleDataWrapper.getNumDecimalSepAlt(), 
cChar) ||
  (cChar == '-'));
 }
 }
 
 bool ImplNumericGetValue( const OUString& rStr, sal_Int64& rValue,
- sal_uInt16 nDecDigits, const 
LocaleDataWrapper& rLocaleDataWrappper,
+ sal_uInt16 nDecDigits, const 
LocaleDataWrapper& rLocaleDataWrapper,
  bool bCurrency = false )
 {
 OUStringaStr = rStr;
@@ -98,9 +98,9 @@ bool ImplNumericGetValue( const OUString& rStr, 

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

2018-11-20 Thread Libreoffice Gerrit user
 reportdesign/source/ui/report/SectionWindow.cxx |4 
 1 file changed, 4 deletions(-)

New commits:
commit a87ba810993a9cd1fd4739d6f42cdc6bc0c82cac
Author: Noel Grandin 
AuthorDate: Mon Nov 19 13:36:01 2018 +0200
Commit: Noel Grandin 
CommitDate: Tue Nov 20 13:10:48 2018 +0100

remove bogus static variable in reportdesign OSectionWindow

which arrived with
   commit bee746960f3d94d92e71006a7365a26669f52f8c
   Date:   Tue Feb 1 13:42:47 2011 +0100
dba34d: limit invalidate calls
and looks extremely dodgy, because it means only the very first report
design window will be correctly configured.

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

diff --git a/reportdesign/source/ui/report/SectionWindow.cxx 
b/reportdesign/source/ui/report/SectionWindow.cxx
index f76f3469ca48..3cc789fea738 100644
--- a/reportdesign/source/ui/report/SectionWindow.cxx
+++ b/reportdesign/source/ui/report/SectionWindow.cxx
@@ -207,13 +207,9 @@ bool OSectionWindow::setGroupSectionTitle(
 
 void OSectionWindow::ImplInitSettings()
 {
-static bool t = false;
-if ( t )
-{
 EnableChildTransparentMode();
 SetParentClipMode( ParentClipMode::NoClip );
 SetPaintTransparent( true );
-}
 SetBackground( );
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-11-01 Thread Libreoffice Gerrit user
 reportdesign/source/ui/dlg/DateTime.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit d611d5535b818854f9c6c6d4c144c2e5a9155a1a
Author: Caolán McNamara 
AuthorDate: Thu Nov 1 17:07:43 2018 +
Commit: Caolán McNamara 
CommitDate: Thu Nov 1 22:12:19 2018 +0100

Resolves: tdf#121097 need an initial call to CBClickHdl

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

diff --git a/reportdesign/source/ui/dlg/DateTime.cxx 
b/reportdesign/source/ui/dlg/DateTime.cxx
index 5b04a35d7870..9b91d657d4c0 100644
--- a/reportdesign/source/ui/dlg/DateTime.cxx
+++ b/reportdesign/source/ui/dlg/DateTime.cxx
@@ -72,6 +72,7 @@ ODateTimeDialog::ODateTimeDialog(weld::Window* _pParent, 
const uno::Reference< r
 weld::CheckButton* aCheckBoxes[] = { m_xDate.get(), m_xTime.get() };
 for (weld::CheckButton* pCheckBox : aCheckBoxes)
 pCheckBox->connect_toggled(LINK(this,ODateTimeDialog,CBClickHdl));
+CBClickHdl(*m_xTime);
 }
 
 void ODateTimeDialog::InsertEntry(sal_Int16 _nNumberFormatId)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-24 Thread Libreoffice Gerrit user
 reportdesign/source/core/api/ReportDefinition.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9320dc6615c8d745b1130aa6bf8de83a833e144b
Author: Julien Nabet 
AuthorDate: Sun Oct 21 00:43:04 2018 +0200
Commit: Julien Nabet 
CommitDate: Wed Oct 24 14:32:19 2018 +0200

ReportDesign: FooterBackGraphic may be void

Fix this message on console:
warn:xmloff:29095:29095:xmloff/source/core/xmlerror.cxx:170: An error or a 
warning has occurred during XML import/export!
Error-Id: 0x20040001
Flags: 2 ERROR
Class: 4 API
Number: 1
Parameters:
0: FooterBackGraphic
Exception-Message: The given value cannot be converted to the required 
property type. (property name "FooterBackGraphic", found value type "void", 
required property type "com.sun.star.graphic.XGraphic")
Position:
Public Identifier:
System Identifier:
Row, Column: 28,1

Change-Id: I630dcd77767a61ef82695d004a76e01a2d2e27d0
Reviewed-on: https://gerrit.libreoffice.org/62118
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/reportdesign/source/core/api/ReportDefinition.cxx 
b/reportdesign/source/core/api/ReportDefinition.cxx
index 7c0c278c167b..3469fda997fa 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -301,7 +301,7 @@ OStyle::OStyle()
 registerPropertyNoMember(SC_UNO_PAGE_FTRBACKCOL,  ++i,nBound, 
cppu::UnoType::get(), css::uno::makeAny(COL_TRANSPARENT));
 registerPropertyNoMember(SC_UNO_PAGE_FTRGRFFILT,  ++i,nBound, 
cppu::UnoType::get(), css::uno::Any(OUString()));
 registerPropertyNoMember(SC_UNO_PAGE_FTRGRFLOC,   ++i,nBound, 
cppu::UnoType::get(), 
css::uno::Any(style::GraphicLocation_NONE));
-registerPropertyNoMember(SC_UNO_PAGE_FTRGRF,  ++i,nBound, 
cppu::UnoType::get(), 
css::uno::Any(uno::Reference()));
+registerPropertyNoMember(SC_UNO_PAGE_FTRGRF,  ++i,nBound|nMayBeVoid, 
cppu::UnoType::get(), 
css::uno::Any(uno::Reference()));
 registerPropertyNoMember(SC_UNO_PAGE_FTRBACKTRAN, 
++i,nBound,cppu::UnoType::get(), css::uno::Any(true));
 registerPropertyNoMember(SC_UNO_PAGE_FTRBODYDIST, ++i,nBound, 
cppu::UnoType::get(), css::uno::makeAny(0));
 registerPropertyNoMember(SC_UNO_PAGE_FTRBRDDIST,  ++i,nBound, 
cppu::UnoType::get(), css::uno::makeAny(0));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-24 Thread Libreoffice Gerrit user
 reportdesign/source/ui/report/ReportController.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ea30f1ef54bbc2608b3793068e3cb1f86c1b3f69
Author: Julien Nabet 
AuthorDate: Sat Oct 20 18:40:38 2018 +0200
Commit: Julien Nabet 
CommitDate: Wed Oct 24 14:29:59 2018 +0200

tdf#120728: retrieve label page

See bt with:
https://bugs.documentfoundation.org/attachment.cgi?id=145860

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

diff --git a/reportdesign/source/ui/report/ReportController.cxx 
b/reportdesign/source/ui/report/ReportController.cxx
index 0cd2014bda84..dba6965a84df 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -3147,7 +3147,7 @@ void OReportController::createControl(const Sequence< 
PropertyValue >& _aArgs,co
 _nObjectId,
 SdrInventor::ReportDesign,
 OBJ_DLG_FIXEDTEXT,
-nullptr,
+pSectionWindow->getReportSection().getPage(),
 pSectionWindow->getReportSection().getPage(),
 
 // tdf#118963 Need a SdrModel for SdrObject creation. Dereferencing
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-24 Thread Libreoffice Gerrit user
 reportdesign/source/ui/report/DesignView.cxx |2 +-
 sd/source/ui/unoidl/unomodel.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 3516e1b2468b21fdab3332dfba5048d5fa845b07
Author: Johnny_M 
AuthorDate: Sat Oct 20 16:23:59 2018 +0200
Commit: Michael Stahl 
CommitDate: Wed Oct 24 10:08:46 2018 +0200

Translate German comments

Change-Id: I4e0150aac5a785ea2cb0884dede1596164a18af0
Reviewed-on: https://gerrit.libreoffice.org/62079
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/reportdesign/source/ui/report/DesignView.cxx 
b/reportdesign/source/ui/report/DesignView.cxx
index be9bc4c63b52..9efd610349ac 100644
--- a/reportdesign/source/ui/report/DesignView.cxx
+++ b/reportdesign/source/ui/report/DesignView.cxx
@@ -108,7 +108,7 @@ ODesignView::ODesignView(   vcl::Window* pParent,
 m_aSplitWin->InsertItem( COLSET_ID,100,SPLITWINDOW_APPEND, 0, 
SplitWindowItemFlags::PercentSize | SplitWindowItemFlags::ColSet );
 m_aSplitWin->InsertItem( REPORT_ID, m_aScrollWindow.get(), 100, 
SPLITWINDOW_APPEND, COLSET_ID, SplitWindowItemFlags::PercentSize);
 
-// Splitter einrichten
+// set up splitter
 m_aSplitWin->SetSplitHdl(LINK(this, ODesignView,SplitHdl));
 m_aSplitWin->SetAlign(WindowAlign::Left);
 m_aSplitWin->Show();
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 9a703bca5716..6d47265791e3 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -481,7 +481,7 @@ SdPage* SdXImpressDocument::InsertSdPage( sal_uInt16 nPage, 
bool bDuplicate )
 // this is only used for clipboard where we only have one page
 pStandardPage = mpDoc->AllocSdPage(false);
 
-Size aDefSize(21000, 29700);   // A4-Hochformat
+Size aDefSize(21000, 29700);   // A4 portrait orientation
 pStandardPage->SetSize( aDefSize );
 mpDoc->InsertPage(pStandardPage, 0);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-19 Thread Libreoffice Gerrit user
 reportdesign/source/ui/inspection/DefaultInspection.cxx |   30 ++--
 1 file changed, 5 insertions(+), 25 deletions(-)

New commits:
commit b25e2451d981878fbde636b66bfa48f13d21fa7e
Author: Noel Grandin 
AuthorDate: Thu Oct 18 19:04:20 2018 +0200
Commit: Noel Grandin 
CommitDate: Fri Oct 19 07:59:06 2018 +0200

simplify construction of Sequence

and don't bother with mutex when returning static data

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

diff --git a/reportdesign/source/ui/inspection/DefaultInspection.cxx 
b/reportdesign/source/ui/inspection/DefaultInspection.cxx
index 9ddb7ec0f3a4..2067652f413a 100644
--- a/reportdesign/source/ui/inspection/DefaultInspection.cxx
+++ b/reportdesign/source/ui/inspection/DefaultInspection.cxx
@@ -94,33 +94,13 @@ namespace rptui
 
 Sequence< Any > SAL_CALL 
DefaultComponentInspectorModel::getHandlerFactories()
 {
-::osl::MutexGuard aGuard( m_aMutex );
-
-
 // service names for all our handlers
-static const struct
-{
-const sal_Char* serviceName;
-} aFactories[] = {
-
-{ "com.sun.star.report.inspection.ReportComponentHandler"},
-{ "com.sun.star.form.inspection.EditPropertyHandler"},
-{ "com.sun.star.report.inspection.DataProviderHandler"},
-{ "com.sun.star.report.inspection.GeometryHandler"}
-
-// generic virtual edit properties
-
+return Sequence {
+Any(OUString( 
"com.sun.star.report.inspection.ReportComponentHandler")),
+Any(OUString( "com.sun.star.form.inspection.EditPropertyHandler")),
+Any(OUString( 
"com.sun.star.report.inspection.DataProviderHandler")),
+Any(OUString( "com.sun.star.report.inspection.GeometryHandler"))
 };
-
-const size_t nFactories = SAL_N_ELEMENTS( aFactories );
-Sequence< Any > aReturn( nFactories );
-Any* pReturn = aReturn.getArray();
-for (const auto& rFactory : aFactories)
-{
-*pReturn++ <<= OUString::createFromAscii( rFactory.serviceName );
-}
-
-return aReturn;
 }
 
 sal_Bool SAL_CALL DefaultComponentInspectorModel::getHasHelpSection()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-08 Thread Libreoffice Gerrit user
 reportdesign/source/ui/dlg/dlgpage.cxx|   14 -
 reportdesign/source/ui/inc/dlgpage.hxx|7 
 reportdesign/source/ui/misc/UITools.cxx   |8 
 reportdesign/source/ui/report/ReportController.cxx|8 
 reportdesign/uiconfig/dbreport/ui/backgrounddialog.ui |   56 -
 reportdesign/uiconfig/dbreport/ui/chardialog.ui   |  176 --
 reportdesign/uiconfig/dbreport/ui/pagedialog.ui   |   80 ++--
 7 files changed, 290 insertions(+), 59 deletions(-)

New commits:
commit ecc6180d8158a6b4d998807bc78f78b9efcea677
Author: Caolán McNamara 
AuthorDate: Sun Oct 7 19:14:41 2018 +0100
Commit: Caolán McNamara 
CommitDate: Mon Oct 8 10:13:15 2018 +0200

weld ORptPageDialog

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

diff --git a/reportdesign/source/ui/dlg/dlgpage.cxx 
b/reportdesign/source/ui/dlg/dlgpage.cxx
index fa2a38ff9da0..23ee7bd4f6f6 100644
--- a/reportdesign/source/ui/dlg/dlgpage.cxx
+++ b/reportdesign/source/ui/dlg/dlgpage.cxx
@@ -36,11 +36,9 @@ namespace rptui
 |*
 \/
 
-ORptPageDialog::ORptPageDialog( vcl::Window* pParent, const SfxItemSet* pAttr, 
const OUString )
-: SfxTabDialog (pParent, rDialog, "modules/dbreport/ui/" +
-rDialog.toAsciiLowerCase() +
-".ui", pAttr)
-, m_nCharBgdId(0)
+ORptPageDialog::ORptPageDialog(weld::Window* pParent, const SfxItemSet* pAttr, 
const OUString )
+: SfxTabDialogController(pParent, "modules/dbreport/ui/" +
+rDialog.toAsciiLowerCase() + ".ui", rDialog.toUtf8(), pAttr)
 {
 SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
 
@@ -59,7 +57,7 @@ ORptPageDialog::ORptPageDialog( vcl::Window* pParent, const 
SfxItemSet* pAttr, c
 AddTabPage("fonteffects", pFact->GetTabPageCreatorFunc( 
RID_SVXPAGE_CHAR_EFFECTS ), nullptr );
 AddTabPage("position", pFact->GetTabPageCreatorFunc( 
RID_SVXPAGE_CHAR_POSITION ), nullptr );
 AddTabPage("asianlayout", pFact->GetTabPageCreatorFunc( 
RID_SVXPAGE_CHAR_TWOLINES ), nullptr );
-m_nCharBgdId = AddTabPage("background", pFact->GetTabPageCreatorFunc( 
RID_SVXPAGE_BACKGROUND ), nullptr );
+AddTabPage("background", pFact->GetTabPageCreatorFunc( 
RID_SVXPAGE_BACKGROUND ), nullptr );
 AddTabPage("alignment", pFact->GetTabPageCreatorFunc( 
RID_SVXPAGE_ALIGNMENT ), nullptr );
 }
 else
@@ -70,10 +68,10 @@ ORptPageDialog::ORptPageDialog( vcl::Window* pParent, const 
SfxItemSet* pAttr, c
 RemoveTabPage("asianlayout");
 }
 
-void ORptPageDialog::PageCreated( sal_uInt16 nId, SfxTabPage  )
+void ORptPageDialog::PageCreated(const OString& rId, SfxTabPage )
 {
 SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
-if (nId == m_nCharBgdId)
+if (rId == "background")
 {
 
aSet.Put(SfxUInt32Item(SID_FLAG_TYPE,static_cast(SvxBackgroundTabFlags::SHOW_HIGHLIGHTING)));
 rPage.PageCreated(aSet);
diff --git a/reportdesign/source/ui/inc/dlgpage.hxx 
b/reportdesign/source/ui/inc/dlgpage.hxx
index 49d82cf32502..5bebf0958945 100644
--- a/reportdesign/source/ui/inc/dlgpage.hxx
+++ b/reportdesign/source/ui/inc/dlgpage.hxx
@@ -28,17 +28,16 @@ namespace rptui
 |* Page setup tab dialog
 |*
 \/
-class ORptPageDialog : public SfxTabDialog
+class ORptPageDialog : public SfxTabDialogController
 {
 private:
 ORptPageDialog(const ORptPageDialog&) = delete;
 void operator =(const ORptPageDialog&) = delete;
 
-sal_uInt16 m_nCharBgdId;
 public:
 
-ORptPageDialog(vcl::Window* pParent, const SfxItemSet* pAttr, const 
OUString );
-virtual void PageCreated( sal_uInt16 nId, SfxTabPage  ) override;
+ORptPageDialog(weld::Window* pParent, const SfxItemSet* pAttr, const 
OUString );
+virtual void PageCreated(const OString& rId, SfxTabPage ) override;
 };
 
 } // namespace rptui
diff --git a/reportdesign/source/ui/misc/UITools.cxx 
b/reportdesign/source/ui/misc/UITools.cxx
index 8bbfd8820fb0..48b509663757 100644
--- a/reportdesign/source/ui/misc/UITools.cxx
+++ b/reportdesign/source/ui/misc/UITools.cxx
@@ -710,16 +710,16 @@ bool openCharDialog( const 
uno::Reference& _rxRep
 lcl_CharPropertiesToItems( _rxReportControlFormat, *pDescriptor );
 
 {   // want the dialog to be destroyed before our set
-ScopedVclPtrInstance< ORptPageDialog > aDlg(pParent, 
pDescriptor.get(), "CharDialog");
+ORptPageDialog aDlg(Application::GetFrameWeld(_rxParentWindow), 
pDescriptor.get(), "CharDialog");
 uno::Reference< report::XShape > xShape( _rxReportControlFormat, 
uno::UNO_QUERY );
 if ( xShape.is() )
-aDlg->RemoveTabPage("background");
-bSuccess = ( RET_OK == 

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

2018-10-07 Thread Libreoffice Gerrit user
 reportdesign/source/ui/report/ReportSection.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 8b119b972b37a7e497091167bb6944a1c167f9bb
Author: Julien Nabet 
AuthorDate: Sun Sep 30 11:56:08 2018 +0200
Commit: Julien Nabet 
CommitDate: Sun Oct 7 18:09:37 2018 +0200

tdf#120151: fix crash in edit report

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

diff --git a/reportdesign/source/ui/report/ReportSection.cxx 
b/reportdesign/source/ui/report/ReportSection.cxx
index 8170adbdfe92..e64cee395cf5 100644
--- a/reportdesign/source/ui/report/ReportSection.cxx
+++ b/reportdesign/source/ui/report/ReportSection.cxx
@@ -353,6 +353,7 @@ void OReportSection::Copy(uno::Sequence< beans::NamedValue 
>& _rAllreadyCopiedOb
 try
 {
 SdrObject* 
pNewObj(pSdrObject->CloneSdrObject(pSdrObject->getSdrModelFromSdrObject()));
+m_pPage->NbcInsertObject(pNewObj);
 aCopies.emplace_back(pNewObj->getUnoShape(),uno::UNO_QUERY);
 if ( _bEraseAnddNoClone )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-09-26 Thread Libreoffice Gerrit user
 reportdesign/source/ui/inc/DesignView.hxx|2 +-
 reportdesign/source/ui/report/DesignView.cxx |8 
 2 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit faa2f029c16b8f25e88b054f22f69ef474fa289d
Author: Andrea Gelmini 
AuthorDate: Mon Sep 17 12:07:41 2018 +0200
Commit: Julien Nabet 
CommitDate: Wed Sep 26 16:38:26 2018 +0200

Fix _bToogleOn -> _bToggleOn

It passed "make check" on Linux

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

diff --git a/reportdesign/source/ui/inc/DesignView.hxx 
b/reportdesign/source/ui/inc/DesignView.hxx
index 07e01d0d2b79..fe9f7b20554e 100644
--- a/reportdesign/source/ui/inc/DesignView.hxx
+++ b/reportdesign/source/ui/inc/DesignView.hxx
@@ -172,7 +172,7 @@ namespace rptui
 */
 voidtoggleGrid(bool _bGridVisible);
 
-voidtogglePropertyBrowser(bool _bToogleOn);
+voidtogglePropertyBrowser(bool _bToggleOn);
 
 boolisAddFieldVisible() const;
 voidtoggleAddField();
diff --git a/reportdesign/source/ui/report/DesignView.cxx 
b/reportdesign/source/ui/report/DesignView.cxx
index 3c506a98a07d..be9bc4c63b52 100644
--- a/reportdesign/source/ui/report/DesignView.cxx
+++ b/reportdesign/source/ui/report/DesignView.cxx
@@ -418,21 +418,21 @@ void ODesignView::unmarkAllObjects()
 m_aScrollWindow->unmarkAllObjects();
 }
 
-void ODesignView::togglePropertyBrowser(bool _bToogleOn)
+void ODesignView::togglePropertyBrowser(bool _bToggleOn)
 {
-if ( !m_pPropWin && _bToogleOn )
+if ( !m_pPropWin && _bToggleOn )
 {
 m_pPropWin = VclPtr::Create(getController().getORB(), 
m_pTaskPane,this);
 m_pPropWin->Invalidate();
 
static_cast(m_pTaskPane.get())->setPropertyBrowser(m_pPropWin);
 
notifySystemWindow(this,m_pPropWin,::comphelper::mem_fun(::AddWindow));
 }
-if ( m_pPropWin && _bToogleOn != m_pPropWin->IsVisible() )
+if ( m_pPropWin && _bToggleOn != m_pPropWin->IsVisible() )
 {
 if ( !m_pCurrentView && !m_xReportComponent.is() )
 m_xReportComponent = getController().getReportDefinition();
 
-const bool bWillBeVisible = _bToogleOn;
+const bool bWillBeVisible = _bToggleOn;
 m_pPropWin->Show(bWillBeVisible);
 m_pTaskPane->Show(bWillBeVisible);
 m_pTaskPane->Invalidate();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-09-10 Thread Libreoffice Gerrit user
 reportdesign/source/ui/dlg/AddField.cxx |2 --
 reportdesign/source/ui/dlg/Condition.cxx|2 --
 reportdesign/source/ui/dlg/GroupsSorting.cxx|1 -
 reportdesign/source/ui/misc/UITools.cxx |2 +-
 reportdesign/source/ui/report/ReportSection.cxx |2 --
 reportdesign/source/ui/report/ScrollHelper.cxx  |1 -
 reportdesign/source/ui/report/dlgedfunc.cxx |1 -
 sal/qa/rtl/ref/rtl_ref.cxx  |2 +-
 sax/source/expatwrap/saxwriter.cxx  |3 +--
 sax/source/tools/CachedOutputStream.hxx |1 -
 10 files changed, 3 insertions(+), 14 deletions(-)

New commits:
commit 4b3430f27a01a256e268aa19d51f7c2e1a61534c
Author: Noel Grandin 
AuthorDate: Sun Sep 9 19:41:49 2018 +0200
Commit: Noel Grandin 
CommitDate: Mon Sep 10 11:34:25 2018 +0200

loplugin:simplifyconstruct in reportdesign..sax

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

diff --git a/reportdesign/source/ui/dlg/AddField.cxx 
b/reportdesign/source/ui/dlg/AddField.cxx
index 46b8850ac552..cb244049b9fe 100644
--- a/reportdesign/source/ui/dlg/AddField.cxx
+++ b/reportdesign/source/ui/dlg/AddField.cxx
@@ -153,8 +153,6 @@ OAddFieldWindow::OAddFieldWindow(vcl::Window* pParent 
,const uno::Reference< bea
 , 
m_pListBox(VclPtr::Create(get("box"), 
this))
 , m_nCommandType(0)
 , m_bEscapeProcessing(false)
-, m_pChangeListener(nullptr)
-, m_pContainerListener(nullptr)
 {
 get(m_aActions, "toolbox");
 m_nSortUpId = m_aActions->GetItemId(0);
diff --git a/reportdesign/source/ui/dlg/Condition.cxx 
b/reportdesign/source/ui/dlg/Condition.cxx
index 5aa87cd98d03..d3382478b766 100644
--- a/reportdesign/source/ui/dlg/Condition.cxx
+++ b/reportdesign/source/ui/dlg/Condition.cxx
@@ -108,8 +108,6 @@ Condition::Condition( vcl::Window* _pParent, 
IConditionalFormatAction& _rAction,
 , m_aColorWrapper(this)
 , m_rController(_rController)
 , m_rAction(_rAction)
-, m_pBtnUpdaterFontColor(nullptr)
-, m_pBtnUpdaterBackgroundColor(nullptr)
 , m_nCondIndex(0)
 , m_bInDestruction(false)
 {
diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx 
b/reportdesign/source/ui/dlg/GroupsSorting.cxx
index 816c5df9dcce..5858755c9f3e 100644
--- a/reportdesign/source/ui/dlg/GroupsSorting.cxx
+++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx
@@ -803,7 +803,6 @@ OGroupsSortingDialog::OGroupsSortingDialog(vcl::Window* 
_pParent, bool _bReadOnl
 : FloatingWindow(_pParent, "FloatingSort", 
"modules/dbreport/ui/floatingsort.ui")
 , OPropertyChangeListener(m_aMutex)
 , m_pController(_pController)
-, m_pCurrentGroupListener(nullptr)
 , m_xGroups(m_pController->getReportDefinition()->getGroups())
 , m_bReadOnly(_bReadOnly)
 {
diff --git a/reportdesign/source/ui/misc/UITools.cxx 
b/reportdesign/source/ui/misc/UITools.cxx
index ee453e217c60..af753020146d 100644
--- a/reportdesign/source/ui/misc/UITools.cxx
+++ b/reportdesign/source/ui/misc/UITools.cxx
@@ -176,7 +176,7 @@ void adjustSectionName(const uno::Reference< report::XGroup 
>& _xGroup,sal_Int32
 
 ::rtl::Reference< comphelper::OPropertyChangeMultiplexer> 
addStyleListener(const uno::Reference< report::XReportDefinition >& 
_xReportDefinition,::comphelper::OPropertyChangeListener* _pListener)
 {
-::rtl::Reference< comphelper::OPropertyChangeMultiplexer> pRet = nullptr;
+::rtl::Reference< comphelper::OPropertyChangeMultiplexer> pRet;
 if ( _xReportDefinition.is() )
 {
 uno::Reference 
xPageStyle(getUsedStyle(_xReportDefinition),uno::UNO_QUERY);
diff --git a/reportdesign/source/ui/report/ReportSection.cxx 
b/reportdesign/source/ui/report/ReportSection.cxx
index 07f6d4bf72c2..69129616d46e 100644
--- a/reportdesign/source/ui/report/ReportSection.cxx
+++ b/reportdesign/source/ui/report/ReportSection.cxx
@@ -82,8 +82,6 @@ OReportSection::OReportSection(OSectionWindow* _pParent,const 
uno::Reference< re
 , m_pPage(nullptr)
 , m_pView(nullptr)
 , m_pParent(_pParent)
-, m_pMulti(nullptr)
-, m_pReportListener(nullptr)
 , m_xSection(_xSection)
 , m_nPaintEntranceCount(0)
 , m_eMode(DlgEdMode::Select)
diff --git a/reportdesign/source/ui/report/ScrollHelper.cxx 
b/reportdesign/source/ui/report/ScrollHelper.cxx
index 12251126cea5..aeb340042b0e 100644
--- a/reportdesign/source/ui/report/ScrollHelper.cxx
+++ b/reportdesign/source/ui/report/ScrollHelper.cxx
@@ -50,7 +50,6 @@ OScrollWindowHelper::OScrollWindowHelper( ODesignView* 
_pDesignView)
 ,m_aCornerWin( VclPtr::Create(this) )
 ,m_pParent(_pDesignView)
 ,m_aReportWindow(VclPtr::Create(this,m_pParent))
-,m_pReportDefinitionMultiPlexer(nullptr)
 {
 SetMapMode( MapMode( MapUnit::Map100thMM ) );
 
diff --git a/reportdesign/source/ui/report/dlgedfunc.cxx 
b/reportdesign/source/ui/report/dlgedfunc.cxx
index 8226116cb32c..477abefed1d2 100644

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

2018-08-16 Thread Libreoffice Gerrit user
 reportdesign/source/ui/report/ReportController.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit c60ef370a39e91974a242c7f780d7d8725fea7da
Author: Julien Nabet 
AuthorDate: Thu Aug 16 07:30:39 2018 +0200
Commit: Noel Grandin 
CommitDate: Thu Aug 16 08:57:57 2018 +0200

Related tdf#117795: comment fix

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

diff --git a/reportdesign/source/ui/report/ReportController.cxx 
b/reportdesign/source/ui/report/ReportController.cxx
index 1a4964a2ed2c..57c38e54109a 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -4175,6 +4175,10 @@ bool 
OReportController::impl_setPropertyAtControls_throw(const char* pUndoResId,
 {
 const uno::Reference< beans::XPropertySet > 
xControlModel(*aIter,uno::UNO_QUERY);
 if ( xControlModel.is() )
+// tdf#117795: some elements may have not some property
+// eg class "OFixedLine" doesn't have property "CharFontName"
+// so in this case, instead of crashing when selecting all and 
changing font
+// just display a warning
 try
 {
 xControlModel->setPropertyValue(_sProperty,_aValue);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-15 Thread Libreoffice Gerrit user
 reportdesign/source/ui/report/ReportController.cxx |9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 3512079dc42a6472136f9c229fc9ea0b0033ebf9
Author: Julien Nabet 
AuthorDate: Sun Aug 12 11:39:04 2018 +0200
Commit: Julien Nabet 
CommitDate: Wed Aug 15 21:23:39 2018 +0200

tdf#117795: not all elements have ChartFontName property

See bt https://bugs.documentfoundation.org/attachment.cgi?id=144114
In this bugtracker we tried to apply a change of fontname on 
reportdesign::OFixedLine

Change-Id: I60ee5ca9f967fc71939e2f57ecd9de7edd680958
Reviewed-on: https://gerrit.libreoffice.org/58895
Reviewed-by: Noel Grandin 
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/reportdesign/source/ui/report/ReportController.cxx 
b/reportdesign/source/ui/report/ReportController.cxx
index 64373669f9b4..1a4964a2ed2c 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -4175,7 +4175,14 @@ bool 
OReportController::impl_setPropertyAtControls_throw(const char* pUndoResId,
 {
 const uno::Reference< beans::XPropertySet > 
xControlModel(*aIter,uno::UNO_QUERY);
 if ( xControlModel.is() )
-xControlModel->setPropertyValue(_sProperty,_aValue);
+try
+{
+xControlModel->setPropertyValue(_sProperty,_aValue);
+}
+catch(const UnknownPropertyException& e)
+{
+SAL_WARN("reportdesign", "UnknowPropertyException:" << e);
+}
 }
 
 return !aSelection.empty();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-14 Thread Libreoffice Gerrit user
 reportdesign/source/core/inc/conditionupdater.hxx  |2 +-
 reportdesign/source/core/misc/conditionupdater.cxx |8 +++-
 2 files changed, 4 insertions(+), 6 deletions(-)

New commits:
commit c50cd9678df2067b33f6c1d98600223a339b3225
Author: Noel Grandin 
AuthorDate: Mon Aug 13 13:40:32 2018 +0200
Commit: Noel Grandin 
CommitDate: Tue Aug 14 11:44:51 2018 +0200

loplugin:returnconstant in reportdesign

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

diff --git a/reportdesign/source/core/inc/conditionupdater.hxx 
b/reportdesign/source/core/inc/conditionupdater.hxx
index fd626a9d5a32..8102f67661f2 100644
--- a/reportdesign/source/core/inc/conditionupdater.hxx
+++ b/reportdesign/source/core/inc/conditionupdater.hxx
@@ -42,7 +42,7 @@ namespace rptui
 
 private:
 /// does late initializations, return whether or not successful
-bool impl_lateInit_nothrow();
+void impl_lateInit_nothrow();
 
 void impl_adjustFormatConditions_nothrow(
 const css::uno::Reference< css::report::XReportControlModel >& 
_rxRptControlModel,
diff --git a/reportdesign/source/core/misc/conditionupdater.cxx 
b/reportdesign/source/core/misc/conditionupdater.cxx
index ded43a57cdc0..59714ac22556 100644
--- a/reportdesign/source/core/misc/conditionupdater.cxx
+++ b/reportdesign/source/core/misc/conditionupdater.cxx
@@ -52,8 +52,7 @@ namespace rptui
 
 void ConditionUpdater::notifyPropertyChange( const PropertyChangeEvent& 
_rEvent )
 {
-if ( !impl_lateInit_nothrow() )
-return;
+impl_lateInit_nothrow();
 
 Reference< XReportControlModel > xRptControlModel( _rEvent.Source, 
UNO_QUERY );
 if ( xRptControlModel.is() && _rEvent.PropertyName == "DataField" )
@@ -66,13 +65,12 @@ namespace rptui
 }
 
 
-bool ConditionUpdater::impl_lateInit_nothrow()
+void ConditionUpdater::impl_lateInit_nothrow()
 {
 if ( !m_aConditionalExpressions.empty() )
-return true;
+return;
 
 ConditionalExpressionFactory::getKnownConditionalExpressions( 
m_aConditionalExpressions );
-return true;
 }
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-02 Thread Libreoffice Gerrit user
 reportdesign/source/core/sdr/RptObject.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c8d8fdeadcb34cb5ff4fdd8368d1b92a710c0bd6
Author: Julien Nabet 
AuthorDate: Tue Jul 3 20:18:39 2018 +0200
Commit: Julien Nabet 
CommitDate: Thu Aug 2 19:25:58 2018 +0200

Reportdesign: try to fix EndListening

Looking at history:
2014-05-02:
reportdesign: sal_Bool->bool
e23c98d713ababb72de0616831a2abe0e48387f5

2008-06-16:
INTEGRATION: CWS rptchart02 (1.7.4); FILE MERGED
2008/05/16 12:53:21 oj 1.7.4.6: #i89365# copy props before set args at 
chart
2008/05/07 06:56:32 oj 1.7.4.5: #i88842# set databaseprovider at chart
2008/04/30 13:03:34 oj 1.7.4.4: #i88843# impl clone method
2008/04/16 06:28:15 oj 1.7.4.3: RESYNC: (1.7-1.8); FILE MERGED
2008/04/03 06:35:18 oj 1.7.4.2: #i86343# remove unused code
2008/03/12 09:45:16 oj 1.7.4.1: impl chart handling
b8fe847a46f2a51e3e9653eb254e4254883496f7
@@ -299,10 +297,9 @@ void OObjectBase::EndListening(sal_Bool 
/*bRemoveListener*/)
 DBG_CHKTHIS( rpt_OObjectBase,NULL);
 OSL_ENSURE(!m_xReportComponent.is() || isListening(), 
"OUnoObject::EndListening: not listening currently!");

+m_bIsListening = sal_False;
 if ( isListening() && m_xReportComponent.is() )
 {
-m_bIsListening = sal_False;
-
 // XPropertyChangeListener
 if ( m_xPropertyChangeListener.is() )
 {
Since isListening() returns the value of m_bIsListening
(see 
https://opengrok.libreoffice.org/xref/core/reportdesign/inc/RptObject.hxx#79)
quite suspicious.

We may think that "m_bIsListening = false;" should be put if we succeed in 
removing the listener
382  if ( isListening() && m_xReportComponent.is() )
383  {
384  // XPropertyChangeListener
385  if ( m_xPropertyChangeListener.is() )
386  {
387  // remove listener
388  try
389  {
390  m_xReportComponent->removePropertyChangeListener( 
OUString() , m_xPropertyChangeListener );
391  }
392  catch(const uno::Exception &)
393  {
394  OSL_FAIL("OObjectBase::EndListening: Exception 
caught!");
395  }
396  }
397  m_xPropertyChangeListener.clear();
398  }
Either in the try after the remove or in a finally if we don't want to care 
about catch part.
(see 
https://opengrok.libreoffice.org/xref/core/reportdesign/source/core/sdr/RptObject.cxx#377)
But considering the 2008 commit and the former state before it, it seems it 
was on purpose to put m_bIsListening in all cases so...

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

diff --git a/reportdesign/source/core/sdr/RptObject.cxx 
b/reportdesign/source/core/sdr/RptObject.cxx
index bd1ee71782d1..2ed954af9ead 100644
--- a/reportdesign/source/core/sdr/RptObject.cxx
+++ b/reportdesign/source/core/sdr/RptObject.cxx
@@ -378,7 +378,6 @@ void OObjectBase::EndListening()
 {
 OSL_ENSURE(!m_xReportComponent.is() || isListening(), 
"OUnoObject::EndListening: not listening currently!");
 
-m_bIsListening = false;
 if ( isListening() && m_xReportComponent.is() )
 {
 // XPropertyChangeListener
@@ -396,6 +395,7 @@ void OObjectBase::EndListening()
 }
 m_xPropertyChangeListener.clear();
 }
+m_bIsListening = false;
 }
 
 void OObjectBase::SetPropsFromRect(const tools::Rectangle& _rRect)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-05-21 Thread Caolán McNamara
 reportdesign/source/ui/dlg/DateTime.cxx |  143 
 reportdesign/source/ui/inc/DateTime.hxx |   39 ++---
 reportdesign/source/ui/report/ReportController.cxx  |4 
 reportdesign/uiconfig/dbreport/ui/datetimedialog.ui |   16 +-
 4 files changed, 88 insertions(+), 114 deletions(-)

New commits:
commit 4da8aef20416d0e1320a1ee455e2edc2ae61f9ac
Author: Caolán McNamara 
Date:   Mon May 21 12:05:55 2018 +0100

weld ODateTimeDialog

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

diff --git a/reportdesign/source/ui/dlg/DateTime.cxx 
b/reportdesign/source/ui/dlg/DateTime.cxx
index c1b4e23e01b9..69f5cd531e05 100644
--- a/reportdesign/source/ui/dlg/DateTime.cxx
+++ b/reportdesign/source/ui/dlg/DateTime.cxx
@@ -40,25 +40,20 @@ using namespace ::comphelper;
 
 // class ODateTimeDialog
 
-ODateTimeDialog::ODateTimeDialog( vcl::Window* _pParent
-   ,const uno::Reference< 
report::XSection >& _xHoldAlive
-   ,OReportController* _pController)
-: ModalDialog( _pParent, "DateTimeDialog" , 
"modules/dbreport/ui/datetimedialog.ui" )
+ODateTimeDialog::ODateTimeDialog(weld::Window* _pParent, const uno::Reference< 
report::XSection >& _xHoldAlive,
+ OReportController* _pController)
+: GenericDialogController(_pParent, 
"modules/dbreport/ui/datetimedialog.ui", "DateTimeDialog")
 
-, m_aDateControlling()
-, m_aTimeControlling()
 , m_pController(_pController)
 , m_xHoldAlive(_xHoldAlive)
+, m_xDate(m_xBuilder->weld_check_button("date"))
+, m_xFTDateFormat(m_xBuilder->weld_label("datelistbox_label"))
+, m_xDateListBox(m_xBuilder->weld_combo_box_text("datelistbox"))
+, m_xTime(m_xBuilder->weld_check_button("time"))
+, m_xFTTimeFormat(m_xBuilder->weld_label("timelistbox_label"))
+, m_xTimeListBox(m_xBuilder->weld_combo_box_text("timelistbox"))
+, m_xPB_OK(m_xBuilder->weld_button("ok"))
 {
-get(m_pDate,"date");
-get(m_pFTDateFormat,"datelistbox_label");
-get(m_pDateListBox,"datelistbox");
-get(m_pTime,"time");
-get(m_pFTTimeFormat,"timelistbox_label");
-get(m_pTimeListBox,"timelistbox");
-get(m_pPB_OK,"ok");
-
-
 try
 {
 SvtSysLocale aSysLocale;
@@ -71,60 +66,36 @@ ODateTimeDialog::ODateTimeDialog( vcl::Window* _pParent
 {
 }
 
-m_pDateListBox->SelectEntryPos(0);
-
-m_pTimeListBox->SelectEntryPos(0);
-
-// use nice enhancement, to toggle enable/disable if a checkbox is checked 
or not
-m_aDateControlling.enableOnCheckMark( *m_pDate, *m_pFTDateFormat, 
*m_pDateListBox);
-m_aTimeControlling.enableOnCheckMark( *m_pTime, *m_pFTTimeFormat, 
*m_pTimeListBox);
-
-CheckBox* aCheckBoxes[] = { m_pDate,m_pTime};
-for (CheckBox* pCheckBox : aCheckBoxes)
-pCheckBox->SetClickHdl(LINK(this,ODateTimeDialog,CBClickHdl));
+m_xDateListBox->set_active(0);
+m_xTimeListBox->set_active(0);
 
+weld::CheckButton* aCheckBoxes[] = { m_xDate.get(), m_xTime.get() };
+for (weld::CheckButton* pCheckBox : aCheckBoxes)
+pCheckBox->connect_toggled(LINK(this,ODateTimeDialog,CBClickHdl));
 }
 
-void ODateTimeDialog::InsertEntry(sal_Int16 _nNumberFormatId)
+void ODateTimeDialog::InsertEntry(sal_Int16 _nNumberFormatId)
+{
+const bool bTime = util::NumberFormat::TIME == _nNumberFormatId;
+weld::ComboBoxText* pListBox = m_xDateListBox.get();
+if (bTime)
+pListBox = m_xTimeListBox.get();
+
+const uno::Reference< util::XNumberFormatter> xNumberFormatter = 
m_pController->getReportNumberFormatter();
+const uno::Reference< util::XNumberFormats> xFormats = 
xNumberFormatter->getNumberFormatsSupplier()->getNumberFormats();
+const uno::Sequence aFormatKeys = 
xFormats->queryKeys(_nNumberFormatId,m_nLocale,true);
+const sal_Int32* pIter = aFormatKeys.getConstArray();
+const sal_Int32* pEnd  = pIter + aFormatKeys.getLength();
+for (;pIter != pEnd; ++pIter)
 {
-const bool bTime = util::NumberFormat::TIME == _nNumberFormatId;
-ListBox* pListBox = m_pDateListBox;
-if ( bTime )
-pListBox = m_pTimeListBox;
-
-const uno::Reference< util::XNumberFormatter> xNumberFormatter = 
m_pController->getReportNumberFormatter();
-const uno::Reference< util::XNumberFormats> xFormats = 
xNumberFormatter->getNumberFormatsSupplier()->getNumberFormats();
-const uno::Sequence aFormatKeys = 
xFormats->queryKeys(_nNumberFormatId,m_nLocale,true);
-const sal_Int32* pIter = aFormatKeys.getConstArray();
-const sal_Int32* pEnd  = pIter + aFormatKeys.getLength();
-for(;pIter != pEnd;++pIter)
-{
-const 

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

2018-05-17 Thread Rene Engelhard
 reportdesign/source/filter/xml/xmlControlProperty.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit ef714b7337877dd9f8c505e4918dae9df09fa6fb
Author: Rene Engelhard 
Date:   Thu May 17 21:51:49 2018 +

fix build in reportdesign

after 649313625b94e6b879848fc19b607b74375100bf. Remove stray (void)dummy;

Change-Id: I73cdcfc04116c4c070e3dda80c25cc9ca52eab95

diff --git a/reportdesign/source/filter/xml/xmlControlProperty.cxx 
b/reportdesign/source/filter/xml/xmlControlProperty.cxx
index a4f0741448b3..e7009a0eca24 100644
--- a/reportdesign/source/filter/xml/xmlControlProperty.cxx
+++ b/reportdesign/source/filter/xml/xmlControlProperty.cxx
@@ -275,7 +275,6 @@ Any OXMLControlProperty::convertString(const 
css::uno::Type& _rExpectedType, con
 {
 OSL_ENSURE(std::modf(nValue, 
::temporary(double())) == 0,
 "OPropertyImport::convertString: a Date value 
with a fractional part?");
-(void)dummy;
 aReturn <<= implGetDate(nValue);
 }
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-05-17 Thread Noel Grandin
 reportdesign/source/filter/xml/xmlControlProperty.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit ef74b2ea5691ef9465b8f523030c039f6f0d8688
Author: Noel Grandin 
Date:   Thu May 17 12:00:02 2018 +0200

unreferenced local variable

Change-Id: Ie212f26b88ed5cf08bbc72a278adce3cdf04c400

diff --git a/reportdesign/source/filter/xml/xmlControlProperty.cxx 
b/reportdesign/source/filter/xml/xmlControlProperty.cxx
index c232a44d6019..e14b86e0e6dc 100644
--- a/reportdesign/source/filter/xml/xmlControlProperty.cxx
+++ b/reportdesign/source/filter/xml/xmlControlProperty.cxx
@@ -275,6 +275,7 @@ Any OXMLControlProperty::convertString(const 
css::uno::Type& _rExpectedType, con
 double dummy;
 OSL_ENSURE(std::modf(nValue, ) == 0,
 "OPropertyImport::convertString: a Date value 
with a fractional part?");
+(void)dummy;
 aReturn <<= implGetDate(nValue);
 }
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-04-19 Thread Gabor Kelemen
 reportdesign/source/core/api/Section.cxx|2 --
 reportdesign/source/ui/dlg/DateTime.cxx |1 -
 reportdesign/source/ui/dlg/PageNumber.cxx   |1 -
 reportdesign/source/ui/report/DesignView.cxx|1 -
 reportdesign/source/ui/report/ReportSection.cxx |1 -
 reportdesign/source/ui/report/StartMarker.cxx   |1 -
 6 files changed, 7 deletions(-)

New commits:
commit e24a059906c9b7f399f0afcbfdcd5dd1aa663973
Author: Gabor Kelemen 
Date:   Wed Mar 28 23:22:40 2018 +0200

tdf#42949 Remove unnecessary localization headers from reportdesign

Found by searching for the header names and the localization function:
git grep -l -e \ -e \ reportdesign/ | 
xargs grep -c RptResId | grep :0$ | grep -v /pch
A few false positives were omitted from the commit.

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

diff --git a/reportdesign/source/core/api/Section.cxx 
b/reportdesign/source/core/api/Section.cxx
index f1c4163e783e..9c53b15393c7 100644
--- a/reportdesign/source/core/api/Section.cxx
+++ b/reportdesign/source/core/api/Section.cxx
@@ -26,8 +26,6 @@
 #include 
 #include 
 #include 
-#include 
-#include 
 #include 
 #include 
 #include 
diff --git a/reportdesign/source/ui/dlg/DateTime.cxx 
b/reportdesign/source/ui/dlg/DateTime.cxx
index c1856bda9b97..c1b4e23e01b9 100644
--- a/reportdesign/source/ui/dlg/DateTime.cxx
+++ b/reportdesign/source/ui/dlg/DateTime.cxx
@@ -18,7 +18,6 @@
  */
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/reportdesign/source/ui/dlg/PageNumber.cxx 
b/reportdesign/source/ui/dlg/PageNumber.cxx
index 0a70b5205ff6..27fb930b1205 100644
--- a/reportdesign/source/ui/dlg/PageNumber.cxx
+++ b/reportdesign/source/ui/dlg/PageNumber.cxx
@@ -18,7 +18,6 @@
  */
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/reportdesign/source/ui/report/DesignView.cxx 
b/reportdesign/source/ui/report/DesignView.cxx
index b7d5c3fbac60..ca03d1e997ff 100644
--- a/reportdesign/source/ui/report/DesignView.cxx
+++ b/reportdesign/source/ui/report/DesignView.cxx
@@ -37,7 +37,6 @@
 #include 
 #include 
 #include 
-#include 
 
 #include 
 #include 
diff --git a/reportdesign/source/ui/report/ReportSection.cxx 
b/reportdesign/source/ui/report/ReportSection.cxx
index 27e467105424..3acc54f2bb4a 100644
--- a/reportdesign/source/ui/report/ReportSection.cxx
+++ b/reportdesign/source/ui/report/ReportSection.cxx
@@ -49,7 +49,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/reportdesign/source/ui/report/StartMarker.cxx 
b/reportdesign/source/ui/report/StartMarker.cxx
index af7abc6f75ac..bbef83148b4a 100644
--- a/reportdesign/source/ui/report/StartMarker.cxx
+++ b/reportdesign/source/ui/report/StartMarker.cxx
@@ -19,7 +19,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-04-13 Thread Stephan Bergmann
 reportdesign/source/core/api/ReportDefinition.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9baf9a80ac267a2382aac2b6fe7e7a61528231c5
Author: Stephan Bergmann 
Date:   Fri Apr 13 10:34:15 2018 +0200

-Werror,-Wself-assign

Looks like this was a typo ever since the code's introduction in
77cc7cfa1c76b3669791f4c77cc837035c378217 "INTEGRATION: CWS rptwizard01" (and
then changed again in d1ea6ecda68bf65b8d90e9ea17fa0a218a92b016 "replace <<= 
with
assign for <<= with rhs Any").

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

diff --git a/reportdesign/source/core/api/ReportDefinition.cxx 
b/reportdesign/source/core/api/ReportDefinition.cxx
index 7226f9a1e5ab..0df0186fee5b 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -1607,7 +1607,7 @@ void SAL_CALL OReportDefinition::load( const 
uno::Sequence< beans::PropertyValue
 
 uno::Any aStorageSource;
 if ( xStream.is() )
-aStorageSource = aStorageSource;
+aStorageSource <<= xStream;
 else if ( !sURL.isEmpty() )
 aStorageSource <<= sURL;
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-03-09 Thread Tomaž Vajngerl
 reportdesign/source/core/api/ReportDefinition.cxx |4 
 sc/inc/unonames.hxx   |2 --
 sc/source/ui/unoobj/styleuno.cxx  |2 --
 svx/source/form/formcontrolfactory.cxx|2 +-
 sw/inc/unoprnms.hxx   |3 ---
 5 files changed, 1 insertion(+), 12 deletions(-)

New commits:
commit 1dc39d36806cc9382763bfd0b74e3d28e3fa1365
Author: Tomaž Vajngerl 
Date:   Fri Mar 9 14:50:09 2018 +0900

remove references to {Header,Footer,Para}GraphicURL

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

diff --git a/reportdesign/source/core/api/ReportDefinition.cxx 
b/reportdesign/source/core/api/ReportDefinition.cxx
index 48d911541b2a..09d9f2105a71 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -144,7 +144,6 @@
 #define SC_UNO_PAGE_HDRBACKTRAN "HeaderBackTransparent"
 #define SC_UNO_PAGE_HDRGRFFILT  "HeaderBackGraphicFilter"
 #define SC_UNO_PAGE_HDRGRFLOC   "HeaderBackGraphicLocation"
-#define SC_UNO_PAGE_HDRGRFURL   "HeaderBackGraphicURL"
 #define SC_UNO_PAGE_HDRGRF  "HeaderBackGraphic"
 #define SC_UNO_PAGE_HDRLEFTBOR  "HeaderLeftBorder"
 #define SC_UNO_PAGE_HDRRIGHTBOR "HeaderRightBorder"
@@ -167,7 +166,6 @@
 #define SC_UNO_PAGE_FTRBACKTRAN "FooterBackTransparent"
 #define SC_UNO_PAGE_FTRGRFFILT  "FooterBackGraphicFilter"
 #define SC_UNO_PAGE_FTRGRFLOC   "FooterBackGraphicLocation"
-#define SC_UNO_PAGE_FTRGRFURL   "FooterBackGraphicURL"
 #define SC_UNO_PAGE_FTRGRF  "FooterBackGraphic"
 #define SC_UNO_PAGE_FTRLEFTBOR  "FooterLeftBorder"
 #define SC_UNO_PAGE_FTRRIGHTBOR "FooterRightBorder"
@@ -305,7 +303,6 @@ OStyle::OStyle()
 registerPropertyNoMember(SC_UNO_PAGE_FTRBACKCOL,  ++i,nBound, 
cppu::UnoType::get(), css::uno::makeAny(COL_TRANSPARENT));
 registerPropertyNoMember(SC_UNO_PAGE_FTRGRFFILT,  ++i,nBound, 
cppu::UnoType::get(), css::uno::Any(OUString()));
 registerPropertyNoMember(SC_UNO_PAGE_FTRGRFLOC,   ++i,nBound, 
cppu::UnoType::get(), 
css::uno::Any(style::GraphicLocation_NONE));
-registerPropertyNoMember(SC_UNO_PAGE_FTRGRFURL,   ++i,nBound, 
cppu::UnoType::get(), css::uno::Any(OUString()));
 registerPropertyNoMember(SC_UNO_PAGE_FTRGRF,  ++i,nBound, 
cppu::UnoType::get(), 
css::uno::Any(uno::Reference()));
 registerPropertyNoMember(SC_UNO_PAGE_FTRBACKTRAN, 
++i,nBound,cppu::UnoType::get(), css::uno::Any(true));
 registerPropertyNoMember(SC_UNO_PAGE_FTRBODYDIST, ++i,nBound, 
cppu::UnoType::get(), css::uno::makeAny(0));
@@ -329,7 +326,6 @@ OStyle::OStyle()
 registerPropertyNoMember(SC_UNO_PAGE_HDRBACKCOL,  ++i,nBound|nMayBeVoid, 
cppu::UnoType::get(), css::uno::makeAny(COL_TRANSPARENT));
 registerPropertyNoMember(SC_UNO_PAGE_HDRGRFFILT,  ++i,nBound|nMayBeVoid, 
cppu::UnoType::get(), css::uno::Any(OUString()));
 registerPropertyNoMember(SC_UNO_PAGE_HDRGRFLOC,   ++i,nBound|nMayBeVoid, 
cppu::UnoType::get(), 
css::uno::Any(style::GraphicLocation_NONE));
-registerPropertyNoMember(SC_UNO_PAGE_HDRGRFURL,   ++i,nBound|nMayBeVoid, 
cppu::UnoType::get(), css::uno::Any(OUString()));
 registerPropertyNoMember(SC_UNO_PAGE_HDRGRF,  ++i,nBound|nMayBeVoid, 
cppu::UnoType::get(), 
css::uno::Any(uno::Reference()));
 registerPropertyNoMember(SC_UNO_PAGE_HDRBACKTRAN, 
++i,nBound|nMayBeVoid,cppu::UnoType::get(), css::uno::Any(true));
 registerPropertyNoMember(SC_UNO_PAGE_HDRBODYDIST, ++i,nBound|nMayBeVoid, 
cppu::UnoType::get(), css::uno::makeAny(0));
diff --git a/sc/inc/unonames.hxx b/sc/inc/unonames.hxx
index 7e6efaa432d4..e7f92a01e3e4 100644
--- a/sc/inc/unonames.hxx
+++ b/sc/inc/unonames.hxx
@@ -451,7 +451,6 @@
 #define SC_UNO_PAGE_HDRBACKTRAN "HeaderBackTransparent"
 #define SC_UNO_PAGE_HDRGRFFILT  "HeaderBackGraphicFilter"
 #define SC_UNO_PAGE_HDRGRFLOC   "HeaderBackGraphicLocation"
-#define SC_UNO_PAGE_HDRGRFURL   "HeaderBackGraphicURL"
 #define SC_UNO_PAGE_HDRGRF  "HeaderBackGraphic"
 #define SC_UNO_PAGE_HDRLEFTBOR  "HeaderLeftBorder"
 #define SC_UNO_PAGE_HDRRIGHTBOR "HeaderRightBorder"
@@ -474,7 +473,6 @@
 #define SC_UNO_PAGE_FTRBACKTRAN "FooterBackTransparent"
 #define SC_UNO_PAGE_FTRGRFFILT  "FooterBackGraphicFilter"
 #define SC_UNO_PAGE_FTRGRFLOC   "FooterBackGraphicLocation"
-#define SC_UNO_PAGE_FTRGRFURL   "FooterBackGraphicURL"
 #define SC_UNO_PAGE_FTRGRF  "FooterBackGraphic"
 #define SC_UNO_PAGE_FTRLEFTBOR  "FooterLeftBorder"
 #define SC_UNO_PAGE_FTRRIGHTBOR "FooterRightBorder"
diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx
index 61f3f56cc2be..1dc1c7b7136c 100644
--- a/sc/source/ui/unoobj/styleuno.cxx
+++ 

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

2018-03-07 Thread Noel Grandin
 reportdesign/source/ui/dlg/Condition.cxx  |4 ++--
 reportdesign/source/ui/inc/FixedTextColor.hxx |3 ++-
 reportdesign/source/ui/inspection/GeometryHandler.cxx |2 +-
 reportdesign/source/ui/misc/UITools.cxx   |   10 +-
 reportdesign/source/ui/report/FixedTextColor.cxx  |   10 +-
 reportdesign/source/ui/report/ReportController.cxx|4 ++--
 reportdesign/source/ui/report/ReportSection.cxx   |4 ++--
 7 files changed, 19 insertions(+), 18 deletions(-)

New commits:
commit 82bea50f1ba18a32b175b495b61701a4c148c753
Author: Noel Grandin 
Date:   Wed Mar 7 08:29:24 2018 +0200

use more Color in reportdesign

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

diff --git a/reportdesign/source/ui/dlg/Condition.cxx 
b/reportdesign/source/ui/dlg/Condition.cxx
index 1110e9aef21a..4f147933d6e3 100644
--- a/reportdesign/source/ui/dlg/Condition.cxx
+++ b/reportdesign/source/ui/dlg/Condition.cxx
@@ -402,9 +402,9 @@ void Condition::updateToolbar(const uno::Reference< 
report::XReportControlFormat
 aFont.SetFontHeight(OutputDevice::LogicToLogic(Size(0, 
aFont.GetFontHeight()), MapMode(MapUnit::MapPoint), 
MapMode(MapUnit::MapTwip)).Height());
 aFont.SetEmphasisMark( static_cast< FontEmphasisMark >( 
_xReportControlFormat->getControlTextEmphasis() ) );
 aFont.SetRelief( static_cast< FontRelief >( 
_xReportControlFormat->getCharRelief() ) );
-aFont.SetColor( _xReportControlFormat->getCharColor() );
+aFont.SetColor( Color(_xReportControlFormat->getCharColor()) );
 m_pPreview->SetFont( aFont, aFont, aFont );
-m_pPreview->SetBackColor( 
_xReportControlFormat->getControlBackground() );
+m_pPreview->SetBackColor( 
Color(_xReportControlFormat->getControlBackground()) );
 m_pPreview->SetTextLineColor( Color( 
_xReportControlFormat->getCharUnderlineColor() ) );
 }
 catch( const Exception& )
diff --git a/reportdesign/source/ui/inc/FixedTextColor.hxx 
b/reportdesign/source/ui/inc/FixedTextColor.hxx
index 31e317df3be5..6c0f1d88cc7b 100644
--- a/reportdesign/source/ui/inc/FixedTextColor.hxx
+++ b/reportdesign/source/ui/inc/FixedTextColor.hxx
@@ -26,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include "IReportControllerObserver.hxx"
 #include 
@@ -43,7 +44,7 @@ namespace rptui
 /// @throws css::uno::RuntimeException
 css::uno::Reference< css::awt::XControl > getXControl(const 
css::uno::Reference< css::report::XFixedText >& _xFixedText);
 
-static void setPropertyTextColor(const css::uno::Reference< 
css::awt::XVclWindowPeer >& _xVclWindowPeer, sal_Int32 _nFormatKey);
+static void setPropertyTextColor(const css::uno::Reference< 
css::awt::XVclWindowPeer >& _xVclWindowPeer, Color _nFormatKey);
 
 public:
 FixedTextColor(const OReportController & _aObserver);
diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx 
b/reportdesign/source/ui/inspection/GeometryHandler.cxx
index 7643320646fb..012a35b8520a 100644
--- a/reportdesign/source/ui/inspection/GeometryHandler.cxx
+++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx
@@ -972,7 +972,7 @@ uno::Any SAL_CALL 
GeometryHandler::convertToPropertyValue(const OUString & Prope
 case PROPERTY_ID_CONTROLBACKGROUND:
 if ( !_rControlValue.hasValue() )
 {
-aPropertyValue <<= static_cast(COL_TRANSPARENT);
+aPropertyValue <<= COL_TRANSPARENT;
 break;
 }
 SAL_FALLTHROUGH;
diff --git a/reportdesign/source/ui/misc/UITools.cxx 
b/reportdesign/source/ui/misc/UITools.cxx
index 309edb5f3b7d..55eb29e1109d 100644
--- a/reportdesign/source/ui/misc/UITools.cxx
+++ b/reportdesign/source/ui/misc/UITools.cxx
@@ -339,7 +339,7 @@ namespace
 
_rItemSet.Put(SvxCharHiddenItem(_rxReportControlFormat->getCharHidden(),ITEMID_CHARHIDDEN));
 
_rItemSet.Put(SvxTwoLinesItem(_rxReportControlFormat->getCharCombineIsOn(),_rxReportControlFormat->getCharCombinePrefix().toChar(),_rxReportControlFormat->getCharCombineSuffix().toChar(),ITEMID_TWOLINES));
 SvxUnderlineItem aUnderLineItem(aFont.GetUnderline(),ITEMID_UNDERLINE);
-
aUnderLineItem.SetColor(_rxReportControlFormat->getCharUnderlineColor());
+
aUnderLineItem.SetColor(Color(_rxReportControlFormat->getCharUnderlineColor()));
 _rItemSet.Put(aUnderLineItem);
 
_rItemSet.Put(SvxKerningItem(_rxReportControlFormat->getCharKerning(),ITEMID_KERNING));
 
_rItemSet.Put(SvxEmphasisMarkItem(static_cast(_rxReportControlFormat->getCharEmphasis()),ITEMID_EMPHASISMARK));
@@ -430,7 +430,7 @@ namespace
 if ( SfxItemState::SET == _rItemSet.GetItemState( 

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

2018-02-28 Thread Tomaž Vajngerl
 reportdesign/source/core/api/ReportDefinition.cxx |4 
 sc/inc/unonames.hxx   |3 +++
 sc/source/ui/unoobj/styleuno.cxx  |5 +
 3 files changed, 12 insertions(+)

New commits:
commit d64ce643275e0b2b0dea9e532fc261391dc8793c
Author: Tomaž Vajngerl 
Date:   Wed Feb 28 09:16:48 2018 +0900

sc: add props. BackGraphic as replacement for BackGraphicURL

...and also add and adjust in the report designer

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

diff --git a/reportdesign/source/core/api/ReportDefinition.cxx 
b/reportdesign/source/core/api/ReportDefinition.cxx
index d1d24803159c..48d911541b2a 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -145,6 +145,7 @@
 #define SC_UNO_PAGE_HDRGRFFILT  "HeaderBackGraphicFilter"
 #define SC_UNO_PAGE_HDRGRFLOC   "HeaderBackGraphicLocation"
 #define SC_UNO_PAGE_HDRGRFURL   "HeaderBackGraphicURL"
+#define SC_UNO_PAGE_HDRGRF  "HeaderBackGraphic"
 #define SC_UNO_PAGE_HDRLEFTBOR  "HeaderLeftBorder"
 #define SC_UNO_PAGE_HDRRIGHTBOR "HeaderRightBorder"
 #define SC_UNO_PAGE_HDRBOTTBOR  "HeaderBottomBorder"
@@ -167,6 +168,7 @@
 #define SC_UNO_PAGE_FTRGRFFILT  "FooterBackGraphicFilter"
 #define SC_UNO_PAGE_FTRGRFLOC   "FooterBackGraphicLocation"
 #define SC_UNO_PAGE_FTRGRFURL   "FooterBackGraphicURL"
+#define SC_UNO_PAGE_FTRGRF  "FooterBackGraphic"
 #define SC_UNO_PAGE_FTRLEFTBOR  "FooterLeftBorder"
 #define SC_UNO_PAGE_FTRRIGHTBOR "FooterRightBorder"
 #define SC_UNO_PAGE_FTRBOTTBOR  "FooterBottomBorder"
@@ -304,6 +306,7 @@ OStyle::OStyle()
 registerPropertyNoMember(SC_UNO_PAGE_FTRGRFFILT,  ++i,nBound, 
cppu::UnoType::get(), css::uno::Any(OUString()));
 registerPropertyNoMember(SC_UNO_PAGE_FTRGRFLOC,   ++i,nBound, 
cppu::UnoType::get(), 
css::uno::Any(style::GraphicLocation_NONE));
 registerPropertyNoMember(SC_UNO_PAGE_FTRGRFURL,   ++i,nBound, 
cppu::UnoType::get(), css::uno::Any(OUString()));
+registerPropertyNoMember(SC_UNO_PAGE_FTRGRF,  ++i,nBound, 
cppu::UnoType::get(), 
css::uno::Any(uno::Reference()));
 registerPropertyNoMember(SC_UNO_PAGE_FTRBACKTRAN, 
++i,nBound,cppu::UnoType::get(), css::uno::Any(true));
 registerPropertyNoMember(SC_UNO_PAGE_FTRBODYDIST, ++i,nBound, 
cppu::UnoType::get(), css::uno::makeAny(0));
 registerPropertyNoMember(SC_UNO_PAGE_FTRBRDDIST,  ++i,nBound, 
cppu::UnoType::get(), css::uno::makeAny(0));
@@ -327,6 +330,7 @@ OStyle::OStyle()
 registerPropertyNoMember(SC_UNO_PAGE_HDRGRFFILT,  ++i,nBound|nMayBeVoid, 
cppu::UnoType::get(), css::uno::Any(OUString()));
 registerPropertyNoMember(SC_UNO_PAGE_HDRGRFLOC,   ++i,nBound|nMayBeVoid, 
cppu::UnoType::get(), 
css::uno::Any(style::GraphicLocation_NONE));
 registerPropertyNoMember(SC_UNO_PAGE_HDRGRFURL,   ++i,nBound|nMayBeVoid, 
cppu::UnoType::get(), css::uno::Any(OUString()));
+registerPropertyNoMember(SC_UNO_PAGE_HDRGRF,  ++i,nBound|nMayBeVoid, 
cppu::UnoType::get(), 
css::uno::Any(uno::Reference()));
 registerPropertyNoMember(SC_UNO_PAGE_HDRBACKTRAN, 
++i,nBound|nMayBeVoid,cppu::UnoType::get(), css::uno::Any(true));
 registerPropertyNoMember(SC_UNO_PAGE_HDRBODYDIST, ++i,nBound|nMayBeVoid, 
cppu::UnoType::get(), css::uno::makeAny(0));
 registerPropertyNoMember(SC_UNO_PAGE_HDRBRDDIST,  ++i,nBound|nMayBeVoid, 
cppu::UnoType::get(), css::uno::makeAny(0));
diff --git a/sc/inc/unonames.hxx b/sc/inc/unonames.hxx
index 0f61dcd2a7d4..a2f080ab6377 100644
--- a/sc/inc/unonames.hxx
+++ b/sc/inc/unonames.hxx
@@ -406,6 +406,7 @@
 #define SC_UNO_PAGE_GRAPHICFILT "BackGraphicFilter"
 #define SC_UNO_PAGE_GRAPHICLOC  "BackGraphicLocation"
 #define SC_UNO_PAGE_GRAPHICURL  "BackGraphicURL"
+#define SC_UNO_PAGE_GRAPHIC "BackGraphic"
 #define SC_UNO_PAGE_LEFTBORDER  SC_UNONAME_LEFTBORDER
 #define SC_UNO_PAGE_RIGHTBORDER SC_UNONAME_RIGHTBORDER
 #define SC_UNO_PAGE_BOTTBORDER  SC_UNONAME_BOTTBORDER
@@ -452,6 +453,7 @@
 #define SC_UNO_PAGE_HDRGRFFILT  "HeaderBackGraphicFilter"
 #define SC_UNO_PAGE_HDRGRFLOC   "HeaderBackGraphicLocation"
 #define SC_UNO_PAGE_HDRGRFURL   "HeaderBackGraphicURL"
+#define SC_UNO_PAGE_HDRGRF  "HeaderBackGraphic"
 #define SC_UNO_PAGE_HDRLEFTBOR  "HeaderLeftBorder"
 #define SC_UNO_PAGE_HDRRIGHTBOR "HeaderRightBorder"
 #define SC_UNO_PAGE_HDRBOTTBOR  "HeaderBottomBorder"
@@ -474,6 +476,7 @@
 #define SC_UNO_PAGE_FTRGRFFILT  "FooterBackGraphicFilter"
 #define SC_UNO_PAGE_FTRGRFLOC   "FooterBackGraphicLocation"
 #define SC_UNO_PAGE_FTRGRFURL   "FooterBackGraphicURL"
+#define SC_UNO_PAGE_FTRGRF  "FooterBackGraphic"
 #define SC_UNO_PAGE_FTRLEFTBOR  

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

2018-02-13 Thread Julien Nabet
 reportdesign/source/ui/report/ReportController.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit c8e19544cdc506dfc91dbd8045da208ded7d7d2c
Author: Julien Nabet 
Date:   Tue Feb 13 22:44:41 2018 +0100

Fix an assert in ReportController (reportdesign)

2  0x7739afca in __assert_fail_base (fmt=0x774eb890 "%s%s%s:%u: 
%s%sAssertion `%s' failed.
%n", assertion=assertion@entry=0x7131fb10 
"((*pImpl->mpStaticDefaults)[n]->Which() == n + pImpl->mnStart) && \"static 
defaults not sorted\"", file=file@entry=0x7131f920 
"/home/julien/lo/libreoffice/svl/source/items/itempool.cxx", 
line=line@entry=247, function=function@entry=0x71320bc0 
 >*)::__PRETTY_FUNCTION__> "void 
SfxItemPool::SetDefaults(std::__debug::vector*)") at assert.c:92
3  0x7739b042 in __GI___assert_fail (assertion=0x7131fb10 
"((*pImpl->mpStaticDefaults)[n]->Which() == n + pImpl->mnStart) && \"static 
defaults not sorted\"", file=0x7131f920 
"/home/julien/lo/libreoffice/svl/source/items/itempool.cxx", line=247, 
function=0x71320bc0 
 >*)::__PRETTY_FUNCTION__> "void 
SfxItemPool::SetDefaults(std::__debug::vector*)") at assert.c:101
4  0x711495f5 in 
SfxItemPool::SetDefaults(std::__debug::vector >*) (this=0x5bfec850, pDefaults=0x7fff1c40)
at /home/julien/lo/libreoffice/svl/source/items/itempool.cxx:246
5  0x7fff9b4df1d0 in 
rptui::OReportController::openPageDialog(com::sun::star::uno::Reference
 const&) (this=
0x58a94490, _xSection=empty uno::Reference) at 
/home/julien/lo/libreoffice/reportdesign/source/ui/report/ReportController.cxx:2392

Should stick with the order defined in include/svx/xdef.hxx

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

diff --git a/reportdesign/source/ui/report/ReportController.cxx 
b/reportdesign/source/ui/report/ReportController.cxx
index 6797b341194a..eb01ee3810c4 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -2328,14 +2328,14 @@ void OReportController::openPageDialog(const 
uno::Reference& _
 { XATTR_FILLBMP_POS,true },
 { XATTR_FILLBMP_SIZEX,  true },
 { XATTR_FILLBMP_SIZEY,  true },
+{ XATTR_FILLFLOATTRANSPARENCE,  true },
+{ XATTR_SECONDARYFILLCOLOR, true },
 { XATTR_FILLBMP_SIZELOG,true },
 { XATTR_FILLBMP_TILEOFFSETX,true },
 { XATTR_FILLBMP_TILEOFFSETY,true },
 { XATTR_FILLBMP_STRETCH,true },
 { XATTR_FILLBMP_POSOFFSETX, true },
 { XATTR_FILLBMP_POSOFFSETY, true },
-{ XATTR_FILLFLOATTRANSPARENCE,  true },
-{ XATTR_SECONDARYFILLCOLOR, true },
 { XATTR_FILLBACKGROUND, true },
 { SID_ATTR_METRIC,  true }
 };
@@ -2377,14 +2377,14 @@ void OReportController::openPageDialog(const 
uno::Reference& _
 new XFillBmpPosItem,
 new XFillBmpSizeXItem,
 new XFillBmpSizeYItem,
+new XFillFloatTransparenceItem(aNullGrad, false),
+new XSecondaryFillColorItem("", aNullFillCol),
 new XFillBmpSizeLogItem,
 new XFillBmpTileOffsetXItem,
 new XFillBmpTileOffsetYItem,
 new XFillBmpStretchItem,
 new XFillBmpPosOffsetXItem,
 new XFillBmpPosOffsetYItem,
-new XFillFloatTransparenceItem(aNullGrad, false),
-new XSecondaryFillColorItem("", aNullFillCol),
 new XFillBackgroundItem,
 new SfxUInt16Item(RPTUI_ID_METRIC,static_cast(eUserMetric))
 };
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: reportdesign/source sd/source sfx2/source svtools/source svx/source

2018-02-01 Thread Gabor Kelemen
 reportdesign/source/ui/dlg/CondFormat.cxx  |1 -
 reportdesign/source/ui/dlg/Condition.cxx   |1 -
 reportdesign/source/ui/dlg/DateTime.cxx|1 -
 reportdesign/source/ui/dlg/PageNumber.cxx  |1 -
 reportdesign/source/ui/report/EndMarker.cxx|1 -
 reportdesign/source/ui/report/ReportController.cxx |1 -
 reportdesign/source/ui/report/SectionWindow.cxx|1 -
 reportdesign/source/ui/report/ViewsWindow.cxx  |1 -
 sd/source/ui/annotations/annotationmanager.cxx |1 -
 sd/source/ui/dlg/headerfooterdlg.cxx   |1 -
 sd/source/ui/unoidl/unoobj.cxx |1 -
 sd/source/ui/view/ViewShellImplementation.cxx  |1 -
 sd/source/ui/view/ViewTabBar.cxx   |1 -
 sd/source/ui/view/drviews1.cxx |2 
--
 sd/source/ui/view/drviewsc.cxx |1 -
 sd/source/ui/view/sdwindow.cxx |1 -
 sd/source/ui/view/viewoverlaymanager.cxx   |1 -
 sd/source/ui/view/viewshel.cxx |1 -
 sfx2/source/doc/objmisc.cxx|1 -
 sfx2/source/doc/objserv.cxx|2 
--
 sfx2/source/doc/objxtor.cxx|1 -
 sfx2/source/toolbox/tbxitem.cxx|1 -
 sfx2/source/view/viewprn.cxx   |2 
--
 svtools/source/dialogs/addresstemplate.cxx |1 -
 svx/source/dialog/ctredlin.cxx |1 -
 svx/source/dialog/svxbmpnumvalueset.cxx|1 -
 svx/source/form/datanavi.cxx   |1 -
 svx/source/form/fmPropBrw.cxx  |1 -
 svx/source/form/navigatortreemodel.cxx |1 -
 svx/source/form/tbxform.cxx|1 -
 svx/source/sidebar/area/AreaPropertyPanel.cxx  |1 -
 svx/source/sidebar/area/AreaPropertyPanelBase.cxx  |1 -
 svx/source/tbxctrls/fillctrl.cxx   |1 -
 svx/source/tbxctrls/fontworkgallery.cxx|1 -
 svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx  |1 -
 svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.cxx |1 -
 36 files changed, 39 deletions(-)

New commits:
commit 73bfe83a3985df447d4fd6b443277aac21cd9913
Author: Gabor Kelemen 
Date:   Fri Dec 15 02:24:13 2017 +0100

tdf#42949 Remove unneeded helpids.h headers (2/3)

A side effect of the .ui migration is that we use a lot less HIDs
in the code. A lot of files still contain helpids.h includes
even if no actual HID is referenced.

This cleans up directories r* - svx*.
Found with:
git grep helpids.h | cut -d : -f 1 | xargs grep -c HID_  | grep :0$

Change-Id: I81bdb80161b0207f5df651eb17c58caef44250d3
Reviewed-on: https://gerrit.libreoffice.org/46869
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 

diff --git a/reportdesign/source/ui/dlg/CondFormat.cxx 
b/reportdesign/source/ui/dlg/CondFormat.cxx
index 8df157068cb4..896d9e77b6fe 100644
--- a/reportdesign/source/ui/dlg/CondFormat.cxx
+++ b/reportdesign/source/ui/dlg/CondFormat.cxx
@@ -23,7 +23,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include "Condition.hxx"
diff --git a/reportdesign/source/ui/dlg/Condition.cxx 
b/reportdesign/source/ui/dlg/Condition.cxx
index 9a8df2a42e1f..b88df9b21ba7 100644
--- a/reportdesign/source/ui/dlg/Condition.cxx
+++ b/reportdesign/source/ui/dlg/Condition.cxx
@@ -24,7 +24,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/reportdesign/source/ui/dlg/DateTime.cxx 
b/reportdesign/source/ui/dlg/DateTime.cxx
index 41bbcfab34d4..d8625a16dd38 100644
--- a/reportdesign/source/ui/dlg/DateTime.cxx
+++ b/reportdesign/source/ui/dlg/DateTime.cxx
@@ -20,7 +20,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/reportdesign/source/ui/dlg/PageNumber.cxx 
b/reportdesign/source/ui/dlg/PageNumber.cxx
index e6bf97f202b7..f4666a1be752 100644
--- a/reportdesign/source/ui/dlg/PageNumber.cxx
+++ b/reportdesign/source/ui/dlg/PageNumber.cxx
@@ -21,7 +21,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 

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

2018-01-28 Thread Julien Nabet
 reportdesign/source/ui/inspection/GeometryHandler.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3003c27d87c6ad47ed9cadb1f574882c530522b1
Author: Julien Nabet 
Date:   Sun Jan 28 10:38:46 2018 +0100

tdf#115269: fix crash when changing horizontal align (reportdesign)

See bt:
https://bugs.documentfoundation.org/attachment.cgi?id=139403

Regression from

https://cgit.freedesktop.org/libreoffice/core/log/?qt=range=00657aef09d854c74fb426a935a3e8b1fc390bb0

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

diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx 
b/reportdesign/source/ui/inspection/GeometryHandler.cxx
index d849d6e99791..70f08c27a500 100644
--- a/reportdesign/source/ui/inspection/GeometryHandler.cxx
+++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx
@@ -1257,7 +1257,7 @@ uno::Any SAL_CALL 
GeometryHandler::convertToControlValue(const OUString & Proper
 sal_Int16 nParagraphAdjust = 
sal_Int16(style::ParagraphAdjust_LEFT);
 aPropertyValue >>= nParagraphAdjust;
 if (static_cast(nParagraphAdjust) < 
SAL_N_ELEMENTS(RID_STR_PARAADJUST_CONST) - 1)
-aControlValue <<= 
RptResId(RID_STR_VERTICAL_ALIGN_CONST[nParagraphAdjust]);
+aControlValue <<= 
RptResId(RID_STR_PARAADJUST_CONST[nParagraphAdjust]);
 }
 break;
 case PROPERTY_ID_BACKCOLOR:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


  1   2   >