summaryrefslogtreecommitdiff
path: root/sw/source/core/text/txtfly.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/text/txtfly.cxx')
-rw-r--r--sw/source/core/text/txtfly.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx
index 54635d759442..65bf05e509b5 100644
--- a/sw/source/core/text/txtfly.cxx
+++ b/sw/source/core/text/txtfly.cxx
@@ -1342,6 +1342,9 @@ SwRect SwTxtFly::AnchoredObjToRect( const SwAnchoredObject* pAnchoredObj,
// Wrap only on sides with at least 2cm space for the text
#define TEXT_MIN 1134
+// MS Word wraps on sides with even less space (value guessed).
+#define TEXT_MIN_SMALL 300
+
// Wrap on both sides up to a frame width of 1.5cm
#define FRAME_MAX 850
@@ -1398,9 +1401,12 @@ SwSurround SwTxtFly::_GetSurroundForTextWrap( const SwAnchoredObject* pAnchoredO
else
nRight = 0;
}
- if( nLeft < TEXT_MIN )
+ const int textMin = GetMaster()->GetNode()
+ ->getIDocumentSettingAccess()->get(IDocumentSettingAccess::SURROUND_TEXT_WRAP_SMALL )
+ ? TEXT_MIN_SMALL : TEXT_MIN;
+ if( nLeft < textMin )
nLeft = 0;
- if( nRight < TEXT_MIN )
+ if( nRight < textMin )
nRight = 0;
if( nLeft )
eSurroundForTextWrap = nRight ? SURROUND_PARALLEL : SURROUND_LEFT;