Return-Path: X-Original-To: apmail-incubator-ooo-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-ooo-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C31AFCCC3 for ; Wed, 20 Jun 2012 09:40:57 +0000 (UTC) Received: (qmail 9670 invoked by uid 500); 20 Jun 2012 09:40:57 -0000 Delivered-To: apmail-incubator-ooo-dev-archive@incubator.apache.org Received: (qmail 9599 invoked by uid 500); 20 Jun 2012 09:40:57 -0000 Mailing-List: contact ooo-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ooo-dev@incubator.apache.org Delivered-To: mailing list ooo-dev@incubator.apache.org Received: (qmail 9570 invoked by uid 99); 20 Jun 2012 09:40:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Jun 2012 09:40:56 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of orwittmann@googlemail.com designates 209.85.214.47 as permitted sender) Received: from [209.85.214.47] (HELO mail-bk0-f47.google.com) (209.85.214.47) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Jun 2012 09:40:48 +0000 Received: by bkcjm2 with SMTP id jm2so5779487bkc.6 for ; Wed, 20 Jun 2012 02:40:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=93JjjZVc/MSEOv1zxdemr+pHndA2zrClexBLOSJKhWc=; b=Qmba96Rp0/f14d74txFm+PTwfT5RC5XoDIY6M0KwP4LQN48OjkGb9xiz09n6ic6QkA /sThR20xfIgMMpF2T7BTJnm3ahnUkK8byb7uvK8Lk5LPJ+T2bSVNRipDJDsRtiu/70Pt CWMm5zz7sxhzEpfn2m7BiUc+S9gfS/Yu5+XFHy2ZSMCglvvw1QpC50Ga/kQKP+fZuGwL 3BLjrZ4TF3OUK1vCPD/SFW3JYvQBxB7YoGVj8DI0HZpdW9UaHx6uBxMTSCETItzvm/Vo Vby1zFYRviqTKBB/sWoHq/sGAPhMUqcEND/NrZNni376sBTvLcr0I1/X5XuA8bNLZCa+ iGBQ== Received: by 10.204.145.78 with SMTP id c14mr9483827bkv.43.1340185228270; Wed, 20 Jun 2012 02:40:28 -0700 (PDT) Received: from [9.155.131.111] (deibp9eh1--blueice2n2.emea.ibm.com. [195.212.29.172]) by mx.google.com with ESMTPS id h18sm26813779bkh.8.2012.06.20.02.40.25 (version=SSLv3 cipher=OTHER); Wed, 20 Jun 2012 02:40:26 -0700 (PDT) Message-ID: <4FE19A8E.2080705@googlemail.com> Date: Wed, 20 Jun 2012 11:40:30 +0200 From: Oliver-Rainer Wittmann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: ooo-dev@incubator.apache.org Subject: Re: Question about text clipping mechanism in word processor References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, On 20.06.2012 10:47, ZuoJun Chen wrote: > Hi All, > > I'm trying to handle a bug on text clipped in document . See Bug > 119476 for more > details. > > After investigation, I have some insights. When paragraph line spacing is > smaller than font size, > > the text contained becomes too large for fit, then AOO will clipped text > as Incomplete part. The code > > for text clipped mechanism can be located in method > at > > sw\source\core\text\itrform2.cxx line 1756. > > > I thought that the preferable way to fix this would be to considering the > spacing contains above paragraph > > spacing property and line spacing property as the conditions to determine > whether clipping text. e.g. > > Clipped text if the sum of adding above paragraph spacing and line > paragraph spacing is smaller than font size, > > otherwise do not clip text since above paragraph spacing and line spacing > are enough to display the text. > From my point of view this change makes sense. If the text of the first line of a paragraph "founds" enough space in the "above paragraph spacing", the text should not be clipped. I had already looked at the patch and it looks ok. I will have a deeper look regarding how to determine the value of "above paragraph spacing". As far as I remember in some cases depending on certain compatibility option, the "above paragraph spacing" is not applied. E.g., if the paragraph is the first on a page and compatibility option "Add paragraph and table spacing at tops of pages ..." is not checked, the "above paragraph spacing" is not applied. May be I find a solution to access the already calculated and applied "above paragraph spacing". > > Noticed that there is a property named below paragraph spacing, but I'm > not sure whether there is a need to consider this one, > > Do this property impact text clipped in paragraph? > May be - I am not sure. Thus, a paragraph could have a "below paragraph spacing" and the first text line of the following paragraph could be to small. This would cause clipping, but may be the "below paragraph spacing" from the previous paragraph could be used to avoid the clipping. From my point of view avoid the clipping in this case would also make sense. May be my above mentioned further investigation regarding the available space above the first text line of a paragraph would solve this, too. Zuojun, do you know how MS Word will behave in this case? Best regards, Oliver.