svx/source/sdr/properties/textproperties.cxx | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-)
New commits: commit 6218637c2a9b64793bee5654b8f2948293d0ec03 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Nov 21 12:42:09 2016 +0000 drawing shapes aren't tracking style name changes correctly in draw, create a box, enter some text, exit and select box F11 for style navigator, new style, set font to e.g. 88 apply this style to the box. All ok. If you modify the style and changes its font to e.g. bold the text in the box tracks it as expected. All ok. If you modify the style and change its name, the box resets to something different and there's loads of warnings about unknown styles. Not ok. The style modification fires, but the style name gets overwritten by the style stuck in a OutlinerParaObject that gets overlaid over the editengine. All the rTextProvider.getTextCount uses that don't iterate over all entries look dubious to me, but I'll initially fix this one that I have hard evidence for as broken. All this is probably broken since... commit 838c0fa8228f4ca656a264f6a5610c337ebf4fef Author: Rüdiger Timm <r...@openoffice.org> Date: Wed Mar 12 08:47:30 2008 +0000 INTEGRATION: CWS impresstables2 (1.14.72); FILE MERGED Change-Id: Ib0dd2857ed26c49dcfa00aae923e36429a7f7862 Reviewed-on: https://gerrit.libreoffice.org/31151 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Tomaž Vajngerl <qui...@gmail.com> diff --git a/svx/source/sdr/properties/textproperties.cxx b/svx/source/sdr/properties/textproperties.cxx index de35ec3..09ebfc7 100644 --- a/svx/source/sdr/properties/textproperties.cxx +++ b/svx/source/sdr/properties/textproperties.cxx @@ -82,13 +82,13 @@ namespace sdr void TextProperties::ItemSetChanged(const SfxItemSet& rSet) { SdrTextObj& rObj = static_cast<SdrTextObj&>(GetSdrObject()); - const svx::ITextProvider& rTextProvider(getTextProvider()); - sal_Int32 nText = rTextProvider.getTextCount(); // #i101556# ItemSet has changed -> new version maVersion++; - while( --nText >= 0 ) + const svx::ITextProvider& rTextProvider(getTextProvider()); + sal_Int32 nText = rTextProvider.getTextCount(); + while (nText--) { SdrText* pText = rTextProvider.getText( nText ); @@ -173,7 +173,7 @@ namespace sdr const svx::ITextProvider& rTextProvider(getTextProvider()); sal_Int32 nCount = rTextProvider.getTextCount(); - while( nCount-- ) + while (nCount--) { SdrText* pText = rTextProvider.getText( nCount ); OutlinerParaObject* pParaObj = pText->GetOutlinerParaObject(); @@ -246,8 +246,7 @@ namespace sdr const svx::ITextProvider& rTextProvider(getTextProvider()); sal_Int32 nText = rTextProvider.getTextCount(); - - while( --nText >= 0 ) + while (nText--) { SdrText* pText = rTextProvider.getText( nText ); @@ -408,8 +407,7 @@ namespace sdr Outliner* pOutliner = SdrMakeOutliner(OutlinerMode::OutlineObject, *rObj.GetModel()); const svx::ITextProvider& rTextProvider(getTextProvider()); sal_Int32 nText = rTextProvider.getTextCount(); - - while( --nText >= 0 ) + while (nText--) { SdrText* pText = rTextProvider.getText( nText ); @@ -564,7 +562,7 @@ namespace sdr rObj.SetPortionInfoChecked(false); sal_Int32 nText = rTextProvider.getTextCount(); - while( --nText > 0 ) + while (nText--) { OutlinerParaObject* pParaObj = rTextProvider.getText( nText )->GetOutlinerParaObject(); if( pParaObj ) @@ -587,7 +585,7 @@ namespace sdr { rObj.SetPortionInfoChecked(false); sal_Int32 nText = rTextProvider.getTextCount(); - while( --nText > 0 ) + while (nText--) { OutlinerParaObject* pParaObj = rTextProvider.getText( nText )->GetOutlinerParaObject(); if( pParaObj ) @@ -609,7 +607,7 @@ namespace sdr if(aOldName != aNewName) { sal_Int32 nText = rTextProvider.getTextCount(); - while( --nText > 0 ) + while (nText--) { OutlinerParaObject* pParaObj = rTextProvider.getText( nText )->GetOutlinerParaObject(); if( pParaObj )
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits