summaryrefslogtreecommitdiff
path: root/sw/source/uibase/shells
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-09-03 11:11:01 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-09-03 11:14:08 +0100
commitda6dc61f03db45a50dd5e31c2ca808bdf7adf0ab (patch)
tree91b7680878b1ff298eb8e2b18349b96593f797f9 /sw/source/uibase/shells
parente65c447cef27ce98a2f66e830ba7f03f1c70a5f6 (diff)
0xFF is reserved in [Height|Width]Percent as a special flag
no logic change here, just collect all the uses of 0xff, 0xFF, 255, 0xfe that are for this hackery together under SwFormatFrmSize::SYNCED Change-Id: I061da70962e410903aed94b62868dec1d61e54b9
Diffstat (limited to 'sw/source/uibase/shells')
-rw-r--r--sw/source/uibase/shells/frmsh.cxx4
-rw-r--r--sw/source/uibase/shells/grfsh.cxx8
2 files changed, 6 insertions, 6 deletions
diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx
index cfa9ffed38ff..c6c43910dc9e 100644
--- a/sw/source/uibase/shells/frmsh.cxx
+++ b/sw/source/uibase/shells/frmsh.cxx
@@ -443,9 +443,9 @@ void SwFrameShell::Execute(SfxRequest &rReq)
// On % values initialize size
SwFormatFrmSize& rSize = const_cast<SwFormatFrmSize&>(static_cast<const SwFormatFrmSize&>(aSet.Get(RES_FRM_SIZE)));
- if (rSize.GetWidthPercent() && rSize.GetWidthPercent() != 0xff)
+ if (rSize.GetWidthPercent() && rSize.GetWidthPercent() != SwFormatFrmSize::SYNCED)
rSize.SetWidth(rSh.GetAnyCurRect(RECT_FLY_EMBEDDED).Width());
- if (rSize.GetHeightPercent() && rSize.GetHeightPercent() != 0xff)
+ if (rSize.GetHeightPercent() && rSize.GetHeightPercent() != SwFormatFrmSize::SYNCED)
rSize.SetHeight(rSh.GetAnyCurRect(RECT_FLY_EMBEDDED).Height());
// disable vertical positioning for Math Objects anchored 'as char' if baseline alignment is activated
diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx
index fb4a14d5e20e..5ac6ca9ba2bf 100644
--- a/sw/source/uibase/shells/grfsh.cxx
+++ b/sw/source/uibase/shells/grfsh.cxx
@@ -281,9 +281,9 @@ void SwGrfShell::Execute(SfxRequest &rReq)
// At percentage values initialize size
SwFormatFrmSize aSizeCopy = static_cast<const SwFormatFrmSize&>(aSet.Get(RES_FRM_SIZE));
- if (aSizeCopy.GetWidthPercent() && aSizeCopy.GetWidthPercent() != 0xff)
+ if (aSizeCopy.GetWidthPercent() && aSizeCopy.GetWidthPercent() != SwFormatFrmSize::SYNCED)
aSizeCopy.SetWidth(rSh.GetAnyCurRect(RECT_FLY_EMBEDDED).Width());
- if (aSizeCopy.GetHeightPercent() && aSizeCopy.GetHeightPercent() != 0xff)
+ if (aSizeCopy.GetHeightPercent() && aSizeCopy.GetHeightPercent() != SwFormatFrmSize::SYNCED)
aSizeCopy.SetHeight(rSh.GetAnyCurRect(RECT_FLY_EMBEDDED).Height());
// and now set the size for "external" tabpages
{
@@ -291,8 +291,8 @@ void SwGrfShell::Execute(SfxRequest &rReq)
aSet.Put( aSzItm );
Size aSz( aSizeCopy.GetWidthPercent(), aSizeCopy.GetHeightPercent() );
- if( 0xff == aSz.Width() ) aSz.Width() = 0;
- if( 0xff == aSz.Height() ) aSz.Height() = 0;
+ if( SwFormatFrmSize::SYNCED == aSz.Width() ) aSz.Width() = 0;
+ if( SwFormatFrmSize::SYNCED == aSz.Height() ) aSz.Height() = 0;
aSzItm.SetSize( aSz );
aSzItm.SetWhich( SID_ATTR_GRAF_FRMSIZE_PERCENT );