[Libreoffice-commits] core.git: Branch 'distro/suse/suse-3.6' - sw/source

2013-06-13 Thread Luboš Luňák
 sw/source/core/txtnode/fntcache.cxx |   25 +
 1 file changed, 25 insertions(+)

New commits:
commit d16f1df93976e13f136ab35f32765232d73e5e08
Author: Luboš Luňák l.lu...@suse.cz
Date:   Fri Jun 7 11:31:05 2013 +0200

ugly workaround for external leading with symbol fonts (bnc#823626)

I'd much rather find the code using external leading in Writer's layout,
but this font rendering and layout stuff is so complicated.

Change-Id: Iaf58af387a6727eb18f5a9d1613de3ae30d7c35e

diff --git a/sw/source/core/txtnode/fntcache.cxx 
b/sw/source/core/txtnode/fntcache.cxx
index bf15370..536bfba 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -372,6 +372,14 @@ sal_uInt16 SwFntObj::GetFontHeight( const ViewShell* pSh, 
const OutputDevice rO
 return nRet;
 }
 
+static bool IsStarSymbol(const rtl::OUString rFontName)
+{
+sal_uInt16 nIndex = 0;
+rtl::OUString sFamilyNm(GetNextFontToken(rFontName, nIndex));
+return (sFamilyNm.equalsIgnoreAsciiCase(starsymbol) ||
+sFamilyNm.equalsIgnoreAsciiCase(opensymbol));
+}
+
 sal_uInt16 SwFntObj::GetFontLeading( const ViewShell *pSh, const OutputDevice 
rOut )
 {
 sal_uInt16 nRet = 0;
@@ -389,6 +397,23 @@ sal_uInt16 SwFntObj::GetFontLeading( const ViewShell *pSh, 
const OutputDevice r
 bSymbol = RTL_TEXTENCODING_SYMBOL == aMet.GetCharSet();
 GuessLeading( *pSh, aMet );
 nExtLeading = static_castsal_uInt16(aMet.GetExtLeading());
+/* HACK: There is something wrong with Writer's bullet rendering, 
causing lines
+   with bullets to be higher than they should be. I think this is 
because
+   Writer uses font's external leading incorrect, as the vertical 
distance
+   added to every line instead of only a distance between multiple 
lines,
+   which means a single bullet has external leading added even 
though it
+   shouldn't, but frankly this is just an educated guess rather 
than understanding
+   Writer's layout (heh).
+   Symbol font in some documents is 'StarSymbol; Arial Unicode 
MS', and Windows
+   machines often do not have StarSymbol, falling back to Arial 
Unicode MS, which
+   has unusually high external leading. So just reset external 
leading for fonts
+   which are used to bullets, as those should not be used on 
multiple lines anyway,
+   so in correct rendering external leading should be irrelevant 
anyway.
+   Interestingly enough, bSymbol is false for 'StarSymbol; Arial 
Unicode MS', so
+   also check explicitly.
+*/
+if( bSymbol || IsStarSymbol( pPrtFont-GetName()))
+nExtLeading = 0;
 }
 
 const IDocumentSettingAccess rIDSA = 
*pSh-getIDocumentSettingAccess();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/suse/suse-3.6' - sw/source

2013-06-10 Thread Miklos Vajna
 sw/source/core/layout/trvlfrm.cxx |   32 
 1 file changed, 16 insertions(+), 16 deletions(-)

New commits:
commit 6370599f00d614734cbb0920081c85f72e931ca9
Author: Miklos Vajna vmik...@suse.cz
Date:   Mon Jun 10 14:48:59 2013 +0200

bnc#802888 SwPageFrm: one more clickable field fix

This is similar to a996678ed30804e16103e1cfdc439c8546e5d3b0. If we have
both a background object and some clickable field to select, we should
always prefer the clickable field.

This time, the problem was to click on a clickable field, when the
cursor was in normal text and we had a full-page background object.

(cherry picked from commit 721baad94ee81d9d6281edb93ee45936f6e0e496)

Conflicts:
sw/source/core/layout/trvlfrm.cxx

Change-Id: Id25036d8cb2ddf62011c22bfc50844b793b942bd

diff --git a/sw/source/core/layout/trvlfrm.cxx 
b/sw/source/core/layout/trvlfrm.cxx
index 0fa03e1..05935ba 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -269,13 +269,28 @@ sal_Bool SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point 
rPoint,
 }
 }
 
+bool bConsiderBackground = true;
+SwCntntNode* pTextNd = aTextPos.nNode.GetNode( ).GetCntntNode( );
+// If the text position is a clickable field, then that should have 
priority.
+if (pTextNd  pTextNd-IsTxtNode())
+{
+SwTxtNode* pTxtNd = pTextNd-GetTxtNode();
+SwTxtAttr* pTxtAttr = 
pTxtNd-GetTxtAttrForCharAt(aTextPos.nContent.GetIndex(), RES_TXTATR_FIELD);
+if (pTxtAttr)
+{
+const SwField* pField = pTxtAttr-GetFld().GetFld();
+if (pField-IsClickable())
+bConsiderBackground = false;
+}
+}
+
 // Check objects in the background if nothing else matched
 if ( GetSortedObjs() )
 {
 bBackRet = lcl_GetCrsrOfst_Objects( this, true, aBackPos, rPoint, 
pCMS );
 }
 
-if ( ( bTestBackground  bBackRet ) || !bTextRet )
+if ( ( bConsiderBackground  bTestBackground  bBackRet ) || 
!bTextRet )
 {
 bRet = bBackRet;
 (*pPos) = aBackPos;
@@ -291,7 +306,6 @@ sal_Bool SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point 
rPoint,
  * text and brackground object, then we compute the distance 
between both
  * would-be positions and the click point. The shortest distance 
wins.
  */
-SwCntntNode* pTextNd = aTextPos.nNode.GetNode( ).GetCntntNode( );
 double nTextDistance = 0;
 bool bValidTextDistance = false;
 if ( pTextNd )
@@ -304,20 +318,6 @@ sal_Bool SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point 
rPoint,
 bValidTextDistance = true;
 }
 
-bool bConsiderBackground = true;
-// If the text position is a clickable field, then that should 
have priority.
-if (pTextNd-IsTxtNode())
-{
-SwTxtNode* pTxtNd = pTextNd-GetTxtNode();
-SwTxtAttr* pTxtAttr = 
pTxtNd-GetTxtAttrForCharAt(aTextPos.nContent.GetIndex(), RES_TXTATR_FIELD);
-if (pTxtAttr)
-{
-const SwField* pField = pTxtAttr-GetFld().GetFld();
-if (pField-IsClickable())
-bConsiderBackground = false;
-}
-}
-
 double nBackDistance = 0;
 bool bValidBackDistance = false;
 SwCntntNode* pBackNd = aBackPos.nNode.GetNode( ).GetCntntNode( );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/suse/suse-3.6' - sw/source

2013-04-19 Thread Luboš Luňák
 sw/source/core/txtnode/ndtxt.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 414940e7fbcbcbabd793f053a7849995fe52b8e8
Author: Luboš Luňák l.lu...@suse.cz
Date:   Fri Apr 19 13:16:43 2013 +0200

there seems to be no ssize_t on windows

Change-Id: Ib234a53b50929d1f977ff2d7f83afed86514520e

diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 9e88202..364deed 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -1723,8 +1723,8 @@ void SwTxtNode::InsertText( const XubString  rStr, const 
SwIndex  rIdx,
 
 xub_StrLen aPos = rIdx.GetIndex();
 xub_StrLen nLen = m_Text.Len() - aPos;
-ssize_t const nOverflow(static_castssize_t(m_Text.Len())
-+ static_castssize_t(rStr.Len()) - TXTNODE_MAX);
+long const nOverflow(static_castlong(m_Text.Len())
++ static_castlong(rStr.Len()) - TXTNODE_MAX);
 m_Text.Insert((nOverflow  0) ? rStr.Copy(0, rStr.Len() - nOverflow) : 
rStr,
 aPos);
 assert(m_Text.Len() = TXTNODE_MAX);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/suse/suse-3.6' - sw/source

2013-04-19 Thread Miklos Vajna
 sw/source/ui/docvw/edtwin.cxx |   57 +-
 sw/source/ui/wrtsh/wrtsh2.cxx |   11 ++--
 2 files changed, 49 insertions(+), 19 deletions(-)

New commits:
commit 26c6e88ad3779a1a61bb046fc049f0ae9c0df605
Author: Miklos Vajna vmik...@suse.cz
Date:   Fri Apr 19 16:05:41 2013 +0200

bnc#802888, fdo#59928: backport two mouse selection of fields fixes from 
4.0

94721b2aec614e0d99504138d484b2ad6cd550c7 fdo#59928: sw: fix mouse selection 
of fields:
a4a457100a3a6e9f59113e82c9d0b12786273671 fdo#59928: sw: fix mouse selection 
of fields differently

Change-Id: I2f08c55996c642aeadb93299e4f469d63da1230b

diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index 814f677..053bff4 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -139,6 +139,7 @@
 
 #include IMark.hxx
 #include doc.hxx
+#include txatbase.hxx // FIXME this sucks
 #include xmloff/odffields.hxx
 
 #include PostItMgr.hxx
@@ -3107,22 +3108,6 @@ void SwEditWin::MouseButtonDown(const MouseEvent _rMEvt)
 if (aVEvt.eEvent == SDREVENT_EXECUTEURL)
 bExecDrawTextLink = sal_True;
 }
-
-SwContentAtPos aFieldAtPos ( SwContentAtPos::SW_FIELD 
);
-
-// Are we selecting a field?
-if ( rSh.GetContentAtPos( aDocPos, aFieldAtPos ) )
-{
-// select work, AdditionalMode if applicable
-if ( KEY_MOD1 == rMEvt.GetModifier()  
!rSh.IsAddMode() )
-{
-rSh.EnterAddMode();
-rSh.SelWrd( aDocPos );
-rSh.LeaveAddMode();
-}
-else
-rSh.SelWrd( aDocPos );
-}
 break;
 }
 case 2:
@@ -3458,6 +3443,28 @@ void SwEditWin::MouseButtonDown(const MouseEvent _rMEvt)
 rSh.ClearGCAttr();
 }
 
+SwContentAtPos aFieldAtPos(SwContentAtPos::SW_FIELD);
+
+// Are we clicking on a field?
+if (rSh.GetContentAtPos(aDocPos, aFieldAtPos))
+{
+rSh.SetCursor(aDocPos, bOnlyText);
+// Unfortunately the cursor may be on field
+// position or on position after field depending on which
+// half of the field was clicked on.
+SwTxtAttr const*const pTxtFld(aFieldAtPos.pFndTxtAttr);
+if (rSh.GetCurrentShellCursor().GetPoint()-nContent
+.GetIndex() != *pTxtFld-GetStart())
+{
+assert(rSh.GetCurrentShellCursor().GetPoint()-nContent
+.GetIndex() == (*pTxtFld-GetStart() + 1));
+rSh.Left( CRSR_SKIP_CHARS, false, 1, false );
+}
+// don't go into the !bOverSelect block below - it moves
+// the cursor
+break;
+}
+
 sal_Bool bOverSelect = rSh.ChgCurrPam( aDocPos ), bOverURLGrf 
= sal_False;
 if( !bOverSelect )
 bOverURLGrf = bOverSelect = 0 != rSh.IsURLGrfAtPos( 
aDocPos );
@@ -4288,7 +4295,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent rMEvt)
 if(pApplyTempl)
 bExecHyperlinks = sal_False;
 
-SwContentAtPos aCntntAtPos( 
SwContentAtPos::SW_CLICKFIELD |
+SwContentAtPos aCntntAtPos( SwContentAtPos::SW_FIELD |
 
SwContentAtPos::SW_INETATTR |
 
SwContentAtPos::SW_SMARTTAG  | SwContentAtPos::SW_FORMCTRL);
 
@@ -4307,7 +4314,23 @@ void SwEditWin::MouseButtonUp(const MouseEvent rMEvt)
 
 if( SwContentAtPos::SW_FIELD == 
aCntntAtPos.eCntntAtPos )
 {
+bool bAddMode(false);
+// AdditionalMode if applicable
+if (KEY_MOD1 == rMEvt.GetModifier()
+ !rSh.IsAddMode())
+{
+bAddMode = true;
+rSh.EnterAddMode();
+}
 rSh.ClickToField( *aCntntAtPos.aFnd.pFld );
+// a bit of a mystery what this is good for?
+// in this case we assume it's valid since we
+// just selected a field

[Libreoffice-commits] core.git: Branch 'distro/suse/suse-3.6' - sw/source

2013-03-15 Thread László Németh
 sw/source/core/txtnode/txtedt.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit f4baa463b122a6aaf98a44b870d610b6dfd906f2
Author: László Németh nem...@numbertext.org
Date:   Fri Mar 15 04:31:25 2013 +0100

fdo#62360: fix word breaking in Writer for spell checking

Change-Id: I0f23e9f7f076f3a82d1d5df92d9d4d3919fc816d
Signed-off-by: Andras Timar ati...@suse.com

diff --git a/sw/source/core/txtnode/txtedt.cxx 
b/sw/source/core/txtnode/txtedt.cxx
index 2cbe32a..f303138 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -755,7 +755,10 @@ sal_Bool SwScanner::NextWord()
 OSL_ENSURE( aBound.endPos = aBound.startPos, broken aBound result );
 
 // we don't want to include preceeding text
-if (aBound.startPos  nBegin)
+// to count words in text with mixed script punctuation correctly,
+// but we want to include preceeding symbols (eg. percent sign, 
section sign,
+// degree sign defined by dict_word_hu to spell check their affixed 
forms).
+if (nWordType == i18n::WordType::WORD_COUNT  aBound.startPos  
nBegin)
 aBound.startPos = nBegin;
 
 //no word boundaries could be found
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/suse/suse-3.6' - sw/source

2013-03-06 Thread Miklos Vajna
 sw/source/core/text/itrform2.cxx |   18 ++
 1 file changed, 18 insertions(+)

New commits:
commit 96ce8e09ee44b6ec601c65eb16a9102253b7a369
Author: Miklos Vajna vmik...@suse.cz
Date:   Tue Mar 5 16:25:57 2013 +0100

bnc#793998 SwTxtFormatter::FormatLine: fix missing repaints

The incorrect SwLineLayout width caused a missing repaint when a
character is inserted after the tab in the bugdoc, see the already
existing sw/qa/extras/ooxmlimport/data/n793998.docx.

Change-Id: I685203eeb2ed4236758d65132069cd894ece488c
(cherry picked from commit 5dc729cae00e6ea35f5dde13eba89434be2d7dc5)

diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index e33666a..2144e56 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -1606,6 +1606,24 @@ xub_StrLen SwTxtFormatter::FormatLine( const xub_StrLen 
nStartPos )
 }
 }
 
+// In case of compat mode, it's possible that a tab portion is wider after
+// formatting than before. If this is the case, we also have to make sure
+// the SwLineLayout is wider as well.
+if 
(GetInfo().GetTxtFrm()-GetTxtNode()-getIDocumentSettingAccess()-get(IDocumentSettingAccess::TAB_OVER_MARGIN))
+{
+sal_uInt16 nSum = 0;
+SwLinePortion* pPor = pCurr-GetFirstPortion();
+
+while (pPor)
+{
+nSum += pPor-Width();
+pPor = pPor-GetPortion();
+}
+
+if (nSum  pCurr-Width())
+pCurr-Width(nSum);
+}
+
 // calculate optimal repaint rectangle
 if ( bOptimizeRepaint )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/suse/suse-3.6' - sw/source

2013-02-26 Thread Miklos Vajna
 sw/source/ui/docvw/edtwin.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit bb850eead3dd2883343029a863368360e03fcfee
Author: Miklos Vajna vmik...@suse.cz
Date:   Tue Feb 26 11:48:22 2013 +0100

n#802888 SwEditWin: let fields have priority over header/footer flys

http://people.freedesktop.org/~vmiklos/2013/watermark-field-click.odt is
a reproducer, double-click was catched by the fly frame from the header,
so the field edit dialog didn't appear.

(cherry picked from commit 61f467c8974d6b6face41e7027d75ae4ddb6fdb2)

Conflicts:
sw/source/ui/docvw/edtwin.cxx

Change-Id: Ibd3ea382085fa4cbdc1af73d4be1e5c053a81eaa

diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index 712b31f..36db795 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -2731,7 +2731,8 @@ void SwEditWin::MouseButtonDown(const MouseEvent _rMEvt)
 }
 }
 
-if ( lcl_CheckHeaderFooterClick( rSh, aDocPos, rMEvt.GetClicks() ) )
+sal_Bool bIsDocReadOnly = rView.GetDocShell()-IsReadOnly();
+if ( (bIsDocReadOnly || !rSh.GetCurFld())  lcl_CheckHeaderFooterClick( 
rSh, aDocPos, rMEvt.GetClicks() ) )
 return;
 
 
@@ -2750,7 +2751,6 @@ void SwEditWin::MouseButtonDown(const MouseEvent _rMEvt)
 // work but in practice ...
 lcl_SelectShellForDrop( rView );
 
-sal_Bool bIsDocReadOnly = rView.GetDocShell()-IsReadOnly();
 sal_Bool bCallBase = sal_True;
 
 if( pQuickHlpData-bClear )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/suse/suse-3.6' - sw/source

2013-02-25 Thread Miklos Vajna
 sw/source/core/text/itrcrsr.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 7f743c373b028106f5923f53399aae55a51e3e06
Author: Miklos Vajna vmik...@suse.cz
Date:   Mon Feb 25 15:00:08 2013 +0100

n#793998 SwTxtCursor::GetCharRect: respect TabOverMargin compat mode

Change-Id: I47280399bd9e0757365db8f4f1930efd0a340424
(cherry picked from commit 5e992f88d9f78a062bd78ea8907fa247f1f49b5f)

diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx
index 5d0a154..c3a2497 100644
--- a/sw/source/core/text/itrcrsr.cxx
+++ b/sw/source/core/text/itrcrsr.cxx
@@ -1218,7 +1218,9 @@ sal_Bool SwTxtCursor::GetCharRect( SwRect* pOrig, const 
xub_StrLen nOfst,
 pCMS-p2Lines-aPortion.Pos().Y() += aCharPos.Y();
 }
 
-if( pOrig-Left()  nTmpRight )
+const bool bTabOverMargin = 
GetTxtFrm()-GetTxtNode()-getIDocumentSettingAccess()-get(IDocumentSettingAccess::TAB_OVER_MARGIN);
+// Make sure the cursor respects the right margin, unless in compat mode, 
where the tab size has priority over the margin size.
+if( pOrig-Left()  nTmpRight  !bTabOverMargin)
 pOrig-Pos().X() = nTmpRight;
 
 if( nMax )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/suse/suse-3.6' - sw/source writerfilter/source

2013-02-20 Thread Cédric Bosdonnat
 sw/source/core/unocore/unotext.cxx   |9 +
 writerfilter/source/dmapper/DomainMapperTableHandler.cxx |   46 -
 writerfilter/source/dmapper/DomainMapperTableManager.cxx |9 -
 writerfilter/source/dmapper/DomainMapperTableManager.hxx |4 
 writerfilter/source/dmapper/TablePositionHandler.cxx |  117 ++-
 writerfilter/source/dmapper/TablePositionHandler.hxx |   14 +
 writerfilter/source/ooxml/model.xml  |9 -
 7 files changed, 151 insertions(+), 57 deletions(-)

New commits:
commit fca2522c576a386535067ed422a90a05ca648f63
Author: Cédric Bosdonnat cedric.bosdon...@free.fr
Date:   Wed Feb 20 11:04:16 2013 +0100

n#779642: Fixed floating tables import in writerfilter

(cherry picked from commit d0cde9640b52ccfbb28ed1f65bba0927afd7b69b)

Conflicts:
sw/qa/extras/ooxmlimport/ooxmlimport.cxx
writerfilter/source/dmapper/DomainMapperTableManager.cxx
writerfilter/source/dmapper/DomainMapperTableManager.hxx
writerfilter/source/dmapper/TablePositionHandler.cxx
writerfilter/source/dmapper/TablePositionHandler.hxx

Change-Id: I706d36358db98524bdf5d1caf0f0543b9170b0bc

diff --git a/sw/source/core/unocore/unotext.cxx 
b/sw/source/core/unocore/unotext.cxx
index ea5e83b..4f519c2 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -1603,7 +1603,14 @@ throw (lang::IllegalArgumentException, 
uno::RuntimeException)
 // remove the addtional paragraphs in the end
 if (pStartStartNode-GetStartNodeType() == SwTableBoxStartNode)
 {
-SwTableNode *const 
pStartTableNode(pStartStartNode-FindTableNode());
+SwTableNode * pStartTableNode(pStartStartNode-FindTableNode());
+// Is it the same table start node than the end?
+SwTableNode *const 
pEndStartTableNode(pEndStartNode-FindTableNode());
+while (pEndStartTableNode-GetIndex()  
pStartTableNode-GetIndex())
+{
+SwStartNode* pStartStartTableNode = 
pStartTableNode-StartOfSectionNode();
+pStartTableNode = pStartStartTableNode-FindTableNode();
+}
 const SwNodeIndex aTblIdx(  *pStartTableNode, -1 );
 SwPosition aBefore(aTblIdx);
 bParaBeforeInserted = GetDoc()-AppendTxtNode( aBefore );
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx 
b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index f44e93c..65a26f9 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -720,7 +720,8 @@ void DomainMapperTableHandler::endTable(unsigned int 
nestedTableLevel)
 uno::Referencetext::XTextRange xStart;
 uno::Referencetext::XTextRange xEnd;
 // If we want to make this table a floating one.
-bool bFloating = 
!m_rDMapper_Impl.getTableManager().getTableVertAnchor().isEmpty();
+uno::Sequencebeans::PropertyValue aFrameProperties = 
m_rDMapper_Impl.getTableManager().getTablePosition();
+bool bFloating = aFrameProperties.hasElements();
 // Additional checks: if we can do this.
 if (bFloating  (*m_pTableSeq)[0].getLength()  0  
(*m_pTableSeq)[0][0].getLength()  0)
 {
@@ -767,46 +768,11 @@ void DomainMapperTableHandler::endTable(unsigned int 
nestedTableLevel)
 if (xTable.is()  xStart.is()  xEnd.is())
 {
 uno::Referencebeans::XPropertySet xTableProperties(xTable, 
uno::UNO_QUERY);
-uno::Sequence beans::PropertyValue  aFrameProperties(16);
-beans::PropertyValue* pFrameProperties = 
aFrameProperties.getArray();
-pFrameProperties[0].Name = Width;
-pFrameProperties[0].Value = 
xTableProperties-getPropertyValue(Width);
-
-pFrameProperties[1].Name = LeftBorderDistance;
-pFrameProperties[1].Value = sal_Int32(0);
-pFrameProperties[2].Name = RightBorderDistance;
-pFrameProperties[2].Value = sal_Int32(0);
-pFrameProperties[3].Name = TopBorderDistance;
-pFrameProperties[3].Value = sal_Int32(0);
-pFrameProperties[4].Name = BottomBorderDistance;
-pFrameProperties[4].Value = sal_Int32(0);
-
-pFrameProperties[5].Name = LeftMargin;
-pFrameProperties[5].Value = sal_Int32(0);
-pFrameProperties[6].Name = RightMargin;
-pFrameProperties[6].Value = sal_Int32(0);
-pFrameProperties[7].Name = TopMargin;
-pFrameProperties[7].Value = sal_Int32(0);
-pFrameProperties[8].Name = BottomMargin;
-pFrameProperties[8].Value = sal_Int32(0);
-
-table::BorderLine2 aEmptyBorder;
-pFrameProperties[9].Name = TopBorder;
-pFrameProperties[9].Value = aEmptyBorder;
-pFrameProperties[10].Name = BottomBorder;
-