summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-11-21 12:42:09 +0000
committerTomaž Vajngerl <quikee@gmail.com>2016-11-24 12:02:55 +0000
commit6218637c2a9b64793bee5654b8f2948293d0ec03 (patch)
treeaa8ce149e138656c6dac43df1ca5d9b329a3b516
parent1439b3499ced0f1131af8e0de107e96d8aac4039 (diff)
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 <rt@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 <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
-rw-r--r--svx/source/sdr/properties/textproperties.cxx20
1 files changed, 9 insertions, 11 deletions
diff --git a/svx/source/sdr/properties/textproperties.cxx b/svx/source/sdr/properties/textproperties.cxx
index de35ec39e3b9..09ebfc74ff65 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 )