[PATCH libreoffice-4-0] SwTableBox::IsValidNumTxtNd: Allow trivial formatting

Miklos Vajna (via Code Review) gerrit at gerrit.libreoffice.org
Fri Mar 8 10:35:13 PST 2013


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/2606

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/06/2606/1

SwTableBox::IsValidNumTxtNd: Allow trivial formatting

Not allowing flys or footnotes during string -> number conversion is
fine, but I don't see what's the reason for rejecting simple formatting
(like bold) completely.

(cherry picked from commit 332fa1344aaaf8ff190c594fe5829cf1551c5211)

Change-Id: I8f54aebeb6ea35d099a88570d3f7d365c7325dc0
---
M sw/source/core/table/swtable.cxx
1 file changed, 1 insertion(+), 4 deletions(-)



diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index c37ff85..4b95b15 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -2518,7 +2518,6 @@
             if( bCheckAttr )
             {
                 const SwpHints* pHts = pTextNode->GetpSwpHints();
-                const String& rTxt = pTextNode->GetTxt();
                 // do some tests if there's only text in the node!
                 // Flys/fields/...
                 if( pHts )
@@ -2527,9 +2526,7 @@
                     for( sal_uInt16 n = 0; n < pHts->Count(); ++n )
                     {
                         const SwTxtAttr* pAttr = (*pHts)[ n ];
-                        if( RES_TXTATR_NOEND_BEGIN <= pAttr->Which() ||
-                            *pAttr->GetStart() ||
-                            *pAttr->GetAnyEnd() < rTxt.Len() )
+                        if( RES_TXTATR_NOEND_BEGIN <= pAttr->Which() )
                         {
                             if ((*pAttr->GetStart() == nNextSetField) &&
                                 (pAttr->Which() == RES_TXTATR_FIELD))

-- 
To view, visit https://gerrit.libreoffice.org/2606
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8f54aebeb6ea35d099a88570d3f7d365c7325dc0
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Miklos Vajna <vmiklos at suse.cz>



More information about the LibreOffice mailing list