Date: prev next · Thread: first prev next last
2015 Archives by date, by thread · List index


Hi,

I'm a bit worried by the reasoning behind your commit

commit 6227d2fc60564f847a2ffd0b5f5d0fbf8ab49f5b
Author: Miklos Vajna <vmiklos@collabora.co.uk>
Date:   Fri Dec 19 19:41:52 2014 +0100

    fdo#86963 SwXShape: don't ask SwTextBoxHelper for ZOrder of child
    shapes

    (...) Given that TextBoxes are only possible at the highest level
    (and not inside group shapes) (...)


diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index b4e0b0b..9b09764 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -1764,8 +1764,17 @@ uno::Any SwXShape::getPropertyValue(const OUString& rPropertyName)
                     const SdrObject* pObj = pFmt->FindRealSdrObject();
                     if (pObj)
                     {
+                        bool bConvert = true;
+                        if (SvxShape* pSvxShape = GetSvxShape())
+                            // In case of group shapes, pSvxShape points to the child shape, while 
pObj points to the outermost group shape.
+                            if (pSvxShape->GetSdrObject() != pObj)
+                                // Textboxes are not expected inside group shapes, so no 
conversion is necessary there.
+                                bConvert = false;
+                        if (bConvert)
+                        {
                             std::set<const SwFrmFmt*> aTextBoxes = 
SwTextBoxHelper::findTextBoxes(pFmt->GetDoc());
                             aRet <<= SwTextBoxHelper::getOrdNum(pObj, aTextBoxes);
+                        }
                     }




As far as I understand, TextBox (form) controls *are* possible within
group shapes. I've uploaded an example to
http://people.freedesktop.org/~lmamane/tst.odt

You will notice that each control is grouped with a label control.
That kind of structure is common (an idiom) with Base forms; it is
what the wizard creates. Base forms are writer documents embedded into
the .odb file (subdocuments).

Since I *did* have, with some past master & libreoffice-4-4 snapshots
difficulties with ZOrder not being an enumeration in the result of the
wizard (in memory), and thus the created form not being saved
correctly (missing controls, style not applied, ... see
https://gerrit.libreoffice.org/13554 ), could you please check /
rethink your commit in the light of text boxes that *are* inside a
group shape?


Thank you very much,

-- 
Lionel

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.