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

2023-11-02 Thread Henry Castro (via logerrit)
 sd/qa/unit/data/pptx/master-slides.pptx |binary
 sd/qa/unit/import-tests2.cxx|   10 ++
 2 files changed, 10 insertions(+)

New commits:
commit 41097d6168de85c183be1c8a014c7e85de624060
Author: Henry Castro 
AuthorDate: Mon Oct 9 10:29:40 2023 -0400
Commit: Xisco Fauli 
CommitDate: Thu Nov 2 09:29:25 2023 +0100

tdf#155512: sd: qa: unit: add unit test "testMasterSlides"

.
Signed-off-by: Henry Castro 
Change-Id: I6117b384fdad215e6c04b6e74df22fe9daa6a526
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157705
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Caolán McNamara 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158739
Tested-by: Jenkins
(cherry picked from commit 32e6ef3834a0f96d7830719950de52c99aae0263)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158701
Reviewed-by: Xisco Fauli 
Tested-by: Xisco Fauli 

diff --git a/sd/qa/unit/data/pptx/master-slides.pptx 
b/sd/qa/unit/data/pptx/master-slides.pptx
new file mode 100644
index ..3494d33254ab
Binary files /dev/null and b/sd/qa/unit/data/pptx/master-slides.pptx differ
diff --git a/sd/qa/unit/import-tests2.cxx b/sd/qa/unit/import-tests2.cxx
index 44eacbf1da05..da6572b8af5a 100644
--- a/sd/qa/unit/import-tests2.cxx
+++ b/sd/qa/unit/import-tests2.cxx
@@ -1972,6 +1972,16 @@ CPPUNIT_TEST_FIXTURE(SdImportTest2, testTdf153012)
 CPPUNIT_ASSERT_EQUAL(Color(0xd9d9d9), aFillColor);
 }
 
+CPPUNIT_TEST_FIXTURE(SdImportTest2, testMasterSlides)
+{
+createSdImpressDoc("pptx/master-slides.pptx");
+uno::Reference 
xMasterPagesSupplier(mxComponent,
+   
uno::UNO_QUERY_THROW);
+uno::Reference 
xMasterPages(xMasterPagesSupplier->getMasterPages());
+CPPUNIT_ASSERT(xMasterPages.is());
+CPPUNIT_ASSERT_EQUAL(sal_Int32(7), xMasterPages->getCount());
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


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

2023-10-24 Thread Miklos Vajna (via logerrit)
 sd/qa/unit/data/pptx/smartart-autofit-sync.pptx |binary
 1 file changed

New commits:
commit 4a81d6168a81ce0a0e7fdd2af852d88c49fc8656
Author: Miklos Vajna 
AuthorDate: Fri Oct 20 15:47:45 2023 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Oct 24 12:59:25 2023 +0200

CppunitTest_sd_import_tests-smartart: make testAutofitSync more robust

- replace 'Calibri Light' with 'Noto Sans' (we bundle the later)
- replace 'Calibri' with 'Arial'

With this:

diff --git a/sd/CppunitTest_sd_import_tests-smartart.mk 
b/sd/CppunitTest_sd_import_tests-smartart.mk
index 9b7362b08152..72e0dead7731 100644
--- a/sd/CppunitTest_sd_import_tests-smartart.mk
+++ b/sd/CppunitTest_sd_import_tests-smartart.mk
@@ -11,4 +11,6 @@

 $(eval $(call sd_import_test,-smartart))

+$(eval $(call 
gb_CppunitTest_set_non_application_font_use,sd_import_tests-smartart,abort))
+
 # vim: set noet sw=4 ts=4:

doesn't abort anymore. In fact the second replacement is just for
completeness, the first was enough alredy.

Change-Id: I455b473233e351b7a2ee6a1b1b66049e63a8a6ff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158263
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 
(cherry picked from commit e64f3ab974e2f8c528fef8d75162b82ec0453293)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158283
Reviewed-by: Stephan Bergmann 

diff --git a/sd/qa/unit/data/pptx/smartart-autofit-sync.pptx 
b/sd/qa/unit/data/pptx/smartart-autofit-sync.pptx
index 9a6ce0f494c5..e27dbbfd3de3 100644
Binary files a/sd/qa/unit/data/pptx/smartart-autofit-sync.pptx and 
b/sd/qa/unit/data/pptx/smartart-autofit-sync.pptx differ


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

2023-10-23 Thread Sarper Akdemir (via logerrit)
 sd/qa/unit/data/pptx/tdf144092-tableHeight.pptx |binary
 sd/qa/unit/import-tests2.cxx|4 ++--
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 4210745f5045958f36dac1c71be7eac3b9cc3f13
Author: Sarper Akdemir 
AuthorDate: Fri Oct 20 12:03:25 2023 +0300
Commit: Xisco Fauli 
CommitDate: Mon Oct 23 11:56:42 2023 +0200

use Liberation Sans instead of Calibri in the test for tdf#144092

based on Stephan Bergmann's point on:


the font used in the test file was Calibri, which likely was
being replaced with the best approximation on a given system.
Changed that to Liberation Sans which is a font that is bundled
with LibreOffice to improve the test's robustness.

Change-Id: I7ff75baeb9259dea244913ca9d5025948291f1e2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158234
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins
(cherry picked from commit 676e0527d2f31556eccae314fbb12ce204f02ec7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158277
Reviewed-by: Xisco Fauli 

diff --git a/sd/qa/unit/data/pptx/tdf144092-tableHeight.pptx 
b/sd/qa/unit/data/pptx/tdf144092-tableHeight.pptx
index c597abf9a620..949a0561b25c 100644
Binary files a/sd/qa/unit/data/pptx/tdf144092-tableHeight.pptx and 
b/sd/qa/unit/data/pptx/tdf144092-tableHeight.pptx differ
diff --git a/sd/qa/unit/import-tests2.cxx b/sd/qa/unit/import-tests2.cxx
index 525177ba44da..0ca3513ae00c 100644
--- a/sd/qa/unit/import-tests2.cxx
+++ b/sd/qa/unit/import-tests2.cxx
@@ -1771,10 +1771,10 @@ CPPUNIT_TEST_FIXTURE(SdImportTest2, 
testTdf144092TableHeight)
 uno::Reference xTableShape(getShapeFromPage(0, 0), 
uno::UNO_QUERY);
 
 // Without the accompanying fix in place, this test would have failed with:
-// - Expected: 7208
+// - Expected: 7606
 // - Actual  : 4595
 // i.e. the table height wasn't corrected by expanding less than minimum 
sized rows.
-CPPUNIT_ASSERT_EQUAL(sal_Int32(7208), xTableShape->getSize().Height);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(7606), xTableShape->getSize().Height);
 }
 
 CPPUNIT_TEST_FIXTURE(SdImportTest2, testTdf89928BlackWhiteThreshold)


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

2023-09-05 Thread Noel Grandin (via logerrit)
 sd/qa/unit/data/xml/fdo64586_0.xml |4 -
 sd/qa/unit/data/xml/n758621_0.xml  |4 -
 sd/qa/unit/data/xml/n758621_1.xml  |4 -
 sd/qa/unit/data/xml/n819614_0.xml  |2 
 vcl/source/gdi/impgraph.cxx|   79 +
 5 files changed, 44 insertions(+), 49 deletions(-)

New commits:
commit 40c9c1766e44091147fb57e13511f8a769334143
Author: Noel Grandin 
AuthorDate: Wed Aug 30 21:47:41 2023 +0200
Commit: Xisco Fauli 
CommitDate: Tue Sep 5 09:59:34 2023 +0200

fix ImpGraphic::operator==

This was broken in
commit 7b355669c6ddeab2e6cec692d6afdff41c61d0fb
Author: Tomaž Vajngerl 
Date:   Sat Apr 14 15:13:05 2018 +0900
Function to load graphic swapped out (loaded on demand)

Change-Id: I8ad120b65da5a7c53e8f90c6e01207f75da11c34
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156310
Tested-by: Noel Grandin 
Reviewed-by: Noel Grandin 
(cherry picked from commit 6d8c6e8d60956fd36094035a526c1a29a902204b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156443
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/sd/qa/unit/data/xml/fdo64586_0.xml 
b/sd/qa/unit/data/xml/fdo64586_0.xml
index d8ae745787aa..cdabdd2119ad 100644
--- a/sd/qa/unit/data/xml/fdo64586_0.xml
+++ b/sd/qa/unit/data/xml/fdo64586_0.xml
@@ -4,7 +4,7 @@
   
   
   
-  
+  
   
   
   
@@ -18,7 +18,7 @@
   
   
   
-  
+  
   
   
   
diff --git a/sd/qa/unit/data/xml/n758621_0.xml 
b/sd/qa/unit/data/xml/n758621_0.xml
index aba12ebe685f..3284a1da87f9 100644
--- a/sd/qa/unit/data/xml/n758621_0.xml
+++ b/sd/qa/unit/data/xml/n758621_0.xml
@@ -4,7 +4,7 @@
   
   
   
-  
+  
   
   
   
@@ -18,7 +18,7 @@
   
   
   
-  
+  
   
   
   
diff --git a/sd/qa/unit/data/xml/n758621_1.xml 
b/sd/qa/unit/data/xml/n758621_1.xml
index 556c18673065..5d24431bed58 100644
--- a/sd/qa/unit/data/xml/n758621_1.xml
+++ b/sd/qa/unit/data/xml/n758621_1.xml
@@ -4,7 +4,7 @@
   
   
   
-  
+  
   
   
   
@@ -18,7 +18,7 @@
   
   
   
-  
+  
   
   
   
diff --git a/sd/qa/unit/data/xml/n819614_0.xml 
b/sd/qa/unit/data/xml/n819614_0.xml
index 3635f2d26d3e..c889b00c343a 100644
--- a/sd/qa/unit/data/xml/n819614_0.xml
+++ b/sd/qa/unit/data/xml/n819614_0.xml
@@ -4,7 +4,7 @@
   
   
   
-  
+  
   
   
   
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index 41f921228d34..35a2145aa8e4 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -283,61 +283,56 @@ ImpGraphic& ImpGraphic::operator=(ImpGraphic&& 
rImpGraphic)
 return *this;
 }
 
-bool ImpGraphic::operator==( const ImpGraphic& rImpGraphic ) const
+bool ImpGraphic::operator==( const ImpGraphic& rOther ) const
 {
-bool bRet = false;
+if( this ==  )
+return true;
 
-if( this ==  )
-bRet = true;
-else if (mbPrepared && rImpGraphic.mbPrepared)
-{
-bRet = (*mpGfxLink == *rImpGraphic.mpGfxLink);
-}
-else if (isAvailable() && rImpGraphic.isAvailable())
+if (mbPrepared && rOther.mbPrepared)
+return (*mpGfxLink == *rOther.mpGfxLink);
+
+if (!isAvailable() || !rOther.isAvailable())
+return false;
+
+if ( meType != rOther.meType )
+return false;
+
+bool bRet = false;
+switch( meType )
 {
-switch( meType )
-{
-case GraphicType::NONE:
-bRet = true;
-break;
+case GraphicType::NONE:
+case GraphicType::Default:
+return true;
 
-case GraphicType::GdiMetafile:
-{
-if( rImpGraphic.maMetaFile == maMetaFile )
-bRet = true;
-}
-break;
+case GraphicType::GdiMetafile:
+return ( rOther.maMetaFile == maMetaFile );
 
-case GraphicType::Bitmap:
+case GraphicType::Bitmap:
+{
+if(maVectorGraphicData)
 {
-if(maVectorGraphicData)
+if(maVectorGraphicData == rOther.maVectorGraphicData)
 {
-if(maVectorGraphicData == rImpGraphic.maVectorGraphicData)
-{
-// equal instances
-bRet = true;
-}
-else if(rImpGraphic.maVectorGraphicData)
-{
-// equal content
-bRet = (*maVectorGraphicData) == 
(*rImpGraphic.maVectorGraphicData);
-}
+// equal instances
+bRet = true;
 }
-else if( mpAnimation )
+else if(rOther.maVectorGraphicData)
 {
-if( rImpGraphic.mpAnimation && ( *rImpGraphic.mpAnimation 
== *mpAnimation ) )
-bRet = true;
+// equal content
+bRet = (*maVectorGraphicData) == 
(*rOther.maVectorGraphicData);
 

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

2023-09-01 Thread Tibor Nagy (via logerrit)
 sd/qa/unit/data/pptx/tdf152070.pptx |binary
 1 file changed

New commits:
commit 8c92ca1287c127cb9ce23d75dead5ae18035b9bf
Author: Tibor Nagy 
AuthorDate: Mon Aug 28 14:19:22 2023 +0200
Commit: Xisco Fauli 
CommitDate: Fri Sep 1 14:41:26 2023 +0200

Follow-up to tdf#152070 sd: fix unit test of tile background

The test always failed if the output device DPI value is
higher than 96, because of its PNG image without pHYs (physical
pixel dimensions), so the size depended on the output device DPI
and therefore offset value of image changes. Fixed with extending
the PNG image with pHYs metadata.

Follow-up to commit b12e38c1ccb388e62e35d856d4a575e1724a10e9
"tdf#152070 PPTX import: fix offset of tile background image".

Change-Id: Ic936ec8013bf39bea5fd5f7fce7f17588a72fed4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156205
Reviewed-by: László Németh 
Tested-by: László Németh 
(cherry picked from commit 3db01ef3634e5ae87fe1bafced657ba6b860afca)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156223
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/sd/qa/unit/data/pptx/tdf152070.pptx 
b/sd/qa/unit/data/pptx/tdf152070.pptx
index 1fbc8016d149..c98116c1873e 100644
Binary files a/sd/qa/unit/data/pptx/tdf152070.pptx and 
b/sd/qa/unit/data/pptx/tdf152070.pptx differ


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

2023-06-21 Thread Tibor Nagy (via logerrit)
 sd/qa/uitest/data/tdf155863.odp |binary
 sd/qa/uitest/impress_tests/tdf155863.py |   34 
 svx/source/svdraw/svdograf.cxx  |   24 ++
 3 files changed, 45 insertions(+), 13 deletions(-)

New commits:
commit 755d2a8e30c6f6fd0508697dcd8037e3ce560d3b
Author: Tibor Nagy 
AuthorDate: Fri Jun 16 09:34:29 2023 +0200
Commit: László Németh 
CommitDate: Wed Jun 21 19:57:19 2023 +0200

tdf#155863 sd: fix resizing of cropped images to original size

Resizing with the function "Original Size" (e.g. in the context menu) 
resulted distortion in case of cropped images, if the original image
and its cropping have different aspect ratios. Now zoom the cropped
image to the original resolution instead of stretching it to the
same size.

Change-Id: I5e59f8b48dc03844a739c3eb803e3195a12d9c6d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153170
Tested-by: László Németh 
Reviewed-by: László Németh 
(cherry picked from commit a3401a5acb300baa0be9a5e3bd8fa817c4b01c88)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153340
Tested-by: Jenkins

diff --git a/sd/qa/uitest/data/tdf155863.odp b/sd/qa/uitest/data/tdf155863.odp
new file mode 100644
index ..2ae286c05d31
Binary files /dev/null and b/sd/qa/uitest/data/tdf155863.odp differ
diff --git a/sd/qa/uitest/impress_tests/tdf155863.py 
b/sd/qa/uitest/impress_tests/tdf155863.py
new file mode 100644
index ..bce8936a3d40
--- /dev/null
+++ b/sd/qa/uitest/impress_tests/tdf155863.py
@@ -0,0 +1,34 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+from uitest.framework import UITestCase
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
+
+class tdf155863(UITestCase):
+def test_tdf155863(self):
+# This document contains an image with an original size of 7.99cm x 
5.74cm.
+# The image has been cropped 0.8cm on the left, 3.59cm on the right, 
0.99cm at the top,
+# and 0.75cm at the bottom.
+# Also, it has been resized to a width of 2.1cm and a height of 2.33cm.
+with self.ui_test.load_file(get_url_for_data_file("tdf155863.odp")) as 
document:
+xImpressDoc = self.xUITest.getTopFocusWindow()
+xEditWin = xImpressDoc.getChild("impress_win")
+
+# select the image on the first slide
+xEditWin.executeAction("SELECT", 
mkPropertyValues({"OBJECT":"Image"}))
+
+# click "Original Size"
+self.xUITest.executeCommand(".uno:OriginalSize")
+
+# tdf#155863: Without the fix in place, the image will be 
distorted due to the wrong size.
+self.assertEqual(3597, 
document.DrawPages[0].getByIndex(0).Size.Width)
+self.assertEqual(3998, 
document.DrawPages[0].getByIndex(0).Size.Height)
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index cdb1b0e8301c..b36daff54745 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -476,23 +476,21 @@ Size SdrGrafObj::getOriginalSize() const
 {
 Size aSize = GetGrafPrefSize();
 
-if (aGrafInfo.IsCropped())
-{
-const tools::Long 
aCroppedTop(OutputDevice::LogicToLogic(aGrafInfo.GetTopCrop(), 
getSdrModelFromSdrObject().GetScaleUnit(), GetGrafPrefMapMode().GetMapUnit()));
-const tools::Long 
aCroppedBottom(OutputDevice::LogicToLogic(aGrafInfo.GetBottomCrop(), 
getSdrModelFromSdrObject().GetScaleUnit(), GetGrafPrefMapMode().GetMapUnit()));
-const tools::Long 
aCroppedLeft(OutputDevice::LogicToLogic(aGrafInfo.GetLeftCrop(), 
getSdrModelFromSdrObject().GetScaleUnit(), GetGrafPrefMapMode().GetMapUnit()));
-const tools::Long 
aCroppedRight(OutputDevice::LogicToLogic(aGrafInfo.GetRightCrop(), 
getSdrModelFromSdrObject().GetScaleUnit(), GetGrafPrefMapMode().GetMapUnit()));
-const tools::Long aCroppedWidth(aSize.getWidth() - aCroppedLeft + 
aCroppedRight);
-const tools::Long aCroppedHeight(aSize.getHeight() - aCroppedTop + 
aCroppedBottom);
-
-aSize = Size ( aCroppedWidth, aCroppedHeight);
-}
-
-if ( GetGrafPrefMapMode().GetMapUnit() == MapUnit::MapPixel )
+if (GetGrafPrefMapMode().GetMapUnit() == MapUnit::MapPixel)
 aSize = Application::GetDefaultDevice()->PixelToLogic(aSize, 
MapMode(getSdrModelFromSdrObject().GetScaleUnit()));
 else
 aSize = OutputDevice::LogicToLogic(aSize, GetGrafPrefMapMode(), 
MapMode(getSdrModelFromSdrObject().GetScaleUnit()));
 
+if (aGrafInfo.IsCropped())
+{
+const 

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

2023-06-20 Thread Tomaž Vajngerl (via logerrit)
 sd/qa/unit/uiimpress.cxx   |5 +++--
 sd/source/ui/func/fuconstr.cxx |   36 
 2 files changed, 3 insertions(+), 38 deletions(-)

New commits:
commit cf36777e8df6ed7233e3c6c6fc0ba0a1ed505cfb
Author: Tomaž Vajngerl 
AuthorDate: Mon Jun 19 15:28:40 2023 +0900
Commit: Xisco Fauli 
CommitDate: Tue Jun 20 10:10:37 2023 +0200

tdf#155086 remove code that sets theme color to shapes as DF

Remove this functionallity for now until we support theme colors
in shape styles. Then we can do it for the default style, and not
as a direct format for each inserted shape.

Change-Id: Ib042072954a79cadc750372333c40269fbe4ca40
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153244
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit 2afff27c5327bcb30f894d9a507131f2ad8f1dc6)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153286
Reviewed-by: Xisco Fauli 

diff --git a/sd/qa/unit/uiimpress.cxx b/sd/qa/unit/uiimpress.cxx
index e3a9c86e91d1..c4cdc0a5e338 100644
--- a/sd/qa/unit/uiimpress.cxx
+++ b/sd/qa/unit/uiimpress.cxx
@@ -1144,7 +1144,8 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf127696)
 CPPUNIT_ASSERT(bContoured);
 }
 
-CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testThemeShapeInsert)
+// TODO - Readd when we implement style level fill color and set that for 
default style
+/*CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testThemeShapeInsert)
 {
 // Given a document with a theme, accent1 color is set to 0x04:
 createSdImpressDoc();
@@ -1188,7 +1189,7 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, 
testThemeShapeInsert)
 // - Expected: 0 / 0x04 (~black)
 // - Actual  : 7512015 / 0x729fcf (~blue)
 CPPUNIT_ASSERT_EQUAL(static_cast(0x4), nFillColor);
-}
+}*/
 
 CPPUNIT_PLUGIN_IMPLEMENT();
 
diff --git a/sd/source/ui/func/fuconstr.cxx b/sd/source/ui/func/fuconstr.cxx
index 4db1f4042dc9..fd93a3ce7c94 100644
--- a/sd/source/ui/func/fuconstr.cxx
+++ b/sd/source/ui/func/fuconstr.cxx
@@ -371,42 +371,6 @@ void FuConstruct::SetStyleSheet( SfxItemSet& rAttr, 
SdrObject* pObj,
 pObj->SetMergedItemSet(aAttr);
 }
 }
-else
-{
-// Creating an object with fill.
-SdrPage* pThemePage = pPage;
-if (pThemePage->TRG_HasMasterPage())
-{
-pThemePage = >TRG_GetMasterPage();
-}
-
-auto const& pTheme = pThemePage->getSdrPageProperties().GetTheme();
-if (pTheme)
-{
-// We construct an object on a page where the master page has 
a theme. Take the
-// accent1 color from that theme, make sure it has priority 
over the shape's
-// document-global style.
-SfxItemSet aAttr(mpView->GetDefaultAttr());
-
-aAttr.Put(XFillStyleItem(css::drawing::FillStyle_SOLID));
-
-model::ThemeColorType eColorType = 
model::ThemeColorType::Accent1;
-Color aColor = pTheme->GetColor(eColorType);
-XFillColorItem aFillColorItem("", aColor);
-aFillColorItem.getComplexColor().setSchemeColor(eColorType);
-aAttr.Put(aFillColorItem);
-
-aAttr.Put(XLineStyleItem(css::drawing::LineStyle_SOLID));
-
-// Line color is 50% darker than the fill color.
-aColor.ApplyTintOrShade(-5000);
-XLineColorItem aLineColorItem("", aColor);
-// TODO no theme or theme effect for line colors yet.
-aAttr.Put(aLineColorItem);
-
-pObj->SetMergedItemSet(aAttr);
-}
-}
 }
 }