From f7b5eefc36f6a7627e867651bafe38bdeb2f9c00 Mon Sep 17 00:00:00 2001 From: Justin Luth Date: Thu, 28 Jul 2022 09:03:13 -0400 Subject: [PATCH] tdf#148810 pptx import: Depth set by EE_PARA_OUTLLEVEL It isn't enough to do Paragraph->SetDepth(). It must match the property EE_PARA_OUTLLEVEL. So I was hoping that the only thing I needed was the "set property" helper. But unit tests showed that I also needed "get property" to return an empty aAny instead of a -1. My confidence level on this one is fairly low. This code is way too tangled and weird. I'm sure the concept is right (that the property is the most important thing) but all of the wonkiness around the level means any changes to the implementation will be fragile. make UITest_impress_tests \ UITEST_TEST_NAME=tdf148810.Tdf148810.test_Tdf148810 Change-Id: I4aa62fe28ecbc483d5df0d1532fecd172afc54b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137569 Tested-by: Jenkins Reviewed-by: Miklos Vajna --- editeng/source/uno/unotext.cxx | 33 +++-------- include/editeng/unotext.hxx | 3 +- .../uitest/data/tdf148810_PARA_OUTLLEVEL.pptx | Bin 0 -> 21210 bytes sd/qa/uitest/impress_tests/tdf148810.py | 55 ++++++++++++++++++ 4 files changed, 63 insertions(+), 28 deletions(-) create mode 100644 sd/qa/uitest/data/tdf148810_PARA_OUTLLEVEL.pptx create mode 100755 sd/qa/uitest/impress_tests/tdf148810.py diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx index e0ca965c5d3f..4f831a70a30f 100644 --- a/editeng/source/uno/unotext.cxx +++ b/editeng/source/uno/unotext.cxx @@ -507,7 +507,7 @@ bool SvxUnoTextRangeBase::SetPropertyValueHelper( const SfxItemPropertyMapEntry* return !aValue.hasValue() || ((aValue >>= xRule) && !xRule.is()); } - case WID_NUMLEVEL: + case EE_PARA_OUTLLEVEL: { SvxTextForwarder* pForwarder = pEditSource? pEditSource->GetTextForwarder() : nullptr; if(pForwarder && pSelection) @@ -519,7 +519,8 @@ bool SvxUnoTextRangeBase::SetPropertyValueHelper( const SfxItemPropertyMapEntry* if(! pForwarder->SetDepth( pSelection->nStartPara, nLevel ) ) throw lang::IllegalArgumentException(); - return true; + // If valid, then not yet finished. Also needs to be added to paragraph props. + return nLevel < -1 || nLevel > 9; } } } @@ -684,7 +685,7 @@ bool SvxUnoTextRangeBase::GetPropertyValueHelper( SfxItemSet const & rSet, cons } break; - case WID_NUMLEVEL: + case EE_PARA_OUTLLEVEL: { SvxTextForwarder* pForwarder = pEditSource? pEditSource->GetTextForwarder() : nullptr; if(pForwarder && pSelection) @@ -976,7 +977,6 @@ beans::PropertyState SvxUnoTextRangeBase::_getPropertyState(const SfxItemPropert } break; - case WID_NUMLEVEL: case WID_NUMBERINGSTARTVALUE: case WID_PARAISNUMBERINGRESTART: eItemState = SfxItemState::SET; @@ -1110,7 +1110,6 @@ bool SvxUnoTextRangeBase::_getOnePropertyStates(const SfxItemSet* pSet, const Sf } break; - case WID_NUMLEVEL: case WID_NUMBERINGSTARTVALUE: case WID_PARAISNUMBERINGRESTART: eItemState = SfxItemState::SET; @@ -1215,12 +1214,6 @@ void SvxUnoTextRangeBase::_setPropertyToDefault(SvxTextForwarder* pForwarder, co { SvxUnoFontDescriptor::setPropertyToDefault( aSet ); } - else if( pMap->nWID == WID_NUMLEVEL ) - { - // #101004# Call interface method instead of unsafe cast - pForwarder->SetDepth( maSelection.nStartPara, -1 ); - return; - } else if( pMap->nWID == WID_NUMBERINGSTARTVALUE ) { pForwarder->SetNumberingStartValue( maSelection.nStartPara, -1 ); @@ -1263,7 +1256,7 @@ uno::Any SAL_CALL SvxUnoTextRangeBase::getPropertyDefault( const OUString& aProp case WID_FONTDESC: return SvxUnoFontDescriptor::getPropertyDefault( pPool ); - case WID_NUMLEVEL: + case EE_PARA_OUTLLEVEL: { uno::Any aAny; return aAny; @@ -1969,8 +1962,8 @@ static void SvxPropertyValuesToItemSet( SfxItemSet &rItemSet, const uno::Sequence< beans::PropertyValue >& rPropertyValues, const SfxItemPropertySet *pPropSet, - SvxTextForwarder *pForwarder /*needed for WID_NUMLEVEL*/, - sal_Int32 nPara /*needed for WID_NUMLEVEL*/) + SvxTextForwarder *pForwarder, + sal_Int32 nPara) { for (const beans::PropertyValue& rProp : rPropertyValues) { @@ -1993,18 +1986,6 @@ static void SvxPropertyValuesToItemSet( if (rProp.Value >>= aDesc) SvxUnoFontDescriptor::FillItemSet( aDesc, rItemSet ); } - else if (pEntry->nWID == WID_NUMLEVEL) - { - if (pForwarder) - { - sal_Int16 nLevel = -1; - rProp.Value >>= nLevel; - - // #101004# Call interface method instead of unsafe cast - if (!pForwarder->SetDepth( nPara, nLevel )) - throw lang::IllegalArgumentException(); - } - } else if (pEntry->nWID == WID_NUMBERINGSTARTVALUE ) { if( pForwarder ) diff --git a/include/editeng/unotext.hxx b/include/editeng/unotext.hxx index b91a6d3e4dc3..ece9b13de567 100644 --- a/include/editeng/unotext.hxx +++ b/include/editeng/unotext.hxx @@ -60,7 +60,6 @@ class SvxItemPropertySet; struct SfxItemPropertyMapEntry; #define WID_FONTDESC OWN_ATTR_VALUE_START -#define WID_NUMLEVEL OWN_ATTR_VALUE_START+1 #define WID_PORTIONTYPE OWN_ATTR_VALUE_START+2 #define WID_NUMBERINGSTARTVALUE OWN_ATTR_VALUE_START+3 #define WID_PARAISNUMBERINGRESTART OWN_ATTR_VALUE_START+4 @@ -71,7 +70,7 @@ struct SfxItemPropertyMapEntry; #define SVX_UNOEDIT_OUTLINER_PROPERTIES \ SVX_UNOEDIT_NUMBERING_PROPERTY, \ - { UNO_NAME_NUMBERING_LEVEL, WID_NUMLEVEL, ::cppu::UnoType::get(), 0, 0 }, \ + { UNO_NAME_NUMBERING_LEVEL, EE_PARA_OUTLLEVEL, ::cppu::UnoType::get(), 0, 0 }, \ {u"NumberingStartValue", WID_NUMBERINGSTARTVALUE, ::cppu::UnoType::get(), 0, 0 }, \ {u"ParaIsNumberingRestart", WID_PARAISNUMBERINGRESTART, cppu::UnoType::get(), 0, 0 } diff --git a/sd/qa/uitest/data/tdf148810_PARA_OUTLLEVEL.pptx b/sd/qa/uitest/data/tdf148810_PARA_OUTLLEVEL.pptx new file mode 100644 index 0000000000000000000000000000000000000000..b2f4a13da549a19ffa26b8d8569116605276d4af GIT binary patch literal 21210 zcmd^Hby(F~)}}#1I;4@1?(UFoq`SL2L^`FUQ@XpQ8>G9tLmH&P@4&q?#@uo4^UQzW zY#(_5J?}Yt{nlRbuC=y|I4Bqj5EK*?5Scx&0?-c&2JpR>t%1264fW&K;z&txP&x$O zqkB|>%R}?Rz|V$mi0LdJZb13zZ@nbxC357xHR&MQrx$s18J=#PK$$phTgxAPc99s} zkyJ4A8ztuHUfP-N7{Adxno~IQ7N!92?GRCkNr?}|eZ2#W-vI10sPHmmGe;b|D4Ot+ zcdBU?S4VBysg(z(K80;^32V@;WpwYD?}~>74CPC)vUQM+q)Q`T(8x0h)X4w)T28&bfT>U-^#+UGlQQIw-{qk~NE7s$k+TR2BMDTx;~8BC`Nx-Dmy2Q@QpK?A8dEx5zfAr*a+d zsZotlw6V>IBtK7vm?J8Pfm-kg8h}Do~uHpU4k-`I=aC5vClt3VMns zhK|NBCv6vn9Q@2b27?A=uHzF-w<5^(VEQgPaGf!~bCy6Odftd{-K546PsE3CGfw;I zHgG5PEL2A+j@@zwxy%9D-z3C`fRopSk`60 zRUJKPR%MYj)~L8EloGbvx16Nu`MtV(AIAs7{ZSaOvl>#@p+|0NSbxf!ulWGqPCqU zvcjpU2Ct9NIg*5d< zggUm5bw1g=EgtRnIYhe;(|F_si0b&O)7@fFJYru;L&0-@S=)?-j(wBQNm{BgBX z6^Z<1z4^=yp!99OPWp$s;D%#e&qK)gDwh2Mm;5e;L2p-rA{GJluj4c<%G<#-f1ul+F zkD5@>O75eL9Anr}d&2%2a1^`zr0lF8^7YHNY}Y4yO!wl?^_P#XmaGWeEHd92%|GpH zbqdHc4)Cc@0Du4ezEA-FYHe*#V{L0-XJBcsV{c+*`LwY}4e1Vi6n}u7^Sy=Jfj&sA zZlEI}am{`J%CaYn4F|GIYSFAwIJgr*J6cJ;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#WoK_e%5MM=qxOJILS5w|^hGg8uIy zf3J!DedJn(zk~euPT|j5*U0#HkpKN5{E_GX*|N1U{RQ$5F7WC2{VIYV>Cc}n+ZF5Y z;pqM{VEB>u`5BLv^FQGIrBD5lPWd@f4B+_#@9~<9e{x5^Ztq7<0{^>}1$^hp`@_fi zHw?_LXg{V*k37cr<;wRH+LP4(Qa(S1(?18FWP*R0X~~F#142R|AY#BDdq9vaBmDT& F{{gt*`=tN? literal 0 HcmV?d00001 diff --git a/sd/qa/uitest/impress_tests/tdf148810.py b/sd/qa/uitest/impress_tests/tdf148810.py new file mode 100755 index 000000000000..31f591a6282f --- /dev/null +++ b/sd/qa/uitest/impress_tests/tdf148810.py @@ -0,0 +1,55 @@ +# -*- 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.uihelper.common import get_state_as_dict, get_url_for_data_file +from libreoffice.uno.propertyvalue import mkPropertyValues +from uitest.framework import UITestCase +import time + + +class Tdf148810(UITestCase): + + def test_Tdf148810(self): + with self.ui_test.load_file(get_url_for_data_file("tdf148810_PARA_OUTLLEVEL.pptx")): + document = self.ui_test.get_component() + + xDoc = self.xUITest.getTopFocusWindow() + xEditWin = xDoc.getChild("impress_win") + + xEditWin.executeAction("SELECT", mkPropertyValues({"OBJECT":"TextShape 2"})) + + # type something to get into text editing mode (instead of shape selection). + xEditWin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "RETURN"})) + #time.sleep(2) + + # get to the front of the text (behind the bullet point) + xEditWin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "HOME"})) + # remove the numbering bullet point + xEditWin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "BACKSPACE"})) + + #xShape = xEditWin.getChild("TextShape 2") + #print(xShape) + #print(xShape.getChildren()) + #print(get_state_as_dict(xShape)) + #print(dir(xShape) + + xText = document.DrawPages[0].getByIndex(1).createEnumeration().nextElement() + #print(xText) + # this is the first numbering level (as opposed to either -1 or None for no numbering) + self.assertEqual(0, xText.NumberingLevel) + #time.sleep(2) + + self.xUITest.executeCommand(".uno:Undo") + #time.sleep(2) + + xText = document.DrawPages[0].getByIndex(1).createEnumeration().nextElement() + # This was failing with "None" + self.assertEqual(0, xText.NumberingLevel) + +# vim: set shiftwidth=4 softtabstop=4 expandtab: