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

2020-02-10 Thread Onur Yilmaz (via logerrit)
 sd/source/ui/dlg/BulletAndPositionDlg.cxx |9 +++--
 1 file changed, 3 insertions(+), 6 deletions(-)

New commits:
commit 4328e3a449d11f1ebcaa91d7852ffdb984e01266
Author: Onur Yilmaz 
AuthorDate: Tue Feb 4 16:27:38 2020 +0300
Commit: Caolán McNamara 
CommitDate: Mon Feb 10 20:21:31 2020 +0100

tdf#130148 Gallery drop-down list in Impress B dialog shows only start...

Change-Id: Ieb8d79d7b3d291ffb36a7daaee0716d4ed8c9a85
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87972
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit 5088e6d34b0ffba423f8633ee83673a9c1d40036)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88300
Reviewed-by: Caolán McNamara 

diff --git a/sd/source/ui/dlg/BulletAndPositionDlg.cxx 
b/sd/source/ui/dlg/BulletAndPositionDlg.cxx
index f6eb2d709c76..261ab3cef9d4 100644
--- a/sd/source/ui/dlg/BulletAndPositionDlg.cxx
+++ b/sd/source/ui/dlg/BulletAndPositionDlg.cxx
@@ -978,12 +978,9 @@ IMPL_LINK_NOARG(SvxBulletAndPositionDlg, 
PopupActivateHdl_Impl, weld::ToggleButt
 pVD->DrawBitmapEx(Point(), aBitmap);
 
 // We want to show only icon names not full path.
-// That part finds the last index of the slash and
-// gets the part before .gif
-
-sal_Int32 last = sGrfName.lastIndexOf("/");
-last++;
-OUString sIconName = sGrfName.getToken(0, '.', last);
+aObj.removeExtension();
+OUString sIconName
+= 
aObj.GetLastName(INetURLObject::DecodeMechanism::WithCharset);
 
 m_xGalleryMenu->append(sItemId, sIconName, *pVD);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-02-10 Thread Onur Yilmaz (via logerrit)
 sd/source/ui/dlg/BulletAndPositionDlg.cxx |9 +++--
 1 file changed, 3 insertions(+), 6 deletions(-)

New commits:
commit 153dafe1147bc29fc0e656d0cb8994112ecea1a0
Author: Onur Yilmaz 
AuthorDate: Tue Feb 4 16:27:38 2020 +0300
Commit: Xisco Faulí 
CommitDate: Mon Feb 10 12:40:36 2020 +0100

tdf#130148 Gallery drop-down list in Impress B dialog shows only start...

Change-Id: Ieb8d79d7b3d291ffb36a7daaee0716d4ed8c9a85
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87972
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit 5088e6d34b0ffba423f8633ee83673a9c1d40036)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88299
Reviewed-by: Xisco Faulí 

diff --git a/sd/source/ui/dlg/BulletAndPositionDlg.cxx 
b/sd/source/ui/dlg/BulletAndPositionDlg.cxx
index 7ce6a227fe3f..498ea1befcc5 100644
--- a/sd/source/ui/dlg/BulletAndPositionDlg.cxx
+++ b/sd/source/ui/dlg/BulletAndPositionDlg.cxx
@@ -897,12 +897,9 @@ IMPL_LINK_NOARG(SvxBulletAndPositionDlg, 
PopupActivateHdl_Impl, weld::ToggleButt
 pVD->DrawBitmapEx(Point(), aBitmap);
 
 // We want to show only icon names not full path.
-// That part finds the last index of the slash and
-// gets the part before .gif
-
-sal_Int32 last = sGrfName.lastIndexOf("/");
-last++;
-OUString sIconName = sGrfName.getToken(0, '.', last);
+aObj.removeExtension();
+OUString sIconName
+= 
aObj.GetLastName(INetURLObject::DecodeMechanism::WithCharset);
 
 m_xGalleryMenu->append(sItemId, sIconName, *pVD);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-02-08 Thread Onur Yilmaz (via logerrit)
 sd/source/ui/dlg/BulletAndPositionDlg.cxx |9 +++--
 1 file changed, 3 insertions(+), 6 deletions(-)

New commits:
commit 5088e6d34b0ffba423f8633ee83673a9c1d40036
Author: Onur Yilmaz 
AuthorDate: Tue Feb 4 16:27:38 2020 +0300
Commit: Mike Kaganski 
CommitDate: Sat Feb 8 10:24:50 2020 +0100

tdf#130148 Gallery drop-down list in Impress B dialog shows only start...

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

diff --git a/sd/source/ui/dlg/BulletAndPositionDlg.cxx 
b/sd/source/ui/dlg/BulletAndPositionDlg.cxx
index 7ce6a227fe3f..498ea1befcc5 100644
--- a/sd/source/ui/dlg/BulletAndPositionDlg.cxx
+++ b/sd/source/ui/dlg/BulletAndPositionDlg.cxx
@@ -897,12 +897,9 @@ IMPL_LINK_NOARG(SvxBulletAndPositionDlg, 
PopupActivateHdl_Impl, weld::ToggleButt
 pVD->DrawBitmapEx(Point(), aBitmap);
 
 // We want to show only icon names not full path.
-// That part finds the last index of the slash and
-// gets the part before .gif
-
-sal_Int32 last = sGrfName.lastIndexOf("/");
-last++;
-OUString sIconName = sGrfName.getToken(0, '.', last);
+aObj.removeExtension();
+OUString sIconName
+= 
aObj.GetLastName(INetURLObject::DecodeMechanism::WithCharset);
 
 m_xGalleryMenu->append(sItemId, sIconName, *pVD);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-02-04 Thread Onur Yilmaz (via logerrit)
 cui/source/customize/cfg.cxx  |   39 --
 cui/uiconfig/ui/menuassignpage.ui |2 -
 2 files changed, 18 insertions(+), 23 deletions(-)

New commits:
commit 7d5a463684b44b625bf555c1d8ed4df5a1660339
Author: Onur Yilmaz 
AuthorDate: Mon Feb 3 23:23:17 2020 +0300
Commit: Muhammet Kara 
CommitDate: Tue Feb 4 19:53:11 2020 +0100

tdf#129720: Populate the Description box of the Customize dialog...

Change-Id: Id294458e0b380ceedc199a9c642f29ecfbeef10e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87920
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 

diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 2cdfc4c245ab..35d39195234c 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -1562,12 +1562,10 @@ IMPL_LINK_NOARG(SvxConfigPage, FunctionDoubleClickHdl, 
weld::TreeView&, bool)
 
 IMPL_LINK_NOARG(SvxConfigPage, SelectFunctionHdl, weld::TreeView&, void)
 {
-// Store the tooltip of the description field at first run
-static const OUString sDescTooltip = 
m_xDescriptionField->get_tooltip_text();
-
 // GetScriptURL() returns a non-empty string if a
 // valid command is selected on the left box
-bool bIsValidCommand = !GetScriptURL().isEmpty();
+OUString aSelectCommand = GetScriptURL();
+bool bIsValidCommand = !aSelectCommand.isEmpty();
 
 // Enable/disable Add and Remove buttons depending on current selection
 if (bIsValidCommand)
@@ -1575,7 +1573,21 @@ IMPL_LINK_NOARG(SvxConfigPage, SelectFunctionHdl, 
weld::TreeView&, void)
 m_xAddCommandButton->set_sensitive(true);
 m_xRemoveCommandButton->set_sensitive(true);
 
-m_xDescriptionField->set_text(m_xFunctions->GetHelpText(false));
+if (SfxHelp::IsHelpInstalled())
+{
+m_xDescriptionField->set_text(m_xFunctions->GetHelpText(false));
+}
+else
+{
+SfxGroupInfo_Impl *pData = 
reinterpret_cast(m_xFunctions->get_selected_id().toInt64());
+if (pData)
+{
+OUString aLabel = CuiResId(RID_SVXSTR_COMMANDLABEL) + ": " + 
pData->sLabel + "\n";
+OUString aName = CuiResId(RID_SVXSTR_COMMANDNAME) + ": " + 
pData->sCommand + "\n";
+OUString aTip = CuiResId(RID_SVXSTR_COMMANDTIP) + ": " + 
pData->sTooltip;
+m_xDescriptionField->set_text(aLabel + aName + aTip);
+}
+}
 }
 else
 {
@@ -1585,23 +1597,6 @@ IMPL_LINK_NOARG(SvxConfigPage, SelectFunctionHdl, 
weld::TreeView&, void)
 
 m_xDescriptionField->set_text("");
 }
-
-// Disable the description field and its label if the local help is not 
installed
-// And inform the user via tooltips
-if ( !SfxHelp::IsHelpInstalled() )
-{
-m_xDescriptionField->set_sensitive(false);
-m_xDescriptionFieldLb->set_sensitive(false);
-m_xDescriptionField->set_tooltip_text( sDescTooltip );
-m_xDescriptionFieldLb->set_tooltip_text( sDescTooltip );
-}
-else
-{
-m_xDescriptionField->set_sensitive(true);
-m_xDescriptionFieldLb->set_sensitive(true);
-m_xDescriptionField->set_tooltip_text("");
-m_xDescriptionFieldLb->set_tooltip_text("");
-}
 }
 
 IMPL_LINK_NOARG(SvxConfigPage, ImplUpdateDataHdl, Timer*, void)
diff --git a/cui/uiconfig/ui/menuassignpage.ui 
b/cui/uiconfig/ui/menuassignpage.ui
index 44d06931ebe4..e89bc1093739 100644
--- a/cui/uiconfig/ui/menuassignpage.ui
+++ b/cui/uiconfig/ui/menuassignpage.ui
@@ -275,7 +275,7 @@
   
 True
 True
-Local help is not installed.
+Description of the currently selected 
function.
 False
 word
 False
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-01-28 Thread Onur Yilmaz (via logerrit)
 dbaccess/source/ui/tabledesign/TableController.cxx |3 +--
 dbaccess/source/ui/uno/copytablewizard.cxx |3 +--
 extensions/source/propctrlr/propcontroller.cxx |3 +--
 package/source/zippackage/ZipPackageStream.cxx |3 +--
 svl/source/passwordcontainer/passwordcontainer.cxx |3 +--
 5 files changed, 5 insertions(+), 10 deletions(-)

New commits:
commit 9359d9a94d446fc40c5f98fcdbc3086ecba1f830
Author: Onur Yilmaz 
AuthorDate: Mon Jan 27 23:59:35 2020 +0300
Commit: Muhammet Kara 
CommitDate: Tue Jan 28 21:21:58 2020 +0100

tdf#88205: Adapt uses of css::uno::Sequence to use initializer_list ctor

Change-Id: Ie5a381fc5e5b73490ab8b2036ef2a1164e475e8f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87557
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 

diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx 
b/dbaccess/source/ui/tabledesign/TableController.cxx
index 2b39fc45c477..4d0cb028b148 100644
--- a/dbaccess/source/ui/tabledesign/TableController.cxx
+++ b/dbaccess/source/ui/tabledesign/TableController.cxx
@@ -119,8 +119,7 @@ OUString OTableController::getImplementationName_Static()
 
 Sequence< OUString> OTableController::getSupportedServiceNames_Static()
 {
-Sequence aSupported { "com.sun.star.sdb.TableDesign" };
-return aSupported;
+return { "com.sun.star.sdb.TableDesign" };
 }
 
 Sequence< OUString> SAL_CALL OTableController::getSupportedServiceNames()
diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx 
b/dbaccess/source/ui/uno/copytablewizard.cxx
index 90fb3cc95b4f..884ad73eef4a 100644
--- a/dbaccess/source/ui/uno/copytablewizard.cxx
+++ b/dbaccess/source/ui/uno/copytablewizard.cxx
@@ -435,8 +435,7 @@ css::uno::Sequence SAL_CALL 
CopyTableWizard::getSupportedServiceNames(
 
 css::uno::Sequence CopyTableWizard::getSupportedServiceNames_Static()
 {
-css::uno::Sequence aSupported { 
"com.sun.star.sdb.application.CopyTableWizard" };
-return aSupported;
+return { "com.sun.star.sdb.application.CopyTableWizard" };
 }
 
 Reference< XPropertySetInfo > SAL_CALL CopyTableWizard::getPropertySetInfo()
diff --git a/extensions/source/propctrlr/propcontroller.cxx 
b/extensions/source/propctrlr/propcontroller.cxx
index 3cfd255ad1b7..54b6a1bea66a 100644
--- a/extensions/source/propctrlr/propcontroller.cxx
+++ b/extensions/source/propctrlr/propcontroller.cxx
@@ -545,8 +545,7 @@ namespace pcr
 
 Sequence< OUString > 
OPropertyBrowserController::getSupportedServiceNames_static(  )
 {
-Sequence< OUString > aSupported { 
"com.sun.star.inspection.ObjectInspector" };
-return aSupported;
+return { "com.sun.star.inspection.ObjectInspector" };
 }
 
 
diff --git a/package/source/zippackage/ZipPackageStream.cxx 
b/package/source/zippackage/ZipPackageStream.cxx
index 745157cfd02e..ab237a15f5e4 100644
--- a/package/source/zippackage/ZipPackageStream.cxx
+++ b/package/source/zippackage/ZipPackageStream.cxx
@@ -1321,8 +1321,7 @@ OUString ZipPackageStream::getImplementationName()
 
 Sequence< OUString > ZipPackageStream::getSupportedServiceNames()
 {
-Sequence aNames { "com.sun.star.packages.PackageStream" };
-return aNames;
+return { "com.sun.star.packages.PackageStream" };
 }
 
 sal_Bool SAL_CALL ZipPackageStream::supportsService( OUString const & 
rServiceName )
diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx 
b/svl/source/passwordcontainer/passwordcontainer.cxx
index acafd8986f5f..8bdc1adb7314 100644
--- a/svl/source/passwordcontainer/passwordcontainer.cxx
+++ b/svl/source/passwordcontainer/passwordcontainer.cxx
@@ -1309,8 +1309,7 @@ Sequence< OUString > SAL_CALL 
PasswordContainer::getSupportedServiceNames(  )
 
 Sequence< OUString > PasswordContainer::impl_getStaticSupportedServiceNames(  )
 {
-Sequence< OUString > aRet { "com.sun.star.task.PasswordContainer" };
-return aRet;
+return { "com.sun.star.task.PasswordContainer" };
 }
 
 OUString PasswordContainer::impl_getStaticImplementationName()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-01-28 Thread Onur Yilmaz (via logerrit)
 svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx |2 +-
 svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx|4 ++--
 svx/source/stbctrls/pszctrl.cxx  |2 +-
 svx/source/svdraw/svdedtv1.cxx   |2 +-
 svx/source/svdraw/svdedtv2.cxx   |2 +-
 svx/source/svdraw/svdmark.cxx|2 +-
 svx/source/svdraw/svdopath.cxx   |6 +++---
 svx/source/svdraw/svdotextdecomposition.cxx  |8 
 svx/source/svdraw/svdotextpathdecomposition.cxx  |2 +-
 svx/source/svdraw/svdpagv.cxx|2 +-
 svx/source/svdraw/svdxcgv.cxx|2 +-
 svx/source/unodraw/unoshape.cxx  |2 +-
 12 files changed, 18 insertions(+), 18 deletions(-)

New commits:
commit 4a88e0c6e90c1c2cba33b8626564429f54b74c0b
Author: Onur Yilmaz 
AuthorDate: Mon Jan 27 12:20:31 2020 +0300
Commit: Stephan Bergmann 
CommitDate: Tue Jan 28 17:00:45 2020 +0100

tdf#96505: Get rid of cargo cult long integer literals

I checked return values.
Long variables didn't affect the calculation.

Change-Id: I0c33c20b872ff6b1dc6c87c4032ccf19705db8e2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87503
Reviewed-by: Stephan Bergmann 
Tested-by: Stephan Bergmann 

diff --git a/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx 
b/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx
index d09c03dff575..76b5aa716330 100644
--- a/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx
@@ -153,7 +153,7 @@ namespace drawinglayer::primitive2d
 {
 // for compatibility, insert the center point at polygon 
start to get the same
 // line stroking pattern as the old painting mechanisms.
-aUnitOutline.insert(0L, basegfx::B2DPoint(0.0, 0.0));
+aUnitOutline.insert(0, basegfx::B2DPoint(0.0, 0.0));
 }
 
 aUnitOutline.setClosed(true);
diff --git a/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx 
b/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx
index 837df2f3bc13..4de23bd5c780 100644
--- a/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx
@@ -51,7 +51,7 @@ namespace drawinglayer::primitive2d
 }
 
 // add graphic content
-if(255L != getGraphicAttr().GetTransparency())
+if(255 != getGraphicAttr().GetTransparency())
 {
 // standard graphic fill
 const Primitive2DReference xGraphicContentPrimitive(
@@ -158,7 +158,7 @@ namespace drawinglayer::primitive2d
 
 bool SdrGrafPrimitive2D::isTransparent() const
 {
-return ((0L != getGraphicAttr().GetTransparency())
+return ((0 != getGraphicAttr().GetTransparency())
 || (getGraphicObject().IsTransparent()));
 }
 
diff --git a/svx/source/stbctrls/pszctrl.cxx b/svx/source/stbctrls/pszctrl.cxx
index d55b895af65c..8d2c4110863d 100644
--- a/svx/source/stbctrls/pszctrl.cxx
+++ b/svx/source/stbctrls/pszctrl.cxx
@@ -70,7 +70,7 @@ OUString SvxPosSizeStatusBarControl::GetMetricStr_Impl( long 
nVal )
 
 OUString sMetric;
 const sal_Unicode cSep = 
Application::GetSettings().GetLocaleDataWrapper().getNumDecimalSep()[0];
-sal_Int64 nConvVal = MetricField::ConvertValue( nVal * 100, 0L, 0, 
FieldUnit::MM_100TH, eOutUnit );
+sal_Int64 nConvVal = MetricField::ConvertValue( nVal * 100, 0, 0, 
FieldUnit::MM_100TH, eOutUnit );
 
 if ( nConvVal < 0 && ( nConvVal / 100 == 0 ) )
 sMetric += "-";
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
index cf29f4a268df..35676d9faaf2 100644
--- a/svx/source/svdraw/svdedtv1.cxx
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -522,7 +522,7 @@ void SdrEditView::ImpCrookObj(SdrObject* pO, const Point& 
rRef, const Point& rRa
 bDone = true;
 }
 
-if(!bDone && !pPath && pO->IsPolyObj() && 0L != pO->GetPointCount())
+if(!bDone && !pPath && pO->IsPolyObj() && 0 != pO->GetPointCount())
 {
 // for PolyObj's, but NOT for SdrPathObj's, e.g. the measurement object
 sal_uInt32 nPointCount(pO->GetPointCount());
diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx
index 72a743fda6c8..8736da464544 100644
--- a/svx/source/svdraw/svdedtv2.cxx
+++ b/svx/source/svdraw/svdedtv2.cxx
@@ -1351,7 +1351,7 @@ void SdrEditView::CombineMarkedObjects(bool bNoPolyPoly)
 // involved polygon data to curve segments, even if not necessary.
 // It is better to try to reduce to more simple polygons.
 basegfx::B2DPolyPolygon 
aTmpPoly(basegfx::utils::simplifyCurveSegments(ImpGetPolyPolygon(pObj)));
-aPolyPolygon.insert(0L, aTmpPoly);
+

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

2020-01-28 Thread Onur Yilmaz (via logerrit)
 starmath/source/node.cxx |   60 +++
 1 file changed, 30 insertions(+), 30 deletions(-)

New commits:
commit ece847579e606efc0398c01b5a9110623935
Author: Onur Yilmaz 
AuthorDate: Mon Jan 27 11:32:59 2020 +0300
Commit: Stephan Bergmann 
CommitDate: Tue Jan 28 16:56:34 2020 +0100

tdf#96505: Get rid of cargo cult long integer literals

I checked return values.
Long variables didn't affect the calculation.

Change-Id: I05fe807e34beb962e3867a708939e557d56e5549
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87491
Reviewed-by: Stephan Bergmann 
Tested-by: Stephan Bergmann 

diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index f8f00cd8a949..b70bdfef08a9 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -490,7 +490,7 @@ void SmTableNode::Arrange(OutputDevice , const 
SmFormat )
 
 // make distance depend on font size
 long  nDist = +(rFormat.GetDistance(DIS_VERTICAL)
-* GetFont().GetFontSize().Height()) / 100L;
+* GetFont().GetFontSize().Height()) / 100;
 
 if (nSize < 1)
 return;
@@ -600,7 +600,7 @@ void SmLineNode::Arrange(OutputDevice , const SmFormat 
)
 }
 
 // make distance depend on font size
-long nDist = (rFormat.GetDistance(DIS_HORIZONTAL) * 
GetFont().GetFontSize().Height()) / 100L;
+long nDist = (rFormat.GetDistance(DIS_HORIZONTAL) * 
GetFont().GetFontSize().Height()) / 100;
 if (!IsUseExtraSpaces())
 nDist = 0;
 
@@ -658,7 +658,7 @@ void SmUnHorNode::Arrange(OutputDevice , const 
SmFormat )
 pOper->Arrange(rDev, rFormat);
 pBody->Arrange(rDev, rFormat);
 
-long nDist = (pOper->GetRect().GetWidth() * 
rFormat.GetDistance(DIS_HORIZONTAL)) / 100L;
+long nDist = (pOper->GetRect().GetWidth() * 
rFormat.GetDistance(DIS_HORIZONTAL)) / 100;
 
 SmRect::operator = (*pNode0);
 
@@ -727,7 +727,7 @@ void SmRootNode::Arrange(OutputDevice , const SmFormat 
)
   nVerOffset;
 lcl_GetHeightVerOffset(*pBody, nHeight, nVerOffset);
 nHeight += rFormat.GetDistance(DIS_ROOT)
-   * GetFont().GetFontSize().Height() / 100L;
+   * GetFont().GetFontSize().Height() / 100;
 
 // font specialist advised to change the width first
 pRootSym->AdaptToY(rDev, nHeight);
@@ -797,7 +797,7 @@ void SmBinHorNode::Arrange(OutputDevice , const 
SmFormat )
 const SmRect  = pOper->GetRect();
 
 long nDist = (rOpRect.GetWidth() *
- rFormat.GetDistance(DIS_HORIZONTAL)) / 100L;
+ rFormat.GetDistance(DIS_HORIZONTAL)) / 100;
 
 SmRect::operator = (*pLeft);
 
@@ -840,13 +840,13 @@ void SmBinVerNode::Arrange(OutputDevice , const 
SmFormat )
 pDenom->Arrange(rDev, rFormat);
 
 long  nFontHeight = GetFont().GetFontSize().Height(),
-  nExtLen = nFontHeight * rFormat.GetDistance(DIS_FRACTION) / 100L,
-  nThick  = nFontHeight * rFormat.GetDistance(DIS_STROKEWIDTH) / 
100L,
+  nExtLen = nFontHeight * rFormat.GetDistance(DIS_FRACTION) / 100,
+  nThick  = nFontHeight * rFormat.GetDistance(DIS_STROKEWIDTH) / 
100,
   nWidth  = std::max(pNum->GetItalicWidth(), 
pDenom->GetItalicWidth()),
   nNumDist= bIsTextmode ? 0 :
-nFontHeight * rFormat.GetDistance(DIS_NUMERATOR)   
/ 100L,
+nFontHeight * rFormat.GetDistance(DIS_NUMERATOR)   
/ 100,
   nDenomDist  = bIsTextmode ? 0 :
-nFontHeight * rFormat.GetDistance(DIS_DENOMINATOR) 
/ 100L;
+nFontHeight * rFormat.GetDistance(DIS_DENOMINATOR) 
/ 100;
 
 // font specialist advised to change the width first
 pLine->AdaptToY(rDev, nThick);
@@ -1201,7 +1201,7 @@ void SmSubSupNode::Arrange(OutputDevice , const 
SmFormat )
 case LSUB :
 if (!bIsTextmode)
 nDist = nOrigHeight
-* rFormat.GetDistance(DIS_SUBSCRIPT) / 100L;
+* rFormat.GetDistance(DIS_SUBSCRIPT) / 100;
 aPos  = pSubSup->GetRect().AlignTo(aTmpRect,
 eSubSup == LSUB ? RectPos::Left : 
RectPos::Right,
 RectHorAlign::Center, RectVerAlign::Bottom);
@@ -1214,7 +1214,7 @@ void SmSubSupNode::Arrange(OutputDevice , const 
SmFormat )
 case LSUP :
 if (!bIsTextmode)
 nDist = nOrigHeight
-* rFormat.GetDistance(DIS_SUPERSCRIPT) / 100L;
+* rFormat.GetDistance(DIS_SUPERSCRIPT) / 100;
 aPos  = pSubSup->GetRect().AlignTo(aTmpRect,
 eSubSup == LSUP ? RectPos::Left : 
RectPos::Right,
 RectHorAlign::Center, RectVerAlign::Top);
@@ -1226,7 +1226,7 @@ void SmSubSupNode::Arrange(OutputDevice , 

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

2020-01-28 Thread Onur Yilmaz (via logerrit)
 filter/source/svg/svgexport.cxx|4 ++--
 filter/source/svg/svgwriter.cxx|6 +++---
 reportdesign/source/ui/inspection/metadata.cxx |2 +-
 sal/osl/unx/profile.cxx|4 ++--
 sal/osl/unx/socket.cxx |4 ++--
 5 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit b44ad15cd78892f2f1d7fe83ccda9fc41dc9c9a5
Author: Onur Yilmaz 
AuthorDate: Mon Jan 27 11:46:12 2020 +0300
Commit: Stephan Bergmann 
CommitDate: Tue Jan 28 16:53:27 2020 +0100

tdf#96505: Get rid of cargo cult long integer literals

I checked return values.
Long variables didn't affect the calculation.

Change-Id: Ia3713eedf275de71b1096d1fe7e22da012a7f94e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87493
Reviewed-by: Stephan Bergmann 
Tested-by: Stephan Bergmann 

diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index 731cb6d4561e..c717d00596ef 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -2493,8 +2493,8 @@ void SVGExport::writeMtf( const GDIMetaFile& rMtf )
 aAttr = OUString::number( aSize.Height() ) + "mm";
 AddAttribute( XML_NAMESPACE_NONE, "height", aAttr );
 
-aAttr = "0 0 " + OUString::number( aSize.Width() * 100L ) + " " +
-OUString::number( aSize.Height() * 100L );
+aAttr = "0 0 " + OUString::number( aSize.Width() * 100 ) + " " +
+OUString::number( aSize.Height() * 100 );
 AddAttribute( XML_NAMESPACE_NONE, "viewBox", aAttr );
 
 AddAttribute( XML_NAMESPACE_NONE, "version", "1.1" );
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 205bfabc6d4a..f70d11200be7 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -2328,9 +2328,9 @@ void SVGActionWriter::ImplWriteGradientStop( const Color& 
rColor, double fOffset
 Color SVGActionWriter::ImplGetColorWithIntensity( const Color& rColor,
   sal_uInt16 nIntensity )
 {
- sal_uInt8 nNewRed = static_cast( 
static_cast(rColor.GetRed()) * nIntensity / 100L );
- sal_uInt8 nNewGreen = static_cast( 
static_cast(rColor.GetGreen()) * nIntensity / 100L );
- sal_uInt8 nNewBlue = static_cast( 
static_cast(rColor.GetBlue()) * nIntensity / 100L );
+ sal_uInt8 nNewRed = static_cast( 
static_cast(rColor.GetRed()) * nIntensity / 100 );
+ sal_uInt8 nNewGreen = static_cast( 
static_cast(rColor.GetGreen()) * nIntensity / 100 );
+ sal_uInt8 nNewBlue = static_cast( 
static_cast(rColor.GetBlue()) * nIntensity / 100 );
  return Color( nNewRed, nNewGreen, nNewBlue);
 }
 
diff --git a/reportdesign/source/ui/inspection/metadata.cxx 
b/reportdesign/source/ui/inspection/metadata.cxx
index fe968c7fddd6..f652fa4a4723 100644
--- a/reportdesign/source/ui/inspection/metadata.cxx
+++ b/reportdesign/source/ui/inspection/metadata.cxx
@@ -187,7 +187,7 @@ namespace rptui
 // initialization
 if(!s_pPropertyInfos)
 getPropertyInfo();
-OPropertyInfoImpl  aSearch(_rName, 0L, OUString(), "", 
PropUIFlags::NONE);
+OPropertyInfoImpl  aSearch(_rName, 0, OUString(), "", 
PropUIFlags::NONE);
 
 const OPropertyInfoImpl* pPropInfo = ::std::lower_bound(
 s_pPropertyInfos, s_pPropertyInfos + s_nCount, aSearch, 
PropertyInfoLessByName() );
diff --git a/sal/osl/unx/profile.cxx b/sal/osl/unx/profile.cxx
index b7bc5771fd64..e2cca48ab8c6 100644
--- a/sal/osl/unx/profile.cxx
+++ b/sal/osl/unx/profile.cxx
@@ -1029,11 +1029,11 @@ static bool OslProfile_rewindFile(osl_TFile* pFile, 
bool bTruncate)
 {
 pFile->m_pReadPtr  = pFile->m_ReadBuf + sizeof(pFile->m_ReadBuf);
 
-bRet = (lseek(pFile->m_Handle, SEEK_SET, 0L) == 0);
+bRet = (lseek(pFile->m_Handle, SEEK_SET, 0) == 0);
 
 if (bTruncate)
 {
-bRet &= (ftruncate(pFile->m_Handle, 0L) == 0);
+bRet &= (ftruncate(pFile->m_Handle, 0) == 0);
 }
 
 }
diff --git a/sal/osl/unx/socket.cxx b/sal/osl/unx/socket.cxx
index 5db922e7674d..d3b192f4e1f1 100644
--- a/sal/osl/unx/socket.cxx
+++ b/sal/osl/unx/socket.cxx
@@ -1404,7 +1404,7 @@ oslSocketResult SAL_CALL osl_connectSocketTo(oslSocket 
pSocket,
 {
 /* divide milliseconds into seconds and microseconds */
 tv.tv_sec=  pTimeout->Seconds;
-tv.tv_usec= pTimeout->Nanosec / 1000L;
+tv.tv_usec= pTimeout->Nanosec / 1000;
 }
 
 /* select */
@@ -2217,7 +2217,7 @@ sal_Int32 SAL_CALL 
osl_demultiplexSocketEvents(oslSocketSet IncomingSet,
 {
 /* non-blocking call */
 tv.tv_sec  = pTimeout->Seconds;
-tv.tv_usec = pTimeout->Nanosec / 1000L;
+tv.tv_usec = pTimeout->Nanosec / 1000;
 }
 
 /* get max handle from all sets */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org

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

2020-01-28 Thread Onur Yilmaz (via logerrit)
 starmath/source/view.cxx  |8 
 starmath/source/visitors.cxx  |2 +-
 svx/source/dialog/_bmpmask.cxx|2 +-
 svx/source/dialog/_contdlg.cxx|2 +-
 svx/source/dialog/framelinkarray.cxx  |8 
 svx/source/sdr/animation/scheduler.cxx|2 +-
 svx/source/sdr/contact/viewcontactofsdrobj.cxx|2 +-
 svx/source/sdr/contact/viewobjectcontactofpageobj.cxx |4 ++--
 svx/source/sdr/contact/viewobjectcontactofsdrpage.cxx |4 ++--
 9 files changed, 17 insertions(+), 17 deletions(-)

New commits:
commit 2065cbf576e7d3257e7da2151419404928326df3
Author: Onur Yilmaz 
AuthorDate: Mon Jan 27 12:04:16 2020 +0300
Commit: Stephan Bergmann 
CommitDate: Tue Jan 28 14:54:10 2020 +0100

tdf#96505: Get rid of cargo cult long integer literals

I checked return values.
Long variables didn't affect the calculation.

Change-Id: I1d5b5cffa291c20f7940dc14efa05cc64f3ff1ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87499
Reviewed-by: Stephan Bergmann 
Tested-by: Stephan Bergmann 

diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 54e6122c8873..a76a6e82b83b 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -1197,8 +1197,8 @@ void SmViewShell::Impl_Print(OutputDevice , const 
SmPrintUIOptions 
 Size OutputSize 
(rOutDev.LogicToPixel(Size(aOutRect.GetWidth(),
 
aOutRect.GetHeight()), MapMode(MapUnit::Map100thMM)));
 Size GraphicSize (rOutDev.LogicToPixel(aSize, 
MapMode(MapUnit::Map100thMM)));
-sal_uInt16 nZ = 
sal::static_int_cast(std::min(long(Fraction(OutputSize.Width()  * 
100L, GraphicSize.Width())),
-  
long(Fraction(OutputSize.Height() * 100L, GraphicSize.Height();
+sal_uInt16 nZ = 
sal::static_int_cast(std::min(long(Fraction(OutputSize.Width()  * 
100, GraphicSize.Width())),
+  
long(Fraction(OutputSize.Height() * 100, GraphicSize.Height();
 nZ -= 10;
 Fraction aFraction (std::max(MINZOOM, std::min(MAXZOOM, nZ)), 
100);
 
@@ -2019,8 +2019,8 @@ void SmViewShell::ZoomByItemSet(const SfxItemSet *pSet)
 Size   
OutputSize(pPrinter->LogicToPixel(Size(OutputRect.GetWidth(),
   
OutputRect.GetHeight()), aMap));
 Size   GraphicSize(pPrinter->LogicToPixel(GetDoc()->GetSize(), 
aMap));
-sal_uInt16 nZ = 
sal::static_int_cast(std::min(long(Fraction(OutputSize.Width()  * 
100L, GraphicSize.Width())),
-  
long(Fraction(OutputSize.Height() * 100L, GraphicSize.Height();
+sal_uInt16 nZ = 
sal::static_int_cast(std::min(long(Fraction(OutputSize.Width()  * 
100, GraphicSize.Width())),
+  
long(Fraction(OutputSize.Height() * 100, GraphicSize.Height();
 mpGraphic->SetZoom (nZ);
 break;
 }
diff --git a/starmath/source/visitors.cxx b/starmath/source/visitors.cxx
index a950046162bf..dcf36497a4eb 100644
--- a/starmath/source/visitors.cxx
+++ b/starmath/source/visitors.cxx
@@ -406,7 +406,7 @@ void SmDrawingVisitor::Visit( SmRootSymbolNode* pNode )
 // _unscaled_ font height to be used, we use that to calculate the
 // bar height. Thus it is independent of the arguments height.
 // ( see display of sqrt QQQ versus sqrt stack{Q#Q#Q#Q} )
-long nBarHeight = pNode->GetWidth( ) * 7L / 100L;
+long nBarHeight = pNode->GetWidth( ) * 7 / 100;
 long nBarWidth = pNode->GetBodyWidth( ) + pNode->GetBorderWidth( );
 Point aBarOffset( pNode->GetWidth( ), +pNode->GetBorderWidth( ) );
 Point aBarPos( maPosition + aBarOffset );
diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx
index 38c931434fd2..27c5d3a4de07 100644
--- a/svx/source/dialog/_bmpmask.cxx
+++ b/svx/source/dialog/_bmpmask.cxx
@@ -676,7 +676,7 @@ GDIMetaFile SvxBmpMask::ImpMask( const GDIMetaFile& rMtf )
 // Prepare Color comparison array
 for( i = 0; i < nCount; i++ )
 {
-long nTol = ( pTols[i] * 255L ) / 100L;
+long nTol = ( pTols[i] * 255 ) / 100;
 
 long nVal = static_cast(pSrcCols[i].GetRed());
 pMinR[i] = std::max( nVal - nTol, 0L );
diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx
index 1ca714868c17..fe08cad1fed7 100644
--- a/svx/source/dialog/_contdlg.cxx
+++ b/svx/source/dialog/_contdlg.cxx
@@ -631,7 +631,7 @@ IMPL_LINK( SvxSuperContourDlg, PipetteClickHdl, 
ContourWindow&, rWnd, void )

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

2020-01-27 Thread Onur Yilmaz (via logerrit)
 sfx2/source/doc/SfxRedactionHelper.cxx |   20 +++-
 1 file changed, 15 insertions(+), 5 deletions(-)

New commits:
commit 0025b74e8099ed79e7824a8d22335e882e0c635c
Author: Onur Yilmaz 
AuthorDate: Sun Jan 26 01:04:50 2020 +0300
Commit: Muhammet Kara 
CommitDate: Tue Jan 28 08:35:21 2020 +0100

tdf#127169: Auto-redaction doesn't cover the title completely

Change-Id: I5283ce535f436f066859467cf6ef50ee9a2d2fdd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87436
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 

diff --git a/sfx2/source/doc/SfxRedactionHelper.cxx 
b/sfx2/source/doc/SfxRedactionHelper.cxx
index bbcdeac79401..408c733c77e9 100644
--- a/sfx2/source/doc/SfxRedactionHelper.cxx
+++ b/sfx2/source/doc/SfxRedactionHelper.cxx
@@ -156,9 +156,6 @@ tools::Rectangle ImplCalcActionBounds(const MetaAction& 
rAct, const OutputDevice
 aActionBounds.SetLeft(rOut.PixelToLogic(aBoundRect1).getX()
   + 
rOut.PixelToLogic(aBoundRect1).getWidth());
 }
-
-// FIXME: Is this really needed?
-aActionBounds.SetTop(aActionBounds.getY() + 100);
 }
 }
 break;
@@ -425,14 +422,15 @@ void SfxRedactionHelper::searchInMetaFile(const 
RedactionTarget* pRedactionTarge
 fillSearchOptions(aSearchOptions, pRedactionTarget);
 
 utl::TextSearch textSearch(aSearchOptions);
+static long aLastFontHeight = 0;
 
 MetaAction* pCurrAct;
 
-// Watch for TEXTARRAY actions.
-// They contain the text of paragraphs.
 for (pCurrAct = const_cast(rMtf).FirstAction(); pCurrAct;
  pCurrAct = const_cast(rMtf).NextAction())
 {
+// Watch for TEXTARRAY actions.
+// They contain the text of paragraphs.
 if (pCurrAct->GetType() == MetaActionType::TEXTARRAY)
 {
 MetaTextArrayAction* pMetaTextArrayAction = 
static_cast(pCurrAct);
@@ -453,7 +451,14 @@ void SfxRedactionHelper::searchInMetaFile(const 
RedactionTarget* pRedactionTarge
 ImplCalcActionBounds(*pMetaTextArrayAction, 
*pOutputDevice, nStart, nEnd));
 
 if (!aNewRect.IsEmpty())
+{
+// Calculate the difference between current wrong value 
and value should it be.
+// Add the difference to current value.
+// Then increase 10% of the new value to make it look 
better.
+aNewRect.SetTop(aNewRect.getY() + (aNewRect.getHeight() - 
aLastFontHeight)
+- aLastFontHeight / 10);
 aRedactionRectangles.push_back(aNewRect);
+}
 
 // Search for the next occurrence
 nStart = nEnd;
@@ -461,6 +466,11 @@ void SfxRedactionHelper::searchInMetaFile(const 
RedactionTarget* pRedactionTarge
 bFound = textSearch.SearchForward(sText, , );
 }
 }
+else if (pCurrAct->GetType() == MetaActionType::FONT)
+{
+const MetaFontAction* pFontAct = static_cast(pCurrAct);
+aLastFontHeight = pFontAct->GetFont().GetFontSize().getHeight();
+}
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-01-25 Thread Onur Yilmaz (via logerrit)
 unoidl/source/unoidlprovider.hxx |5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit ef86e72fb06e1b59d1587828d1a9089b50767144
Author: Onur Yilmaz 
AuthorDate: Sat Jan 25 15:27:50 2020 +0300
Commit: Muhammet Kara 
CommitDate: Sat Jan 25 17:44:11 2020 +0100

tdf#124176: Use pragma once instead of include guards

Change-Id: I093227c37d9ddb056aaa0c13ec413164dfc6780e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87393
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 

diff --git a/unoidl/source/unoidlprovider.hxx b/unoidl/source/unoidlprovider.hxx
index 4e2fce161323..0013af54284f 100644
--- a/unoidl/source/unoidlprovider.hxx
+++ b/unoidl/source/unoidlprovider.hxx
@@ -7,8 +7,7 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#ifndef INCLUDED_UNOIDL_SOURCE_UNOIDLPROVIDER_HXX
-#define INCLUDED_UNOIDL_SOURCE_UNOIDLPROVIDER_HXX
+#pragma once
 
 #include 
 
@@ -54,6 +53,4 @@ private:
 
 } }
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-01-16 Thread Onur Yilmaz (via logerrit)
 sfx2/source/bastyp/mieclip.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5434688e5c38d438444dd8d088dff9d3de58214a
Author: Onur Yilmaz 
AuthorDate: Sat Jan 11 19:12:07 2020 +0300
Commit: Michael Stahl 
CommitDate: Thu Jan 16 16:37:01 2020 +0100

tdf#75280 Convert inappropriate use of sal_uIntPtr to better integer types

Change-Id: I9f2b7d3cd0954f5ffa3cfb194cd625ea175ff6bc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86608
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/sfx2/source/bastyp/mieclip.cxx b/sfx2/source/bastyp/mieclip.cxx
index ecd2ebba936f..dd3871db719a 100644
--- a/sfx2/source/bastyp/mieclip.cxx
+++ b/sfx2/source/bastyp/mieclip.cxx
@@ -79,7 +79,7 @@ SvStream* MSE40HTMLClipFormatObj::IsValid( SvStream& rStream )
 
 if (nFragStart > 0 && nFragEnd > 0 && nFragEnd > nFragStart)
 {
-sal_uIntPtr nSize = static_cast(nFragEnd - nFragStart + 
1);
+size_t nSize = static_cast(nFragEnd - nFragStart + 1);
 if (nSize < 0x1L)
 {
 rStream.Seek(nFragStart);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-01-13 Thread Onur Yilmaz (via logerrit)
 svx/source/dialog/searchcharmap.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 9dce33e6943dec5ff111802ec3e7c338abf56592
Author: Onur Yilmaz 
AuthorDate: Sat Jan 11 19:45:34 2020 +0300
Commit: Michael Stahl 
CommitDate: Mon Jan 13 12:11:29 2020 +0100

Proper integer in SvxSearchCharSet::LastInView

At the recommendation of comment in Patch Set 6:

https://gerrit.libreoffice.org/c/core/+/85960/6/svx/source/dialog/searchcharmap.cxx#54

Change-Id: Ie2799b5e609b4843907a0a3e361ab4253b6cb9a2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86611
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/svx/source/dialog/searchcharmap.cxx 
b/svx/source/dialog/searchcharmap.cxx
index 09868195aa66..09517c8fd117 100644
--- a/svx/source/dialog/searchcharmap.cxx
+++ b/svx/source/dialog/searchcharmap.cxx
@@ -53,9 +53,9 @@ 
SvxSearchCharSet::SvxSearchCharSet(std::unique_ptr pScroll
 
 int SvxSearchCharSet::LastInView() const
 {
-sal_uInt32 nIndex = FirstInView();
+int nIndex = FirstInView();
 nIndex += ROW_COUNT * COLUMN_COUNT - 1;
-sal_uInt32 nCompare = sal::static_int_cast(nCount - 1);
+int nCompare = nCount - 1;
 if (nIndex > nCompare)
 nIndex = nCompare;
 return nIndex;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-01-07 Thread Onur Yilmaz (via logerrit)
 svx/source/dialog/searchcharmap.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 1a5832e8340a2502f24d7fea98c656e629887d2e
Author: Onur Yilmaz 
AuthorDate: Sun Dec 29 22:48:54 2019 +0300
Commit: Muhammet Kara 
CommitDate: Tue Jan 7 18:24:40 2020 +0100

tdf#75280: Convert inappropriate use of sal_uIntPtr to better integer types

Change-Id: Ie82a0e15f8c2ed3148277d88c0db8164b5b9393c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85960
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 

diff --git a/svx/source/dialog/searchcharmap.cxx 
b/svx/source/dialog/searchcharmap.cxx
index 13be945ae15f..115ca8b36ba7 100644
--- a/svx/source/dialog/searchcharmap.cxx
+++ b/svx/source/dialog/searchcharmap.cxx
@@ -53,9 +53,9 @@ 
SvxSearchCharSet::SvxSearchCharSet(std::unique_ptr pScroll
 
 int SvxSearchCharSet::LastInView() const
 {
-sal_uIntPtr nIndex = FirstInView();
+sal_uInt32 nIndex = FirstInView();
 nIndex += ROW_COUNT * COLUMN_COUNT - 1;
-sal_uIntPtr nCompare = sal::static_int_cast(nCount - 1);
+sal_uInt32 nCompare = sal::static_int_cast(nCount - 1);
 if (nIndex > nCompare)
 nIndex = nCompare;
 return nIndex;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-01-02 Thread Onur Yilmaz (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlexport5.cxx |  196 ++
 1 file changed, 44 insertions(+), 152 deletions(-)

New commits:
commit 873ce9b271b00e044912f4849ae2649b4fa21efd
Author: Onur Yilmaz 
AuthorDate: Thu Dec 26 01:16:52 2019 +0300
Commit: Mike Kaganski 
CommitDate: Thu Jan 2 20:03:10 2020 +0100

tdf#129423: Make export tests export-only where applicable

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

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
index 8e394f7a445c..9cc5e69775cf 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
@@ -44,11 +44,9 @@ protected:
 }
 };
 
-DECLARE_OOXMLEXPORT_TEST(testFDO76248, "FDO76248.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO76248, "FDO76248.docx")
 {
 xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-if (!pXmlDoc)
-   return;
 // In two cases the a:graphicData elements had no children, which is 
invalid.
 assertXPath(pXmlDoc, "//a:graphicData[not(*)]", 0);
 }
@@ -92,7 +90,7 @@ DECLARE_OOXMLEXPORT_TEST(testTscp, "tscp.docx")
 CPPUNIT_ASSERT_EQUAL(false, 
static_cast(xStatements->hasMoreElements()));
 }
 
-DECLARE_OOXMLEXPORT_TEST(testfdo76589 , "fdo76589.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo76589 , "fdo76589.docx")
 {
 /* Numbered list was not preserve after RT.
  * In numbering.xml, when NumberingType is "decimal" and level is zero,
@@ -100,8 +98,6 @@ DECLARE_OOXMLEXPORT_TEST(testfdo76589 , "fdo76589.docx")
  * It should be 
  */
 xmlDocPtr pXmlDoc = parseExport("word/numbering.xml");
-if (!pXmlDoc)
-return;
 
 assertXPath ( pXmlDoc, 
"/w:numbering/w:abstractNum[1]/w:lvl[1]/w:lvlText","val","%1" );
 }
@@ -131,13 +127,10 @@ DECLARE_OOXMLEXPORT_TEST(testfdo79008, "fdo79008.docx")
 return;
 }
 
-DECLARE_OOXMLEXPORT_TEST(testAuthorPropertySdt, "author-property.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testAuthorPropertySdt, 
"author-property.docx")
 {
 xmlDocPtr pXmlDoc = parseExport("word/document.xml");
 
-if (!pXmlDoc)
-   return;
-
 assertXPath(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtPr/w:dataBinding", 
"xpath", "/ns1:coreProperties[1]/ns0:creator[1]");
 assertXPath(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtPr/w:dataBinding", 
"storeItemID","{6C3C8BC8-F283-45AE-878A-BAB7291924A1}");
 // FIXME: the next property doesn't match, though it's correct in theory. 
A bug in assertXPath?
@@ -145,7 +138,7 @@ DECLARE_OOXMLEXPORT_TEST(testAuthorPropertySdt, 
"author-property.docx")
 //"xmlns:ns0='http://purl.org/dc/elements/1.1/' 
xmlns:ns1='http://schemas.openxmlformats.org/package/2006/metadata/core-properties'");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testFDO76586, "fdo76586.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO76586, "fdo76586.docx")
 {
 /*
  * In the test file gridCol had only one value for entire table width
@@ -154,24 +147,19 @@ DECLARE_OOXMLEXPORT_TEST(testFDO76586, "fdo76586.docx")
  */
 xmlDocPtr pXmlDoc = parseExport("word/document.xml");
 
-if (!pXmlDoc)
-   return;
-
 // there is only one table in the test file
 assertXPath(pXmlDoc, "//w:tblGrid/w:gridCol[1]", "w", "1601");
 assertXPath(pXmlDoc, "//w:tblGrid/w:gridCol[2]", "w", "7843");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testFDO76587 , "fdo76587.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO76587 , "fdo76587.docx")
 {
 xmlDocPtr pXmlDoc = parseExport("word/styles.xml");
-if (!pXmlDoc)
-return;
 assertXPath(pXmlDoc, "/w:styles/w:style[8]/w:pPr/w:spacing", "line", 
"240");
 assertXPath(pXmlDoc, "/w:styles/w:style[8]/w:pPr/w:spacing", "lineRule", 
"auto");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testFDO77890 , "fdo77890.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO77890 , "fdo77890.docx")
 {
 /*
 Ensure that the page break is preserved i.e it should not be converted to 
a section break, in case
@@ -179,17 +167,13 @@ DECLARE_OOXMLEXPORT_TEST(testFDO77890 , "fdo77890.docx")
 For additional comments please refer to 
https://www.libreoffice.org/bugzilla/show_bug.cgi?id=77890#c2
 */
 xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-if (!pXmlDoc)
-return;
 assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[2]/w:br", "type", 
"page");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testNumberedList,"NumberedList.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testNumberedList,"NumberedList.docx")
 {
 //fdo74150:In document.xml, for pStyle = "NumberedList1", iLvl and numId 
was not preserved
 xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-if (!pXmlDoc)
-return;
 assertXPath(pXmlDoc, 
"/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:p[1]/w:pPr[1]/w:pStyle", "val", 
"NumberedList1");
 assertXPath(pXmlDoc, 

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

2020-01-02 Thread Onur Yilmaz (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlexport6.cxx |  104 +++---
 1 file changed, 27 insertions(+), 77 deletions(-)

New commits:
commit 408f84f6b95a99013b841e1d923ec4cb05bd2a5c
Author: Onur Yilmaz 
AuthorDate: Thu Dec 26 02:13:26 2019 +0300
Commit: Mike Kaganski 
CommitDate: Thu Jan 2 20:01:05 2020 +0100

tdf#129423: Make export tests export-only where applicable

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

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
index d460679b50ba..3b5726dceb28 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
@@ -47,20 +47,16 @@ DECLARE_OOXMLEXPORT_TEST(testDmlShapeTitle, 
"dml-shape-title.docx")
 CPPUNIT_ASSERT_EQUAL(OUString("Description"), 
getProperty(getShape(1), "Description"));
 }
 
-DECLARE_OOXMLEXPORT_TEST(testDmlZorder, "dml-zorder.odt")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testDmlZorder, "dml-zorder.odt")
 {
 xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-if (!pXmlDoc)
-return;
 // This was "0": causing that in Word, the second shape was on top, while 
in the original odt the first shape is on top.
 assertXPath(pXmlDoc, 
"/w:document/w:body/w:p/w:r/mc:AlternateContent[1]/mc:Choice/w:drawing/wp:anchor",
 "relativeHeight", "2");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testDmlShapeRelsize, "dml-shape-relsize.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testDmlShapeRelsize, 
"dml-shape-relsize.docx")
 {
 xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-if (!pXmlDoc)
-return;
 // Relative size wasn't exported all, then relativeFrom was "page", not 
"margin".
 assertXPath(pXmlDoc, 
"/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/wp14:sizeRelH",
 "relativeFrom", "margin");
 }
@@ -76,11 +72,9 @@ DECLARE_OOXMLEXPORT_TEST(testDmlPictureInTextframe, 
"dml-picture-in-textframe.do
 CPPUNIT_ASSERT_EQUAL(false, 
bool(xNameAccess->hasByName("word/media/image2.gif")));
 }
 
-DECLARE_OOXMLEXPORT_TEST(testDmlGroupshapeRelsize, 
"dml-groupshape-relsize.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testDmlGroupshapeRelsize, 
"dml-groupshape-relsize.docx")
 {
 xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-if (!pXmlDoc)
-return;
 // Relative size wasn't imported.
 assertXPath(pXmlDoc, 
"/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/wp14:sizeRelH",
 "relativeFrom", "margin");
 }
@@ -349,15 +343,13 @@ DECLARE_OOXMLEXPORT_TEST(testDMLGroupShapeChildPosition, 
"dml-groupshape-childpo
 CPPUNIT_ASSERT_EQUAL(sal_Int32(mbExported ? 14026 : 14023), 
xChildGroup->getPosition().Y);
 }
 
-DECLARE_OOXMLEXPORT_TEST(testDMLGradientFillTheme, 
"dml-gradientfill-theme.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testDMLGradientFillTheme, 
"dml-gradientfill-theme.docx")
 {
 // Problem was when a fill gradient was imported from a theme, (fillRef in 
ooxml)
 // not just the theme was written out but the explicit values too
 // Besides the duplication of values it causes problems with writing out
 //  into document.xml, while phClr can be used 
just for theme definitions.
 xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-if (!pXmlDoc)
-return;
 
 // check no explicit gradFill has been exported
 assertXPath(pXmlDoc,
@@ -443,36 +435,30 @@ DECLARE_OOXMLEXPORT_TEST(testTableFloatingMargins, 
"table-floating-margins.docx"
 CPPUNIT_ASSERT_EQUAL(sal_Int32(1000), getProperty(xFrame, 
"TopMargin"));
 CPPUNIT_ASSERT_EQUAL(sal_Int32(2000), getProperty(xFrame, 
"BottomMargin"));
 
+if (!mbExported)
+return;
 // Paragraph bottom margin wasn't 0 in the A1 cell of the floating table.
 xmlDocPtr pXmlDoc = parseExport();
-if (!pXmlDoc)
-return;
 assertXPath(pXmlDoc, 
"/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:p/w:pPr/w:spacing", "after", "0");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testTdf127814, "tdf127814.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf127814, "tdf127814.docx")
 {
 // Paragraph top margin was 0 in a table started on a new page
 xmlDocPtr pXmlDoc = parseExport();
-if (!pXmlDoc)
-return;
 assertXPath(pXmlDoc, 
"/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:p/w:pPr/w:spacing", "before", "0");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testTdf128752, "tdf128752.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf128752, "tdf128752.docx")
 {
 // Paragraph bottom margin was 200, docDefault instead of table style 
setting
 xmlDocPtr pXmlDoc = parseExport();
-if (!pXmlDoc)
-return;
 assertXPath(pXmlDoc, 
"/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:p[1]/w:pPr/w:spacing", "after", 
"0");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testTdf119054, "tdf119054.docx")

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

2019-12-25 Thread Onur Yilmaz (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlexport4.cxx |  163 +++---
 1 file changed, 40 insertions(+), 123 deletions(-)

New commits:
commit c48b3d092976f5b8a162408d885b178b4660d91d
Author: Onur Yilmaz 
AuthorDate: Thu Dec 26 00:37:30 2019 +0300
Commit: Mike Kaganski 
CommitDate: Thu Dec 26 07:03:54 2019 +0100

tdf#129423: Make export tests export-only where applicable

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

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
index a09479e44ea0..bac58439d272 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
@@ -98,51 +98,39 @@ DECLARE_OOXMLEXPORT_TEST(testAutofit, "autofit.docx")
 CPPUNIT_ASSERT_EQUAL(false, getProperty(getShape(2), 
"TextAutoGrowHeight"));
 }
 
-DECLARE_OOXMLEXPORT_TEST(testTrackChangesDeletedParagraphMark, 
"testTrackChangesDeletedParagraphMark.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTrackChangesDeletedParagraphMark, 
"testTrackChangesDeletedParagraphMark.docx")
 {
 xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-if (!pXmlDoc)
-return;
 assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:rPr/w:del");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testTrackChangesInsertedParagraphMark, 
"testTrackChangesInsertedParagraphMark.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTrackChangesInsertedParagraphMark, 
"testTrackChangesInsertedParagraphMark.docx")
 {
 xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-if (!pXmlDoc)
-return;
 assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:rPr/w:ins");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testTrackChangesDeletedTableRow, 
"testTrackChangesDeletedTableRow.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTrackChangesDeletedTableRow, 
"testTrackChangesDeletedTableRow.docx")
 {
 xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-if (!pXmlDoc)
-return;
 assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:trPr/w:del");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testTrackChangesInsertedTableRow, 
"testTrackChangesInsertedTableRow.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTrackChangesInsertedTableRow, 
"testTrackChangesInsertedTableRow.docx")
 {
 xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-if (!pXmlDoc)
-return;
 assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:trPr/w:ins");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testTrackChangesDeletedTableCell, 
"testTrackChangesDeletedTableCell.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTrackChangesDeletedTableCell, 
"testTrackChangesDeletedTableCell.docx")
 {
 xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-if (!pXmlDoc)
-return;
 assertXPath(pXmlDoc, 
"/w:document/w:body/w:tbl/w:tr[3]/w:tc/w:tcPr/w:cellDel");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testTrackChangesInsertedTableCell, 
"testTrackChangesInsertedTableCell.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTrackChangesInsertedTableCell, 
"testTrackChangesInsertedTableCell.docx")
 {
 xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-if (!pXmlDoc)
-return;
 assertXPath(pXmlDoc, 
"/w:document/w:body/w:tbl/w:tr[3]/w:tc/w:tcPr/w:cellIns");
 }
 
@@ -161,27 +149,21 @@ DECLARE_OOXMLEXPORT_TEST(testTextBoxPictureFill, 
"textbox_picturefill.docx")
 CPPUNIT_ASSERT_EQUAL(528L, aGraphic.GetSizePixel().Height());
 }
 
-DECLARE_OOXMLEXPORT_TEST(testFDO73034, "FDO73034.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO73034, "FDO73034.docx")
 {
 xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-if (!pXmlDoc)
-return;
 CPPUNIT_ASSERT(getXPath(pXmlDoc, 
"/w:document/w:body/w:p[1]/w:pPr/w:rPr/w:u", "val").match("single"));
 }
 
-DECLARE_OOXMLEXPORT_TEST(testFDO71834, "fdo71834.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO71834, "fdo71834.docx")
 {
 xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-if (!pXmlDoc)
-return;
 assertXPath(pXmlDoc, 
"/w:document/w:body/w:tbl[1]/w:tr[2]/w:tc[1]/w:tcPr[1]/w:tcW[1]","type", "dxa");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testTrackChangesParagraphProperties, 
"testTrackChangesParagraphProperties.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTrackChangesParagraphProperties, 
"testTrackChangesParagraphProperties.docx")
 {
 xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-if (!pXmlDoc)
-return;
 assertXPathChildren(pXmlDoc, 
"/w:document/w:body/w:p[1]/w:pPr/w:pPrChange", 0);
 }
 
@@ -245,7 +227,7 @@ 
DECLARE_OOXMLEXPORT_TEST(testTableRowDataDisplayedTwice,"table-row-data-displaye
 CPPUNIT_ASSERT_EQUAL(sal_Int16(2), xCursor->getPage());
 }
 
-DECLARE_OOXMLEXPORT_TEST(testFdo73556,"fdo73556.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFdo73556,"fdo73556.docx")
 {
 /*
 *  The file contains a table with 3 

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

2019-12-25 Thread Onur Yilmaz (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx |  146 ++
 1 file changed, 36 insertions(+), 110 deletions(-)

New commits:
commit 5c907e0718bda1cc8631eacabc1b41e4d9617332
Author: Onur Yilmaz 
AuthorDate: Thu Dec 26 00:04:48 2019 +0300
Commit: Mike Kaganski 
CommitDate: Thu Dec 26 07:00:47 2019 +0100

tdf#129423: Make export tests export-only where applicable

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

diff --git a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
index d20d8a90938f..9b08dae1b844 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
@@ -57,13 +57,11 @@ DECLARE_OOXMLEXPORT_TEST(testN789482, "n789482.docx")
 getRun(xParagraph, 5, " After.");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testBnc834035, "bnc834035.odt")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testBnc834035, "bnc834035.odt")
 {
 // Illustration index had wrong hyperlinks: anchor was using Writer's
 // !|sequence syntax, not a bookmark name.
 xmlDocPtr pXmlDoc = parseExport();
-if (!pXmlDoc)
-return;
 // This was Figure!1|sequence.
 assertXPath(pXmlDoc, "/w:document/w:body/w:p[10]/w:hyperlink", "anchor", 
"_Toc363553908");
 }
@@ -75,41 +73,35 @@ DECLARE_OOXMLEXPORT_TEST(testCp115, "cp115.odt")
 getParagraph(2, "http://www.google.com/;);
 }
 
-DECLARE_OOXMLEXPORT_TEST(testHyperlineIsEnd, "hyperlink.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testHyperlineIsEnd, "hyperlink.docx")
 {
 // Check  that the document.xml contents all the tag properly closed.
 xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-if (!pXmlDoc)
-return;
 // If  document.xml miss any ending tag then parseExport() returns NULL 
which fail the test case.
 CPPUNIT_ASSERT(pXmlDoc) ;
 // Check hyperlink is properly open.
 assertXPath(pXmlDoc, 
"/w:document/w:body/w:sdt/w:sdtContent/w:p/w:hyperlink",1);
 }
 
-DECLARE_OOXMLEXPORT_TEST(testFdo69649, "fdo69649.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFdo69649, "fdo69649.docx")
 {
 // The DOCX containing the Table of Contents was not exported with correct 
page nos
 xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-if (!pXmlDoc)
-return;
 
 assertXPathContent(pXmlDoc, 
"/w:document/w:body/w:sdt/w:sdtContent/w:p[21]/w:hyperlink/w:r[5]/w:t", "15");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testFieldFlagO,"TOC_field_f.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFieldFlagO,"TOC_field_f.docx")
 {
 // This test case is to verify \o flag should come once.
 xmlDocPtr pXmlDoc = parseExport();
-if (!pXmlDoc)
-return;
 
 // FIXME "p[2]" will have to be "p[1]", once the TOC import code is fixed
 // not to insert an empty paragraph before TOC.
 assertXPathContent(pXmlDoc, 
"/w:document/w:body/w:sdt/w:sdtContent/w:p[1]/w:r[2]/w:instrText", " TOC \\z 
\\f \\o \"1-3\" \\u \\h");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testTOCFlag_f, "toc_doc.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTOCFlag_f, "toc_doc.docx")
 {
 // Export logic for all TOC field flags was enclosed inside
 // if( SwTOXElement::Mark & pTOX->GetCreateType() ) in ww8atr.cxx which 
gets true for \f,
@@ -118,135 +110,109 @@ DECLARE_OOXMLEXPORT_TEST(testTOCFlag_f, "toc_doc.docx")
 // This test case is to verify even if there is no \f flag in original 
doc, \h flag is getting
 // preserved after RT.
 xmlDocPtr pXmlDoc = parseExport();
-if (!pXmlDoc)
-return;
 
 // FIXME "p[2]" will have to be "p[1]", once the TOC import code is fixed
 // not to insert an empty paragraph before TOC.
 assertXPathContent(pXmlDoc, 
"/w:document/w:body/w:sdt/w:sdtContent/w:p[1]/w:r[2]/w:instrText", " TOC \\z 
\\o \"1-3\" \\u \\h");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testPreserveZfield,"preserve_Z_field_TOC.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testPreserveZfield,"preserve_Z_field_TOC.docx")
 {
 xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-if (!pXmlDoc)
-return;
 
 assertXPathContent(pXmlDoc, 
"/w:document/w:body/w:sdt/w:sdtContent/w:p[1]/w:r[2]/w:instrText", " TOC \\z 
\\f \\o \"1-3\" \\h");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testPreserveWfieldTOC, "PreserveWfieldTOC.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testPreserveWfieldTOC, 
"PreserveWfieldTOC.docx")
 {
 xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-if (!pXmlDoc)
-return;
 
 assertXPathContent(pXmlDoc, 
"/w:document/w:body/w:sdt/w:sdtContent/w:p/w:r[2]/w:instrText", " TOC \\z \\w 
\\f \\o \"1-3\" \\h");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testFieldFlagB,"TOC_field_b.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFieldFlagB,"TOC_field_b.docx")
 {
 // This test case is to verify \b flag.
 xmlDocPtr pXmlDoc = parseExport();
-if (!pXmlDoc)

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

2019-12-25 Thread Onur Yilmaz (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlexport7.cxx |  145 +++---
 1 file changed, 36 insertions(+), 109 deletions(-)

New commits:
commit ae26c6a3cc7662c4e2a9b4c684f64b44ae28e8a9
Author: Onur Yilmaz 
AuthorDate: Thu Dec 26 01:56:31 2019 +0300
Commit: Mike Kaganski 
CommitDate: Thu Dec 26 06:55:50 2019 +0100

tdf#129423: Make export tests export-only where applicable

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

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
index b673c06a3d2a..344b493dae4b 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
@@ -34,7 +34,7 @@ protected:
 }
 };
 
-DECLARE_OOXMLEXPORT_TEST( testChildNodesOfCubicBezierTo, "FDO74774.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST( testChildNodesOfCubicBezierTo, 
"FDO74774.docx")
 {
 /* Number of children required by cubicBexTo is 3 of type "pt".
While exporting, sometimes the child nodes are less than 3.
@@ -42,19 +42,15 @@ DECLARE_OOXMLEXPORT_TEST( testChildNodesOfCubicBezierTo, 
"FDO74774.docx")
for cubicBexTo
  */
 xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-if (!pXmlDoc)
-return;
 
 assertXPath( pXmlDoc,
 
"/w:document/w:body/w:p[2]/w:r[1]/mc:AlternateContent[1]/mc:Choice/w:drawing[1]/wp:inline[1]/a:graphic[1]/a:graphicData[1]/wpg:wgp[1]/wps:wsp[3]/wps:spPr[1]/a:custGeom[1]/a:pathLst[1]/a:path[1]/a:cubicBezTo[2]/a:pt[3]");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testMSwordHang,"test_msword_hang.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testMSwordHang,"test_msword_hang.docx")
 {
 // fdo#74771:
 xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-if (!pXmlDoc)
-return;
 assertXPath(pXmlDoc, 
"/w:document/w:body/w:p[2]/w:r[1]/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:txbx/w:txbxContent/w:p/w:r[2]/w:drawing/wp:inline",
 "distT", "0");
 }
 
@@ -68,11 +64,9 @@ DECLARE_OOXMLEXPORT_TEST(testGroupshapeThemeFont, 
"groupshape-theme-font.docx")
 CPPUNIT_ASSERT_EQUAL(OUString("Cambria"), getProperty(xRun, 
"CharFontName"));
 }
 
-DECLARE_OOXMLEXPORT_TEST(testAnchorIdForWP14AndW14, "AnchorId.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testAnchorIdForWP14AndW14, "AnchorId.docx")
 {
 xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-if (!pXmlDoc)
-return;
 
 assertXPath(pXmlDoc, 
"/w:document/w:body/w:p[1]/w:r[3]/mc:AlternateContent/mc:Choice/w:drawing/wp:inline",
 "anchorId", "78735EFD");
 assertXPath(pXmlDoc, 
"/w:document/w:body/w:p[1]/w:r[3]/mc:AlternateContent/mc:Fallback/w:pict/v:rect",
 "anchorId", "78735EFD");
@@ -120,7 +114,7 @@ DECLARE_OOXMLEXPORT_TEST(testPictureWatermark, 
"pictureWatermark.docx")
 }
 
 
-DECLARE_OOXMLEXPORT_TEST(testFdo76249, "fdo76249.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFdo76249, "fdo76249.docx")
 {
 /*
  * The Locked Canvas is imported correctly, but while exporting
@@ -129,26 +123,20 @@ DECLARE_OOXMLEXPORT_TEST(testFdo76249, "fdo76249.docx")
  * are not allowed inside the textboxes.
  */
 xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-if (!pXmlDoc)
-   return;
 assertXPath(pXmlDoc, 
"/w:document[1]/w:body[1]/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Fallback[1]/w:pict[1]/v:rect[1]/v:textbox[1]/w:txbxContent[1]/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:inline[1]/a:graphic[1]/a:graphicData[1]/lc:lockedCanvas[1]",1);
 }
 
-DECLARE_OOXMLEXPORT_TEST(testFdo76979, "fdo76979.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFdo76979, "fdo76979.docx")
 {
 // The problem was that black was exported as "auto" fill color, resulting 
in well-formed, but invalid XML.
 xmlDocPtr pXmlDoc = parseExport("word/header2.xml");
-if (!pXmlDoc)
-   return;
 // This was "auto", not "FF".
 assertXPath(pXmlDoc, "//wps:spPr/a:solidFill/a:srgbClr", "val", "FF");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testShapeEffectPreservation, 
"shape-effect-preservation.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testShapeEffectPreservation, 
"shape-effect-preservation.docx")
 {
 xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-if (!pXmlDoc)
-   return;
 
 // first shape with outer shadow, rgb color
 assertXPath(pXmlDoc, 
"/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
@@ -288,11 +276,9 @@ DECLARE_OOXMLEXPORT_TEST(testShapeEffectPreservation, 
"shape-effect-preservation
 "stA", "52000");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testShape3DEffectPreservation, 
"shape-3d-effect-preservation.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testShape3DEffectPreservation, 
"shape-3d-effect-preservation.docx")
 {
 xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-if (!pXmlDoc)
-   return;
 
  

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

2019-12-20 Thread Onur Yilmaz (via logerrit)
 forms/source/component/Button.hxx |6 +-
 forms/source/component/CheckBox.hxx   |6 +-
 forms/source/component/Columns.hxx|5 +
 forms/source/component/cachedrowset.hxx   |6 +-
 forms/source/component/clickableimage.hxx |6 +-
 5 files changed, 5 insertions(+), 24 deletions(-)

New commits:
commit 1c7fb79ad1c9356424ff1ed489cc2ac04cc1d68d
Author: Onur Yilmaz 
AuthorDate: Thu Dec 19 03:24:31 2019 +0300
Commit: Muhammet Kara 
CommitDate: Fri Dec 20 21:10:29 2019 +0100

tdf#124176: Use pragma once instead of include guards

Change-Id: I083ae8efad8bdf116ef98038fa1e15037655aba9
Reviewed-on: https://gerrit.libreoffice.org/85459
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 

diff --git a/forms/source/component/Button.hxx 
b/forms/source/component/Button.hxx
index 341ea2dc2c00..fa77e4abd3a7 100644
--- a/forms/source/component/Button.hxx
+++ b/forms/source/component/Button.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_FORMS_SOURCE_COMPONENT_BUTTON_HXX
-#define INCLUDED_FORMS_SOURCE_COMPONENT_BUTTON_HXX
+#pragma once
 
 #include "clickableimage.hxx"
 #include 
@@ -192,7 +191,4 @@ private:
 
 }   // namespace frm
 
-
-#endif // INCLUDED_FORMS_SOURCE_COMPONENT_BUTTON_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/forms/source/component/CheckBox.hxx 
b/forms/source/component/CheckBox.hxx
index ea2e633a28ca..7f4ab7103153 100644
--- a/forms/source/component/CheckBox.hxx
+++ b/forms/source/component/CheckBox.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_FORMS_SOURCE_COMPONENT_CHECKBOX_HXX
-#define INCLUDED_FORMS_SOURCE_COMPONENT_CHECKBOX_HXX
+#pragma once
 
 #include "refvaluecomponent.hxx"
 
@@ -74,7 +73,4 @@ public:
 
 }
 
-
-#endif // INCLUDED_FORMS_SOURCE_COMPONENT_CHECKBOX_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/forms/source/component/Columns.hxx 
b/forms/source/component/Columns.hxx
index 2db0bfb2218a..c24ca8a013de 100644
--- a/forms/source/component/Columns.hxx
+++ b/forms/source/component/Columns.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_FORMS_SOURCE_COMPONENT_COLUMNS_HXX
-#define INCLUDED_FORMS_SOURCE_COMPONENT_COLUMNS_HXX
+#pragma once
 
 #include 
 #include 
@@ -198,6 +197,4 @@ DECL_COLUMN(FormattedFieldColumn)
 
 }   // namespace frm
 
-#endif // INCLUDED_FORMS_SOURCE_COMPONENT_COLUMNS_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/forms/source/component/cachedrowset.hxx 
b/forms/source/component/cachedrowset.hxx
index 03dd635c724e..9e61e57596e0 100644
--- a/forms/source/component/cachedrowset.hxx
+++ b/forms/source/component/cachedrowset.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_FORMS_SOURCE_COMPONENT_CACHEDROWSET_HXX
-#define INCLUDED_FORMS_SOURCE_COMPONENT_CACHEDROWSET_HXX
+#pragma once
 
 #include 
 #include 
@@ -78,7 +77,4 @@ namespace frm
 
 } // namespace frm
 
-
-#endif // INCLUDED_FORMS_SOURCE_COMPONENT_CACHEDROWSET_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/forms/source/component/clickableimage.hxx 
b/forms/source/component/clickableimage.hxx
index 30342d060601..d4a5065e0383 100644
--- a/forms/source/component/clickableimage.hxx
+++ b/forms/source/component/clickableimage.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_FORMS_SOURCE_COMPONENT_CLICKABLEIMAGE_HXX
-#define INCLUDED_FORMS_SOURCE_COMPONENT_CLICKABLEIMAGE_HXX
+#pragma once
 
 #include 
 #include 
@@ -275,7 +274,4 @@ namespace frm
 
 }   // namespace frm
 
-
-#endif // INCLUDED_FORMS_SOURCE_COMPONENT_CLICKABLEIMAGE_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2019-12-18 Thread Onur Yilmaz (via logerrit)
 cui/source/options/certpath.hxx |5 +
 cui/source/options/cfgchart.hxx |5 +
 2 files changed, 2 insertions(+), 8 deletions(-)

New commits:
commit 42a1a1c6b91907f81e15066ffab219411f18c4db
Author: Onur Yilmaz 
AuthorDate: Wed Dec 18 20:00:14 2019 +0300
Commit: Muhammet Kara 
CommitDate: Thu Dec 19 01:50:29 2019 +0100

tdf#124176: Use pragma once instead of include guards

Change-Id: I2f58499164254eab1d2f628b3b64710e1d2efbeb
Reviewed-on: https://gerrit.libreoffice.org/85415
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 

diff --git a/cui/source/options/certpath.hxx b/cui/source/options/certpath.hxx
index c23812eefed3..b040a31d3c94 100644
--- a/cui/source/options/certpath.hxx
+++ b/cui/source/options/certpath.hxx
@@ -7,8 +7,7 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#ifndef INCLUDED_CUI_SOURCE_OPTIONS_CERTPATH_HXX
-#define INCLUDED_CUI_SOURCE_OPTIONS_CERTPATH_HXX
+#pragma once
 
 #include 
 
@@ -37,6 +36,4 @@ public:
 OUString getDirectory() const;
 };
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/options/cfgchart.hxx b/cui/source/options/cfgchart.hxx
index 4984d1bd31e8..acbe41a9b41e 100644
--- a/cui/source/options/cfgchart.hxx
+++ b/cui/source/options/cfgchart.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_CUI_SOURCE_OPTIONS_CFGCHART_HXX
-#define INCLUDED_CUI_SOURCE_OPTIONS_CFGCHART_HXX
+#pragma once
 
 #include 
 #include 
@@ -98,6 +97,4 @@ private:
 SvxChartColorTable  m_aColorTable;
 };
 
-#endif // INCLUDED_CUI_SOURCE_OPTIONS_CFGCHART_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits