[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/core/frmedt/feshview.cxx |4 ++-- sw/source/ui/app/swmodul1.cxx | 16 sw/source/ui/app/swmodule.cxx |2 +- sw/source/ui/cctrl/actctrl.cxx |4 ++-- sw/source/ui/chrdlg/drpcps.cxx | 12 ++-- sw/source/ui/chrdlg/numpara.cxx|4 ++-- sw/source/ui/chrdlg/pardlg.cxx |2 +- sw/source/ui/docvw/edtdd.cxx |4 ++-- sw/source/ui/docvw/edtwin.cxx | 34 ++ sw/source/ui/ribbar/conform.cxx|4 ++-- sw/source/ui/ribbar/drawbase.cxx | 16 sw/source/ui/shells/textfld.cxx|6 +++--- sw/source/ui/uiview/view.cxx |6 +++--- sw/source/ui/wrtsh/wrtsh3.cxx |6 +++--- 14 files changed, 61 insertions(+), 59 deletions(-) New commits: commit 4ca4d659de8ff32572634d9e3ef7ea7b21ef87f9 Author: Takeshi Abe t...@fixedpoint.jp Date: Tue Jan 8 10:09:22 2013 +0900 sal_Bool to bool Backport needed to fix build after backport of 6306c7befaa676df62272da7f3ddbcba54c5759c . Change-Id: I4e4063321da69d45d14a2fc870c33ea8ae46e4ef Signed-off-by: LuboÅ¡ LuÅák l.lu...@suse.cz diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index be852a9..a3d5391 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -119,13 +119,13 @@ void lcl_GrabCursor( SwFEShell* pSh, SwFlyFrm* pOldSelFly) { // now call set macro if applicable pSh-GetFlyMacroLnk().Call( (void*)pFlyFmt ); -extern sal_Bool bNoInterrupt; // in swapp.cxx +extern bool bNoInterrupt; // in swapp.cxx // if a dialog was started inside a macro, then // MouseButtonUp arrives at macro and not to us. Therefore // flag is always set here and will never be switched to // respective Shell !!! -bNoInterrupt = sal_False; +bNoInterrupt = false; } else if( !pFlyFmt || RES_DRAWFRMFMT == pFlyFmt-Which() ) { diff --git a/sw/source/ui/app/swmodul1.cxx b/sw/source/ui/app/swmodul1.cxx index 24630bd..e4f8715 100644 --- a/sw/source/ui/app/swmodul1.cxx +++ b/sw/source/ui/app/swmodul1.cxx @@ -83,9 +83,9 @@ using namespace ::com::sun::star::lang; void lcl_SetUIPrefs(const SwViewOption rPref, SwView* pView, ViewShell* pSh ) { // in FrameSets the actual visibility can differ from the ViewOption's setting -sal_Bool bVScrollChanged = rPref.IsViewVScrollBar() != pSh-GetViewOptions()-IsViewVScrollBar(); -sal_Bool bHScrollChanged = rPref.IsViewHScrollBar() != pSh-GetViewOptions()-IsViewHScrollBar(); -sal_Bool bVAlignChanged = rPref.IsVRulerRight() != pSh-GetViewOptions()-IsVRulerRight(); +bool bVScrollChanged = rPref.IsViewVScrollBar() != pSh-GetViewOptions()-IsViewVScrollBar(); +bool bHScrollChanged = rPref.IsViewHScrollBar() != pSh-GetViewOptions()-IsViewHScrollBar(); +bool bVAlignChanged = rPref.IsVRulerRight() != pSh-GetViewOptions()-IsVRulerRight(); pSh-SetUIOptions(rPref); const SwViewOption* pNewPref = pSh-GetViewOptions(); @@ -165,7 +165,7 @@ void SwModule::ApplyUsrPref(const SwViewOption rUsrPref, SwView* pActView, pCurrView pCurrView-ISA(SwWebView) )); // with Uno, only sdbcx::View, but not the Module should be changed -sal_Bool bViewOnly = VIEWOPT_DEST_VIEW_ONLY == nDest; +bool bViewOnly = VIEWOPT_DEST_VIEW_ONLY == nDest; // fob PreView off SwPagePreView* pPPView; if( !pCurrView 0 != (pPPView = PTR_CAST( SwPagePreView, SfxViewShell::Current())) ) @@ -312,11 +312,11 @@ void SwModule::ApplyUserCharUnit(sal_Bool bApplyChar, sal_Bool bWeb) pPref = pUsrPref; } sal_Bool bOldApplyCharUnit = pPref-IsApplyCharUnit(); -sal_Bool bHasChanged = sal_False; +bool bHasChanged = false; if(bOldApplyCharUnit != bApplyChar) { pPref-SetApplyCharUnit(bApplyChar); -bHasChanged = sal_True; +bHasChanged = true; } if( !bHasChanged ) @@ -471,7 +471,7 @@ void lcl_FillAuthorAttr( sal_uInt16 nAuthor, SfxItemSet rSet, sizeof( aColArr[0] )) ] ); } -sal_Bool bBackGr = COL_NONE == rAttr.nColor; +bool bBackGr = COL_NONE == rAttr.nColor; switch (rAttr.nItemId) { @@ -514,7 +514,7 @@ void lcl_FillAuthorAttr( sal_uInt16 nAuthor, SfxItemSet rSet, case SID_ATTR_BRUSH: rSet.Put( SvxBrushItem( aCol, RES_CHRATR_BACKGROUND )); -bBackGr = sal_True; +bBackGr = true; break; } diff --git a/sw/source/ui/app/swmodule.cxx b/sw/source/ui/app/swmodule.cxx index 4c97524..a1fcd36 100644 --- a/sw/source/ui/app/swmodule.cxx +++ b/sw/source/ui/app/swmodule.cxx @@ -139,7 +139,7 @@ #include app.hrc #include svx/xmlsecctrl.hxx ResMgr *pSwResMgr = 0; -sal_Bool bNoInterrupt = sal_False; +bool bNoInterrupt = false; #include sfx2/app.hxx diff --git
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/ui/app/docst.cxx |9 + 1 file changed, 9 insertions(+) New commits: commit 6306c7befaa676df62272da7f3ddbcba54c5759c Author: Michael Stahl mst...@redhat.com Date: Wed Jan 16 16:23:30 2013 +0100 rhbz#818557: fix it differently: SwDocShell::_LoadStyles(): Try to prevent pushing of SfxShells from this function via EndAllAction and SwView::AttrChangedNotify() by setting a ridiculous pre-exising global bNoInterrupt variable. Change-Id: I9c91ca882891c8dfcd9dc08ba197233cfefddefd (cherry picked from commit beacee6fad46aa2c8fc813bb0150e5c7a5175b26) Reviewed-on: https://gerrit.libreoffice.org/1724 Reviewed-by: Miklos Vajna vmik...@suse.cz Tested-by: Miklos Vajna vmik...@suse.cz diff --git a/sw/source/ui/app/docst.cxx b/sw/source/ui/app/docst.cxx index 8f90a15..81ed1a7 100644 --- a/sw/source/ui/app/docst.cxx +++ b/sw/source/ui/app/docst.cxx @@ -31,6 +31,8 @@ #include com/sun/star/beans/XPropertySet.hpp #include com/sun/star/container/XNameAccess.hpp +#include comphelper/flagguard.hxx + #include hintids.hxx #include sfx2/app.hxx #include svl/whiter.hxx @@ -86,6 +88,8 @@ #include paratr.hxx //#outline level,add by zhaojianwei +extern bool bNoInterrupt; // in mainwn.cxx + using namespace ::com::sun::star; void SwDocShell::StateStyleSheet(SfxItemSet rSet, SwWrtShell* pSh) @@ -1223,6 +1227,11 @@ void SwDocShell::_LoadStyles( SfxObjectShell rSource, sal_Bool bPreserveCurrent ((SwDocShell)rSource).pDoc-SetFixFields(false, NULL); if( pWrtShell ) { +// rhbz#818557, fdo#58893: EndAllAction will call SelectShell(), +// which pushes a bunch of SfxShells that are not cleared +// (for unknown reasons) when closing the document, causing crash; +// setting bNoInterrupt appears to avoid the problem. +::comphelper::FlagRestorationGuard g(bNoInterrupt, true); pWrtShell-StartAllAction(); pDoc-ReplaceStyles( *((SwDocShell)rSource).pDoc ); pWrtShell-EndAllAction(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/ui/uiview/viewmdi.cxx |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) New commits: commit 5aadc1cf65841ce8737ec6602dcc3751e368c395 Author: Winfried Donkers o...@dci-electronics.nl Date: Mon Jan 14 19:53:10 2013 +0100 fdo#40465 solve regression when zooming with cursor not visible Change-Id: If8dfff1a27218c7821823fcad04bab9f924fec70 (cherry picked from commit fa058a4cd6580d5538c49d565499fb5cc4ecfe53) Signed-off-by: Michael Stahl mst...@redhat.com diff --git a/sw/source/ui/uiview/viewmdi.cxx b/sw/source/ui/uiview/viewmdi.cxx index f600461..ac68198 100644 --- a/sw/source/ui/uiview/viewmdi.cxx +++ b/sw/source/ui/uiview/viewmdi.cxx @@ -73,10 +73,11 @@ using namespace ::com::sun::star::frame; void SwView::SetZoom( SvxZoomType eZoomType, short nFactor, sal_Bool bViewOnly ) { +bool const bCrsrIsVisible(pWrtShell-IsCrsrVisible()); _SetZoom( GetEditWin().GetOutputSizePixel(), eZoomType, nFactor, bViewOnly ); - -//fdo40465 force the cursor to stay in view whilst zooming -pWrtShell-ShowCrsr(); +// fdo#40465 force the cursor to stay in view whilst zooming +if (bCrsrIsVisible) +pWrtShell-ShowCrsr(); } void SwView::_SetZoom( const Size rEditSize, SvxZoomType eZoomType, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/core/unocore/unocrsrhelper.cxx | 11 --- sw/source/core/unocore/unoobj.cxx|4 sw/source/core/unocore/unoobj2.cxx |7 --- 3 files changed, 16 insertions(+), 6 deletions(-) New commits: commit b58dc1b9aee370a1a2aa9d8f951cede3ae24d61d Author: Michael Stahl mst...@redhat.com Date: Wed Jan 9 15:45:32 2013 +0100 fdo#58242: sw: fix more crashes when not on SwTxtNode In getCrsrPropertyValue etc.; also add a unit test for the problem. (cherry picked from commit 68d40d2cae3700f4134375fcaf9649ac626ada7d) Conflicts: sw/qa/complex/writer/CheckTable.java Change-Id: Ibd459a43393c39b4fed9fb89aae4a5f7bacff007 Reviewed-on: https://gerrit.libreoffice.org/1615 Reviewed-by: Noel Power noel.po...@suse.com Tested-by: Noel Power noel.po...@suse.com diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index e41d237..aa9cc45 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -497,9 +497,9 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry rEntry case FN_UNO_CHARFMT_SEQUENCE: { -SwTxtNode* pTxtNode; -if((pTxtNode = (SwTxtNode*)rPam.GetNode( sal_True )) == rPam.GetNode(sal_False) -pTxtNode-GetpSwpHints()) +SwTxtNode *const pTxtNode = rPam.GetNode()-GetTxtNode(); +if (rPam.GetNode(sal_True) == rPam.GetNode(sal_False) + pTxtNode pTxtNode-GetpSwpHints()) { sal_uInt16 nPaMStart = rPam.GetPoint()-nContent.GetIndex(); sal_uInt16 nPaMEnd = rPam.GetMark() ? rPam.GetMark()-nContent.GetIndex() : nPaMStart; @@ -951,6 +951,11 @@ sal_Bool DocInsertStringSplitCR( xub_StrLen nStartIdx = 0; SwTxtNode* const pTxtNd = rNewCursor.GetPoint()-nNode.GetNode().GetTxtNode(); +if (!pTxtNd) +{ +SAL_INFO(sw.uno, DocInsertStringSplitCR: need a text node); +return false; +} const xub_StrLen nMaxLength = ( pTxtNd ) ? STRING_LEN - pTxtNd-GetTxt().Len() : STRING_LEN; diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx index 3bba084..d400286 100644 --- a/sw/source/core/unocore/unoobj.cxx +++ b/sw/source/core/unocore/unoobj.cxx @@ -556,6 +556,10 @@ throw (lang::IllegalArgumentException) { // multi selection is not considered SwTxtNode *const pTxtNd = rPam.GetNode()-GetTxtNode(); +if (!pTxtNd) +{ +throw lang::IllegalArgumentException(); +} if (FN_UNO_NUM_LEVEL == rEntry.nWID) { sal_Int16 nLevel = 0; diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index ea121c1..6e0bf2f 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -1851,9 +1851,10 @@ lcl_FillFrame(SwClient rEnum, SwUnoCrsr rUnoCrsr, FrameDependList_t rFrames) { // search for objects at the cursor - anchored at/as char -SwTxtAttr const*const pTxtAttr = -rUnoCrsr.GetNode()-GetTxtNode()-GetTxtAttrForCharAt( -rUnoCrsr.GetPoint()-nContent.GetIndex(), RES_TXTATR_FLYCNT); +SwTxtAttr const*const pTxtAttr = (rUnoCrsr.GetNode()-IsTxtNode()) +? rUnoCrsr.GetNode()-GetTxtNode()-GetTxtAttrForCharAt( +rUnoCrsr.GetPoint()-nContent.GetIndex(), RES_TXTATR_FLYCNT) +: 0; if (pTxtAttr) { const SwFmtFlyCnt rFlyCnt = pTxtAttr-GetFlyCnt(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/core/unocore/unocrsrhelper.cxx | 28 +++- 1 file changed, 19 insertions(+), 9 deletions(-) New commits: commit e5add879def40a7695fb506b42c024ef9f776062 Author: Noel Power noel.po...@suse.com Date: Wed Jan 9 14:40:10 2013 +0100 fdo#58242: getCrsrPropertyValue: fix crashes when PaM not on SwTxtNode Change-Id: I67042b5d689457921a928454c9051f0402be17e6 (cherry picked from commit 11b380874a36869452246cc77c392d1767e60e95) Signed-off-by: Michael Stahl mst...@redhat.com diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index 0993721..e41d237 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -302,9 +302,12 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry rEntry break; case FN_UNO_DOCUMENT_INDEX_MARK: { -::std::vectorSwTxtAttr * const marks( -rPam.GetNode()-GetTxtNode()-GetTxtAttrsAt( -rPam.GetPoint()-nContent.GetIndex(), RES_TXTATR_TOXMARK)); +::std::vectorSwTxtAttr * marks; +if (rPam.GetNode()-IsTxtNode()) +{ +marks = rPam.GetNode()-GetTxtNode()-GetTxtAttrsAt( +rPam.GetPoint()-nContent.GetIndex(), RES_TXTATR_TOXMARK); +} if (marks.size()) { if( pAny ) @@ -428,9 +431,9 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry rEntry case FN_UNO_ENDNOTE: case FN_UNO_FOOTNOTE: { -SwTxtAttr *const pTxtAttr = +SwTxtAttr *const pTxtAttr = rPam.GetNode()-IsTxtNode() ? rPam.GetNode()-GetTxtNode()-GetTxtAttrForCharAt( -rPam.GetPoint()-nContent.GetIndex(), RES_TXTATR_FTN); +rPam.GetPoint()-nContent.GetIndex(), RES_TXTATR_FTN) : 0; if(pTxtAttr) { const SwFmtFtn rFtn = pTxtAttr-GetFtn(); @@ -452,9 +455,13 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry rEntry break; case FN_UNO_REFERENCE_MARK: { -::std::vectorSwTxtAttr * const marks( +::std::vectorSwTxtAttr * marks; +if (rPam.GetNode()-IsTxtNode()) +{ +marks = ( rPam.GetNode()-GetTxtNode()-GetTxtAttrsAt( rPam.GetPoint()-nContent.GetIndex(), RES_TXTATR_REFMARK)); +} if (marks.size()) { if( pAny ) @@ -470,9 +477,10 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry rEntry break; case FN_UNO_NESTED_TEXT_CONTENT: { -uno::ReferenceXTextContent const xRet( -GetNestedTextContent(*rPam.GetNode()-GetTxtNode(), -rPam.GetPoint()-nContent.GetIndex(), false)); +uno::ReferenceXTextContent const xRet(rPam.GetNode()-IsTxtNode() +? GetNestedTextContent(*rPam.GetNode()-GetTxtNode(), +rPam.GetPoint()-nContent.GetIndex(), false) +: 0); if (xRet.is()) { if (pAny) @@ -721,6 +729,8 @@ void getNumberingProperty(SwPaM rPam, PropertyState eState, Any * pAny ) void GetCurPageStyle(SwPaM rPaM, String rString) { +if (!rPaM.GetCntntNode()) +return; // TODO: is there an easy way to get it for tables/sections? const SwPageFrm* pPage = rPaM.GetCntntNode()-getLayoutFrm(rPaM.GetDoc()-GetCurrentLayout())-FindPageFrm(); if(pPage) SwStyleNameMapper::FillProgName( pPage-GetPageDesc()-GetName(), rString, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC, sal_True ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/ui/uiview/viewmdi.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit e5dcec6e58b4bd8582380dd1f97957c369ba9182 Author: Winfried Donkers o...@dci-electronics.nl Date: Sun Dec 9 12:34:45 2012 +0100 fdo#40465 fix to maintain correct focus whilst zooming Change-Id: Ifed6e9a1fcb23e3565843842c3db695ab51b3d54 (cherry picked from commit d14f7e4ec48f9a9eee0585fb5ee72512e9f4bd19) Signed-off-by: Miklos Vajna vmik...@suse.cz diff --git a/sw/source/ui/uiview/viewmdi.cxx b/sw/source/ui/uiview/viewmdi.cxx index 2a20f44..f600461 100644 --- a/sw/source/ui/uiview/viewmdi.cxx +++ b/sw/source/ui/uiview/viewmdi.cxx @@ -74,6 +74,9 @@ using namespace ::com::sun::star::frame; void SwView::SetZoom( SvxZoomType eZoomType, short nFactor, sal_Bool bViewOnly ) { _SetZoom( GetEditWin().GetOutputSizePixel(), eZoomType, nFactor, bViewOnly ); + +//fdo40465 force the cursor to stay in view whilst zooming +pWrtShell-ShowCrsr(); } void SwView::_SetZoom( const Size rEditSize, SvxZoomType eZoomType, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/ui/uno/unotxdoc.cxx |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit 67e1040a7093a872195d0099bf15f5d0b3c2e164 Author: Michael Stahl mst...@redhat.com Date: Fri Jan 4 22:27:22 2013 +0100 rhbz#890080: crash in SwXTextDocument::getRendererCount No idea how to reproduce it; pSwView is checked before use except here. (possibly regression from 2f9f480b22f2fff59d9c48b4b46706c3d5223e66) Change-Id: Ia7667e879a6944e084a45c06133efc1ac2d8b3c0 (cherry picked from commit 1c52268a5bc6d79c6ee1344e4e341c7e3820d4e0) Reviewed-on: https://gerrit.libreoffice.org/1546 Reviewed-by: Ivan Timofeev timofeev@gmail.com Tested-by: Ivan Timofeev timofeev@gmail.com diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index 69e524d..e6d25e3 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -2556,7 +2556,10 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount( SwViewOption aOpt( *pViewShell-GetViewOptions() ); aOpt.setBrowseMode( false ); pViewShell-ApplyViewOptions( aOpt ); -pSwView-RecheckBrowseMode(); +if (pSwView) +{ +pSwView-RecheckBrowseMode(); +} } // reformating the document for printing will show the changes in the view ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/filter/ww8/writerwordglue.cxx |4 1 file changed, 4 insertions(+) New commits: commit 5220a3615a806224d3a54283da4abdaae4b15795 Author: Luke Deller l...@deller.id.au Date: Wed Dec 5 23:09:38 2012 +1100 fix for fdo#57551: landscape/portrait sequence lost in FILESAVE as .doc Change-Id: I4d888fc7e9b68ee4c693b565d8ef23dcb825f7ce Reviewed-on: https://gerrit.libreoffice.org/1251 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com Reviewed-on: https://gerrit.libreoffice.org/1387 Reviewed-by: Miklos Vajna vmik...@suse.cz Tested-by: Miklos Vajna vmik...@suse.cz diff --git a/sw/source/filter/ww8/writerwordglue.cxx b/sw/source/filter/ww8/writerwordglue.cxx index 2c1bd54..6be5a8d 100644 --- a/sw/source/filter/ww8/writerwordglue.cxx +++ b/sw/source/filter/ww8/writerwordglue.cxx @@ -358,6 +358,8 @@ namespace sw const SwColumns rFollowColumns = rFollowCols.GetColumns(); const SvxLRSpaceItem rOneLR = rTitleFmt.GetLRSpace(); const SvxLRSpaceItem rTwoLR= rFollowFmt.GetLRSpace(); +const SwFmtFrmSize rFirstFrmSize = rTitleFmt.GetFrmSize(); +const SwFmtFrmSize rFollowFrmSize = rFollowFmt.GetFrmSize(); if (rFirstColumns.size() != rFollowColumns.size()) { @@ -366,6 +368,8 @@ namespace sw } else if (rOneLR != rTwoLR) bPlausableTitlePage = false; +else if (rFirstFrmSize != rFollowFrmSize) +bPlausableTitlePage = false; else { HdFtDistanceGlue aOne(rTitleFmt.GetAttrSet()); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/filter/html/htmlfly.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit bdce3306e84353f0d428a8ec2b74cf620ba10c63 Author: Michael Stahl mst...@redhat.com Date: Mon Dec 17 17:44:22 2012 +0100 fdo#58286: sw HTML export: fix missing end tags on FrmFmts SwHTMLWriter::OutFrmFmtOptions must return a value that includes the parameter rEndTags. (regression from 3852a6f54880af8ed9161227baa80c7d4517) Change-Id: I280a0de57e254f75b69d08d93e23bf7c765058ec (cherry picked from commit a923084f872b8ce13f6213827fe5b1c711e6b15f) Reviewed-on: https://gerrit.libreoffice.org/1390 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com diff --git a/sw/source/filter/html/htmlfly.cxx b/sw/source/filter/html/htmlfly.cxx index 9aabb32..dd55694 100644 --- a/sw/source/filter/html/htmlfly.cxx +++ b/sw/source/filter/html/htmlfly.cxx @@ -545,7 +545,7 @@ rtl::OString SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt rFrmFmt, sal_uInt32 nFrmOpts, const rtl::OString rEndTags ) { -rtl::OString sRetEndTags; +rtl::OString sRetEndTags(rEndTags); rtl::OStringBuffer sOut; const SfxPoolItem* pItem; const SfxItemSet rItemSet = rFrmFmt.GetAttrSet(); @@ -822,6 +822,7 @@ rtl::OString SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt rFrmFmt, sRetEndTags = sOut.makeStringAndClear(); } } +assert(sRetEndTags.endsWith(rEndTags)); // fdo#58286 return sRetEndTags; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/filter/ww8/docxattributeoutput.cxx | 13 - sw/source/filter/ww8/docxattributeoutput.hxx |2 +- 2 files changed, 9 insertions(+), 6 deletions(-) New commits: commit 1a776160ba9abde53bbebce6fdd2cb264a800c2f Author: Miklos Vajna vmik...@suse.cz Date: Wed Nov 14 19:03:05 2012 +0100 fdo#52477 n#789482 DOCX: export track change data after w:hyperlink (cherry picked from commit eac3e6e746300df379226941ba75c4e0ce1feb7a) Conflicts: sw/source/filter/ww8/docxattributeoutput.cxx Change-Id: If204523d7da544b11b2d809993ada180476104ef diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index d075cd4..71b84f4 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -507,8 +507,9 @@ void DocxAttributeOutput::EndParagraphProperties() void DocxAttributeOutput::StartRun( const SwRedlineData* pRedlineData, bool /*bSingleEmptyRun*/ ) { -// if there is some redlining in the document, output it -StartRedline( pRedlineData ); +// Don't start redline data here, possibly there is a hyperlink later, and +// that has to be started first. +m_pRedlineData = pRedlineData; // postpone the output of the start of a run (there are elements that need // to be written before the start of the run, but we learn which they are @@ -585,6 +586,9 @@ void DocxAttributeOutput::EndRun() m_startedHyperlink = true; } +// if there is some redlining in the document, output it +StartRedline(); + DoWriteBookmarks( ); m_pSerializer-startElementNS( XML_w, XML_r, FSEND ); @@ -1315,12 +1319,11 @@ static OString impl_DateTimeToOString( const DateTime rDateTime ) return aBuffer.makeStringAndClear(); } -void DocxAttributeOutput::StartRedline( const SwRedlineData* pRedlineData ) +void DocxAttributeOutput::StartRedline() { -m_pRedlineData = pRedlineData; - if ( !m_pRedlineData ) return; +const SwRedlineData* pRedlineData = m_pRedlineData; // FIXME check if it's necessary to travel over the Next()'s in pRedlineData diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx index 3cc75b7..b605aba 100644 --- a/sw/source/filter/ww8/docxattributeoutput.hxx +++ b/sw/source/filter/ww8/docxattributeoutput.hxx @@ -137,7 +137,7 @@ public: /// /// Start of the tag that encloses the run, fills the info according to /// the value of m_pRedlineData. -void StartRedline( const SwRedlineData* pRedlineData ); +void StartRedline(); /// Output redlining. /// ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/core/text/portxt.cxx |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit df15a240c409ddfd71bb969f2427c7ad846321e6 Author: Caolán McNamara caol...@redhat.com Date: Thu Dec 13 16:35:06 2012 + Resolves: fdo#32181 #i68503# don't emit pesky space unless in tagged pdf mode which means that they are not there to be underlined Change-Id: Ic02372c5284384e18198ebea44c36e83ccb6bf2a (cherry picked from commit d3a9e97164c0071d8b18f8dcf4197ec7c5c5c2f9) Reviewed-on: https://gerrit.libreoffice.org/1328 Reviewed-by: Miklos Vajna vmik...@suse.cz Tested-by: Miklos Vajna vmik...@suse.cz diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx index 3932f37..5b1f9f4 100644 --- a/sw/source/core/text/portxt.cxx +++ b/sw/source/core/text/portxt.cxx @@ -32,6 +32,7 @@ #include com/sun/star/i18n/ScriptType.hdl #include hintids.hxx // CH_TXTATR +#include EnhancedPDFExportHelper.hxx #include SwPortionHandler.hxx #include porlay.hxx #include inftxt.hxx @@ -727,7 +728,8 @@ SwLinePortion *SwHolePortion::Compress() { return this; } void SwHolePortion::Paint( const SwTxtPaintInfo rInf ) const { // #i16816# tagged pdf support -if( rInf.GetVsh() rInf.GetVsh()-GetViewOptions()-IsPDFExport() ) +if( rInf.GetVsh() rInf.GetVsh()-GetViewOptions()-IsPDFExport() +SwTaggedPDFHelper::IsExportTaggedPDF( *rInf.GetOut()) ) { const XubString aTxt( ' ' ); rInf.DrawText( aTxt, *this, 0, 1, false ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/core/layout/trvlfrm.cxx | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) New commits: commit 4703b45c8fd6b72c8cb797492b14e48b5e1c38f7 Author: Michael Stahl mst...@redhat.com Date: Thu Dec 13 01:28:59 2012 +0100 fdo#58142: fix frame selection in SwPageFrm::GetCrsrOfst: The function does not handle the case where a paragraph was hit but no background frame was hit properly, which may or may not (depending on the platform) cause it to return a position of a frame when that is undesirable, such as when called from SwWrtShell::UnSelectFrm(). When UnselectFrm() leaves a frame selected pasting multiple pictures leads to a crash. (regression from e8fbe97900f13305b17015d9044993bde4adab36) Change-Id: I3604825f654c523a37f47a9fc660647d8b3e7077 (cherry picked from commit 2fc4af311656e7d019ca802d23444e5161f820ee) Reviewed-on: https://gerrit.libreoffice.org/1314 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx index 2ffc033..ee907cd 100644 --- a/sw/source/core/layout/trvlfrm.cxx +++ b/sw/source/core/layout/trvlfrm.cxx @@ -275,8 +275,12 @@ sal_Bool SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point rPoint, if ( ( bTestBackground bBackRet ) || !bTextRet ) { bRet = bBackRet; -pPos-nNode = aBackPos.nNode; -pPos-nContent = aBackPos.nContent; +(*pPos) = aBackPos; +} +else if (bTextRet !bBackRet) +{ +bRet = bTextRet; +(*pPos) = aTextPos; } else { @@ -314,14 +318,12 @@ sal_Bool SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point rPoint, if ( bValidTextDistance bValidBackDistance basegfx::fTools::more( nTextDistance, nBackDistance ) ) { bRet = bBackRet; -pPos-nNode = aBackPos.nNode; -pPos-nContent = aBackPos.nContent; +(*pPos) = aBackPos; } else { bRet = bTextRet; -pPos-nNode = aTextPos.nNode; -pPos-nContent = aTextPos.nContent; +(*pPos) = aTextPos; } } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/core/layout/tabfrm.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 1ca23f2674d1c46ad8629f657a0c9a67a5551679 Author: Michael Stahl mst...@redhat.com Date: Mon Dec 10 20:52:55 2012 +0100 fdo#57780: sw: lcl_ArrangeLowers: register drawing ... ... objects at the right page. This was effectively disabled for all anchor types except FLY_AT_PARA by a misplaced ! in the conditional, and C++ not being a type safe language. Change-Id: I64af2141e577ac896292eecd9f8c46c62a0548db (cherry picked from commit c479ccc438edeb7197a2d05bdb99067365d7bac0) Reviewed-on: https://gerrit.libreoffice.org/1290 Reviewed-by: Eike Rathke er...@redhat.com Tested-by: Eike Rathke er...@redhat.com diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index a008a13..39dad68 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -4832,8 +4832,8 @@ sal_Bool lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, sal_Bool bInva ) if ( pTabFrm !( pTabFrm-IsFollow() pTabFrm-FindMaster()-IsRebuildLastLine() ) - !pAnchoredObj-GetFrmFmt().GetAnchor().GetAnchorId() -== FLY_AS_CHAR ) + (pAnchoredObj-GetFrmFmt().GetAnchor().GetAnchorId() +!= FLY_AS_CHAR)) { SwPageFrm* pPageFrm = pAnchoredObj-GetPageFrm(); SwPageFrm* pPageOfAnchor = pFrm-FindPageFrm(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/core/doc/notxtfrm.cxx |2 sw/source/core/inc/cellfrm.hxx|2 sw/source/core/inc/flyfrm.hxx |2 sw/source/core/inc/frame.hxx |2 sw/source/core/inc/layfrm.hxx |2 sw/source/core/inc/notxtfrm.hxx |2 sw/source/core/inc/pagefrm.hxx|2 sw/source/core/inc/rootfrm.hxx|2 sw/source/core/inc/txtfrm.hxx |2 sw/source/core/layout/trvlfrm.cxx | 96 ++ sw/source/core/layout/unusedf.cxx |2 sw/source/core/text/frmcrsr.cxx |2 12 files changed, 77 insertions(+), 41 deletions(-) New commits: commit d0a4a025855d78cdce194885c4df024c499bade6 Author: Cédric Bosdonnat cedric.bosdon...@free.fr Date: Fri Nov 23 17:51:16 2012 +0100 fdo#52182: Fixed click in frames located in header/footer Using a distance to click to select the best object to select between normal text and background object. (cherry picked from commit e8fbe97900f13305b17015d9044993bde4adab36) Conflicts: sw/source/ui/docvw/edtwin.cxx sw/source/ui/inc/edtwin.hxx Change-Id: Ib5b53161c7af2c16f4df379382f2e53fc6d8092b Signed-off-by: Michael Stahl mst...@redhat.com diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index 83b2fa9..99a8ea4 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -598,7 +598,7 @@ sal_Bool SwNoTxtFrm::GetCharRect( SwRect rRect, const SwPosition rPos, sal_Bool SwNoTxtFrm::GetCrsrOfst(SwPosition* pPos, Point , - SwCrsrMoveState* ) const + SwCrsrMoveState*, bool ) const { SwCntntNode* pCNd = (SwCntntNode*)GetNode(); pPos-nNode = *pCNd; diff --git a/sw/source/core/inc/cellfrm.hxx b/sw/source/core/inc/cellfrm.hxx index 0bc62ae..958806e 100644 --- a/sw/source/core/inc/cellfrm.hxx +++ b/sw/source/core/inc/cellfrm.hxx @@ -48,7 +48,7 @@ public: SwCellFrm( const SwTableBox , SwFrm*, bool bInsertContent = true ); ~SwCellFrm(); -virtual sal_Bool GetCrsrOfst( SwPosition *, Point, SwCrsrMoveState* = 0 ) const; +virtual sal_Bool GetCrsrOfst( SwPosition *, Point, SwCrsrMoveState* = 0, bool bTestBackground = false ) const; virtual void Paint( SwRect const, SwPrintData const*const pPrintData = NULL ) const; virtual void CheckDirection( sal_Bool bVert ); diff --git a/sw/source/core/inc/flyfrm.hxx b/sw/source/core/inc/flyfrm.hxx index 170064e..635451b 100644 --- a/sw/source/core/inc/flyfrm.hxx +++ b/sw/source/core/inc/flyfrm.hxx @@ -163,7 +163,7 @@ public: SwPrintData const*const pPrintData = NULL ) const; virtual Size ChgSize( const Size aNewSize ); virtual sal_Bool GetCrsrOfst( SwPosition *, Point, - SwCrsrMoveState* = 0 ) const; + SwCrsrMoveState* = 0, bool bTestBackground = false ) const; virtual void CheckDirection( sal_Bool bVert ); virtual void Cut(); diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx index 3812a29..15c34ef 100644 --- a/sw/source/core/inc/frame.hxx +++ b/sw/source/core/inc/frame.hxx @@ -785,7 +785,7 @@ public: virtual boolFillSelection( SwSelectionList rList, const SwRect rRect ) const; virtual sal_BoolGetCrsrOfst( SwPosition *, Point, - SwCrsrMoveState* = 0 ) const; + SwCrsrMoveState* = 0, bool bTestBackground = false ) const; virtual sal_BoolGetCharRect( SwRect , const SwPosition, SwCrsrMoveState* = 0 ) const; virtual void Paint( SwRect const, diff --git a/sw/source/core/inc/layfrm.hxx b/sw/source/core/inc/layfrm.hxx index 4c4e4e6..a8d4bc4 100644 --- a/sw/source/core/inc/layfrm.hxx +++ b/sw/source/core/inc/layfrm.hxx @@ -92,7 +92,7 @@ public: virtual boolFillSelection( SwSelectionList rList, const SwRect rRect ) const; virtual sal_Bool GetCrsrOfst( SwPosition *, Point, - SwCrsrMoveState* = 0 ) const; + SwCrsrMoveState* = 0, bool bTestBackground = false ) const; virtual void Cut(); virtual void Paste( SwFrm* pParent, SwFrm* pSibling = 0 ); diff --git a/sw/source/core/inc/notxtfrm.hxx b/sw/source/core/inc/notxtfrm.hxx index 17494b0..f8c1033 100644 --- a/sw/source/core/inc/notxtfrm.hxx +++ b/sw/source/core/inc/notxtfrm.hxx @@ -61,7 +61,7 @@ public: virtual sal_Bool GetCharRect( SwRect , const SwPosition, SwCrsrMoveState* = 0) const; sal_Bool GetCrsrOfst(SwPosition* pPos, Point aPoint, - SwCrsrMoveState* = 0) const; + SwCrsrMoveState* = 0, bool bTestBackground = false) const; const Size GetGrfSize() const { return GetSize(); } void GetGrfArea( SwRect rRect, SwRect * = 0, sal_Bool bMirror = sal_True ) const;
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/filter/ww8/wrtww8.cxx |4 +++- sw/source/filter/ww8/ww8atr.cxx |9 - 2 files changed, 3 insertions(+), 10 deletions(-) New commits: commit 44dafcf9e29b2286016b9be2ac47c2609c817abc Author: Luke Deller l...@deller.id.au Date: Mon Nov 26 20:08:22 2012 +1100 fdo#56513 second header/footer lost saving as .doc This reverts changeset 723f772d for i#106749, then applies an alternative fix for that issue. Change-Id: Ib5a1788b67517c8d3cf80fd76801e30587535366 Reviewed-on: https://gerrit.libreoffice.org/1170 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index e0bacc4..453ee0c 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -2386,7 +2386,9 @@ void MSWordExportBase::WriteText() } else if ( pNd-IsTableNode() ) { -mpTableInfo-processSwTable( pNd-GetTableNode()-GetTable() ); +SwTable * pTable = pNd-GetTableNode()-GetTable(); +OutputSectionBreaks( pTable-GetTableFmt()-GetAttrSet(), *pNd ); +mpTableInfo-processSwTable( pTable ); } else if ( pNd-IsSectionNode() TXT_MAINTEXT == nTxtTyp ) OutputSectionNode( *pNd-GetSectionNode() ); diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index 26db61b..4354d68 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -436,15 +436,6 @@ void MSWordExportBase::OutputSectionBreaks( const SfxItemSet *pSet, const SwNode //section. bool bBreakSet = false; -const SwPageDesc * pPageDesc = rNd.FindPageDesc(sal_False); - -if (pAktPageDesc != pPageDesc) -{ -bBreakSet = true; -bNewPageDesc = true; -pAktPageDesc = pPageDesc; -} - if ( pSet pSet-Count() ) { if ( SFX_ITEM_SET == pSet-GetItemState( RES_PAGEDESC, false, pItem ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/ui/uiview/formatclipboard.cxx | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) New commits: commit 7689f91451ad07e2c324cbe142d3d002610d8c33 Author: Maxime de Roucy mdero...@linagora.com Date: Fri Nov 23 14:40:27 2012 +0100 fix bug 53508 In the format paintbrush function : Apply the paragraph automatic attributes to all the nodes in the selection instead of just the last node. Change-Id: I655f00cbf44d3d80c19a7ef623bc1c7cb505ead9 Reviewed-on: https://gerrit.libreoffice.org/1180 Reviewed-by: Norbert Thiebaud nthieb...@gmail.com Tested-by: Norbert Thiebaud nthieb...@gmail.com diff --git a/sw/source/ui/uiview/formatclipboard.cxx b/sw/source/ui/uiview/formatclipboard.cxx index 8b09cba..15e3cdf 100644 --- a/sw/source/ui/uiview/formatclipboard.cxx +++ b/sw/source/ui/uiview/formatclipboard.cxx @@ -551,7 +551,15 @@ void SwFormatClipboard::Paste( SwWrtShell rWrtShell, SfxStyleSheetBasePool* pPo // it can't be a multiple selection SwPaM* pCrsr = rWrtShell.GetCrsr(); -// apply the paragraph automatic attributes +// apply the paragraph automatic attributes to all the nodes in the selection +for (SwNodeIndex pNodeIndexIterator = pCrsr-Start()-nNode, + pNodeIndexEnd = pCrsr-End()-nNode; +pNodeIndexIterator != pNodeIndexEnd; +++pNodeIndexIterator ) +{ +pNodeIndexIterator.GetNode().GetCntntNode()-SetAttr( *pTemplateItemSet ); +} +// same as pCrsr-End()-nNode.GetNode().GetCntntNode()-SetAttr pCrsr-GetCntntNode()-SetAttr( *pTemplateItemSet ); // store the attributes in aItemVector in order not to apply them as ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/filter/ww8/docxattributeoutput.cxx | 43 +++ sw/source/filter/ww8/docxattributeoutput.hxx | 11 +- 2 files changed, 33 insertions(+), 21 deletions(-) New commits: commit fc3f771c1f5fed267298c851e94bef9557278b5b Author: Miklos Vajna vmik...@suse.cz Date: Fri Nov 9 10:42:47 2012 +0100 fdo#51550 fix DOCX export dataloss on non-math/chart OLE export This is still not complete, but having the replacement graphic only is far better than having nothing. (cherry picked from commit bd6ae389008e110be62a335dfcd82c655d512e63) Conflicts: sw/source/filter/ww8/docxattributeoutput.cxx Change-Id: I141a3de1a449f4261c7086e10f2c141b3f6cdb10 Reviewed-on: https://gerrit.libreoffice.org/1017 Reviewed-by: Norbert Thiebaud nthieb...@gmail.com Tested-by: Norbert Thiebaud nthieb...@gmail.com diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 78ee6cf..d075cd4 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -1013,7 +1013,7 @@ void DocxAttributeOutput::WritePostponedGraphic() for( std::list PostponedGraphic ::const_iterator it = m_postponedGraphic-begin(); it != m_postponedGraphic-end(); ++it ) -FlyFrameGraphic( *( it-grfNode ), it-size ); +FlyFrameGraphic( it-grfNode, it-size ); delete m_postponedGraphic; m_postponedGraphic = NULL; } @@ -1993,17 +1993,18 @@ void DocxAttributeOutput::DefaultStyle( sal_uInt16 nStyle ) #endif } -void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode rGrfNode, const Size rSize ) +void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode* pGrfNode, const Size rSize, const SwFlyFrmFmt* pOLEFrmFmt, SwOLENode* pOLENode ) { -OSL_TRACE( TODO DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode rGrfNode, const Size rSize ) - some stuff still missing ); +OSL_TRACE( TODO DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode* pGrfNode, const Size rSize, const SwFlyFrmFmt* pOLEFrmFmt, SwOLENode* pOLENode ) - some stuff still missing ); +const SwFrmFmt* pFrmFmt = pGrfNode ? pGrfNode-GetFlyFmt() : pOLEFrmFmt; // create the relation ID OString aRelId; sal_Int32 nImageType; -if ( rGrfNode.IsLinkedFile() ) +if ( pGrfNode pGrfNode-IsLinkedFile() ) { // linked image, just create the relation String aFileName; -rGrfNode.GetFileFilterNms( aFileName, 0 ); +pGrfNode-GetFileFilterNms( aFileName, 0 ); // TODO Convert the file name to relative for better interoperability @@ -2016,10 +2017,14 @@ void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode rGrfNode, const Size else { // inline, we also have to write the image itself -Graphic rGraphic = const_cast Graphic ( rGrfNode.GetGrf() ); +Graphic* pGraphic = 0; +if (pGrfNode) +pGraphic = const_cast Graphic ( pGrfNode-GetGrf() ); +else +pGraphic = pOLENode-GetGraphic(); m_rDrawingML.SetFS( m_pSerializer ); // to be sure that we write to the right stream -OUString aImageId = m_rDrawingML.WriteImage( rGraphic ); +OUString aImageId = m_rDrawingML.WriteImage( *pGraphic ); aRelId = OUStringToOString( aImageId, RTL_TEXTENCODING_UTF8 ); @@ -2031,11 +2036,11 @@ void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode rGrfNode, const Size m_pSerializer-startElementNS( XML_w, XML_drawing, FSEND ); -bool isAnchor = rGrfNode.GetFlyFmt()-GetAnchor().GetAnchorId() != FLY_AS_CHAR; +bool isAnchor = pFrmFmt-GetAnchor().GetAnchorId() != FLY_AS_CHAR; if( isAnchor ) { ::sax_fastparser::FastAttributeList* attrList = m_pSerializer-createAttrList(); -attrList-add( XML_behindDoc, rGrfNode.GetFlyFmt()-GetOpaque().GetValue() ? 0 : 1 ); +attrList-add( XML_behindDoc, pFrmFmt-GetOpaque().GetValue() ? 0 : 1 ); attrList-add( XML_distT, 0 ); attrList-add( XML_distB, 0 ); attrList-add( XML_distL, 0 ); @@ -2044,13 +2049,13 @@ void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode rGrfNode, const Size attrList-add( XML_locked, 0 ); attrList-add( XML_layoutInCell, 1 ); attrList-add( XML_allowOverlap, 1 ); // TODO -if( const SdrObject* pObj = rGrfNode.GetFlyFmt()-FindRealSdrObject()) +if( const SdrObject* pObj = pFrmFmt-FindRealSdrObject()) attrList-add( XML_relativeHeight, OString::valueOf( sal_Int32( pObj-GetOrdNum(; m_pSerializer-startElementNS( XML_wp, XML_anchor, XFastAttributeListRef( attrList )); m_pSerializer-singleElementNS( XML_wp, XML_simplePos, XML_x, 0, XML_y, 0, FSEND ); // required, unused const char* relativeFromH; const char* relativeFromV; -switch(
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/ui/app/swmodul1.cxx|8 sw/source/ui/inc/pview.hxx |5 - sw/source/ui/inc/view.hxx|6 ++ sw/source/ui/uiview/pview.cxx| 27 +++ sw/source/ui/uiview/view.cxx |4 ++-- sw/source/ui/uiview/viewmdi.cxx | 19 +-- sw/source/ui/uiview/viewport.cxx |9 + 7 files changed, 69 insertions(+), 9 deletions(-) New commits: commit 3d303cb331ab273538d63b226250a6950718ea1f Author: Ivan Timofeev timofeev@gmail.com Date: Thu Nov 8 12:47:21 2012 +0400 fdo#35427: repair Tools Options Writer View - Show Scroll Slider options Change-Id: I2bacd52a182a2dba3dbe6c6d63861470e87b6066 Reviewed-on: https://gerrit.libreoffice.org/1008 Reviewed-by: Miklos Vajna vmik...@suse.cz Tested-by: Miklos Vajna vmik...@suse.cz diff --git a/sw/source/ui/app/swmodul1.cxx b/sw/source/ui/app/swmodul1.cxx index 186ae80..24630bd 100644 --- a/sw/source/ui/app/swmodul1.cxx +++ b/sw/source/ui/app/swmodul1.cxx @@ -93,11 +93,11 @@ void lcl_SetUIPrefs(const SwViewOption rPref, SwView* pView, ViewShell* pSh ) // Scrollbars on / off if(bVScrollChanged) { -pView-ShowVScrollbar(pNewPref-IsViewVScrollBar()); +pView-EnableVScrollbar(pNewPref-IsViewVScrollBar()); } if(bHScrollChanged) { -pView-ShowHScrollbar( pNewPref-IsViewHScrollBar() || pNewPref-getBrowseMode() ); +pView-EnableHScrollbar( pNewPref-IsViewHScrollBar() || pNewPref-getBrowseMode() ); } //if only the position of the vertical ruler has been changed initiate an update if(bVAlignChanged !bHScrollChanged !bVScrollChanged) @@ -172,8 +172,8 @@ void SwModule::ApplyUsrPref(const SwViewOption rUsrPref, SwView* pActView, { if(!bViewOnly) pPref-SetUIOptions( rUsrPref ); -pPPView-ShowVScrollbar(pPref-IsViewVScrollBar()); -pPPView-ShowHScrollbar(pPref-IsViewHScrollBar()); +pPPView-EnableVScrollbar(pPref-IsViewVScrollBar()); +pPPView-EnableHScrollbar(pPref-IsViewHScrollBar()); if(!bViewOnly) { pPref-SetPagePrevRow(rUsrPref.GetPagePrevRow()); diff --git a/sw/source/ui/inc/pview.hxx b/sw/source/ui/inc/pview.hxx index 329ba5e..f9242b4 100644 --- a/sw/source/ui/inc/pview.hxx +++ b/sw/source/ui/inc/pview.hxx @@ -193,6 +193,8 @@ class SW_DLLPUBLIC SwPagePreView: public SfxViewShell // MDI control elements SwScrollbar *pHScrollbar; SwScrollbar *pVScrollbar; +boolmbHScrollbarEnabled; +boolmbVScrollbarEnabled; ImageButton *pPageUpBtn, *pPageDownBtn; // dummy window for filling the lower right edge when both scrollbars are active @@ -269,8 +271,9 @@ public: voidScrollViewSzChg(); voidScrollDocSzChg(); voidShowHScrollbar(sal_Bool bShow); - voidShowVScrollbar(sal_Bool bShow); +voidEnableHScrollbar(bool bEnable); +voidEnableVScrollbar(bool bEnable); sal_uInt16 GetPageCount() const{ return mnPageCount; } sal_uInt16 GetSelectedPage() const {return aViewWin.SelectedPage();} diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx index 229e8f5..2d9dbe8 100644 --- a/sw/source/ui/inc/view.hxx +++ b/sw/source/ui/inc/view.hxx @@ -221,6 +221,9 @@ class SW_DLLPUBLIC SwView: public SfxViewShell SwScrollbar *pHScrollbar, // MDI control elements *pVScrollbar; +boolmbHScrollbarEnabled; +boolmbVScrollbarEnabled; + Window *pScrollFill; // dummy window for filling the lower right edge // when both scrollbars are active @@ -517,6 +520,9 @@ public: voidShowVScrollbar(sal_Bool bShow); sal_BoolIsVScrollbarVisible()const; +voidEnableHScrollbar(bool bEnable); +voidEnableVScrollbar(bool bEnable); + int CreateVLineal(); int KillVLineal(); int CreateTab(); diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx index ecdc27d..ad00552 100644 --- a/sw/source/ui/uiview/pview.cxx +++ b/sw/source/ui/uiview/pview.cxx @@ -1142,6 +1142,9 @@ void SwPagePreView::Init(const SwViewOption * pPrefs) if( !pPrefs ) pPrefs = SW_MOD()-GetUsrPref(sal_False); +mbHScrollbarEnabled = pPrefs-IsViewHScrollBar(); +mbVScrollbarEnabled = pPrefs-IsViewVScrollBar(); + // die Felder aktualisieren // ACHTUNG: hochcasten auf die EditShell, um die SS zu nutzen. // In den Methoden wird auf die akt. Shell abgefragt! @@ -1661,6 +1664,9 @@ void SwPagePreView::ScrollViewSzChg() bShowVScrollbar = true; } +if (!mbVScrollbarEnabled)
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/ui/shells/drwtxtex.cxx |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) New commits: commit e68fe11ffa5b4cbcc194fae59350b64200256d01 Author: Arnaud Versini arnaud.vers...@gmail.com Date: Sun Nov 4 17:27:13 2012 +0100 Fix fdo#56603 by NULL pointer checking in SwDrawTextShell::Execute Pushed in master as c954e6e1317f82e06fac66556674bc066b429469 Change-Id: I98f246b2bafcf2669a8f6c3ec4c86ccee56519bf Reviewed-on: https://gerrit.libreoffice.org/984 Reviewed-by: Norbert Thiebaud nthieb...@gmail.com Tested-by: Norbert Thiebaud nthieb...@gmail.com Reviewed-on: https://gerrit.libreoffice.org/985 Tested-by: Miklos Vajna vmik...@suse.cz Reviewed-by: Miklos Vajna vmik...@suse.cz diff --git a/sw/source/ui/shells/drwtxtex.cxx b/sw/source/ui/shells/drwtxtex.cxx index be020a9..33bfacc 100644 --- a/sw/source/ui/shells/drwtxtex.cxx +++ b/sw/source/ui/shells/drwtxtex.cxx @@ -165,8 +165,11 @@ void SwDrawTextShell::Execute( SfxRequest rReq ) if (nSlot == SID_ATTR_CHAR_FONT) nScriptTypes = pOLV-GetSelectedScriptType(); -aSetItem.PutItemForScriptType( nScriptTypes, pNewAttrs-Get( nWhich ) ); -aNewAttr.Put( aSetItem.GetItemSet() ); +if (pNewAttrs) +{ +aSetItem.PutItemForScriptType( nScriptTypes, pNewAttrs-Get( nWhich ) ); +aNewAttr.Put( aSetItem.GetItemSet() ); +} } break; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/filter/ww8/wrtww8.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit efbb187ffcfaac962d6a5efe2a70c2b69d4590b5 Author: Caolán McNamara caol...@redhat.com Date: Fri Oct 26 16:51:20 2012 +0100 Resolves: fdo#35991 rowspan is of size sal_Int32, not size long Change-Id: I347672a2175cf7a0304cf5d6c0f8f3f6afa92cd4 (cherry picked from commit 8bd3bf0ff20fc18a0a6358e36b3f8a7e3b34a2bb) Reviewed-on: https://gerrit.libreoffice.org/919 Reviewed-by: Eike Rathke er...@redhat.com Tested-by: Eike Rathke er...@redhat.com diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 28e8c29..e0bacc4 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -1856,7 +1856,7 @@ void WW8AttributeOutput::TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t pTa } } -static sal_uInt16 lcl_TCFlags(const SwTableBox * pBox, long nRowSpan) +static sal_uInt16 lcl_TCFlags(const SwTableBox * pBox, sal_Int32 nRowSpan) { sal_uInt16 nFlags = 0; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/filter/ww8/rtfattributeoutput.cxx |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit eee2704a66075793d49a6972babe9444c3df7a87 Author: Miklos Vajna vmik...@suse.cz Date: Thu Oct 25 16:59:52 2012 +0200 fdo#55939 fix RTF export of footnotes Regression from d4069372484f18b242a42a1996767f57b031fff6. Conflicts: sw/qa/extras/rtfexport/rtfexport.cxx Change-Id: I58e8d48ac3222b795f7edfd0e74ecd86ea36f380 Reviewed-on: https://gerrit.libreoffice.org/913 Tested-by: Caolán McNamara caol...@redhat.com Reviewed-by: Caolán McNamara caol...@redhat.com diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 6224265..99160de 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -2335,17 +2335,20 @@ void RtfAttributeOutput::TextFootnote_Impl( const SwFmtFtn rFootnote ) /* * The footnote contains a whole paragraph, so we have to: - * 1) Reset, then later restore the contents of our run buffer. + * 1) Reset, then later restore the contents of our run buffer and run state. * 2) Buffer the output of the whole paragraph, as we do so for section headers already. */ const SwNodeIndex* pIndex = rFootnote.GetTxtFtn()-GetStartNode(); RtfStringBuffer aRun = m_aRun; m_aRun.clear(); +bool bInRunOrig = m_bInRun; +m_bInRun = false; m_bBufferSectionHeaders = true; m_rExport.WriteSpecialText( pIndex-GetIndex() + 1, pIndex-GetNode().EndOfSectionIndex(), !rFootnote.IsEndNote() ? TXT_FTN : TXT_EDN); m_bBufferSectionHeaders = false; +m_bInRun = bInRunOrig; m_aRun = aRun; m_aRun-append(m_aSectionHeaders.makeStringAndClear()); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/filter/ww8/docxattributeoutput.cxx |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) New commits: commit d401dcc51cec798c8c19febcc25c4325ddafa178 Author: Korrawit Pruegsanusak detective.conan.1...@gmail.com Date: Fri Oct 12 21:09:42 2012 +0700 Fix fdo#47669: also check if we started the tag before ending it The problem is we created imbalance end tag /w:hyperlink which shouldn't be there. So, place a check before inserting end tag should help. Inspired by (read: copied from) c1c2688912e769dfd7654e11e87dae380a8ce1eb ;) (cherry picked from commit 3b042335208cb2c995f4860bf8ba3bd1e2f2e859) Change-Id: Ic933f6da44c788cba48bb2fe6fa29658985310b6 Signed-off-by: Petr Mladek pmla...@suse.cz diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 7149e49..78ee6cf 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -550,7 +550,11 @@ void DocxAttributeOutput::EndRun() if ( m_closeHyperlinkInPreviousRun ) { -m_pSerializer-endElementNS( XML_w, XML_hyperlink ); +if ( m_startedHyperlink ) +{ +m_pSerializer-endElementNS( XML_w, XML_hyperlink ); +m_startedHyperlink = false; +} m_closeHyperlinkInPreviousRun = false; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source writerfilter/inc writerfilter/source
sw/source/filter/rtf/swparrtf.cxx |4 +++- writerfilter/inc/dmapper/DomainMapper.hxx |3 ++- writerfilter/source/dmapper/DomainMapper.cxx |5 +++-- writerfilter/source/dmapper/DomainMapper_Impl.cxx | 11 +-- writerfilter/source/dmapper/DomainMapper_Impl.hxx |7 ++- writerfilter/source/dmapper/PropertyMap.cxx |6 -- writerfilter/source/filter/RtfFilter.cxx |3 ++- 7 files changed, 29 insertions(+), 10 deletions(-) New commits: commit b401b8977df3d9755f6d8999172ce2ecdaef93f0 Author: Miklos Vajna vmik...@suse.cz Date: Mon Oct 15 16:42:15 2012 +0200 fdo#46669 sw: RTF paste should not change page styles (cherry picked from commit 4f1ba0486241bd239e46b71405662db8e10d9b96) Conflicts: writerfilter/inc/dmapper/DomainMapper.hxx writerfilter/source/dmapper/DomainMapper.cxx writerfilter/source/dmapper/DomainMapper_Impl.cxx writerfilter/source/dmapper/DomainMapper_Impl.hxx writerfilter/source/filter/RtfFilter.cxx Change-Id: Ic163a639fae9de838258b3cca9567a29ab875a35 Reviewed-on: https://gerrit.libreoffice.org/878 Reviewed-by: Michael Stahl mst...@redhat.com Tested-by: Michael Stahl mst...@redhat.com diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx index 95ca3dd..53b460d 100644 --- a/sw/source/filter/rtf/swparrtf.cxx +++ b/sw/source/filter/rtf/swparrtf.cxx @@ -151,10 +151,12 @@ sal_uLong SwRTFReader::Read( SwDoc rDoc, const String /*rBaseURL*/, SwPaM /*r xImporter-setTargetDocument(xDstDoc); uno::Referencedocument::XFilter xFilter(xInterface, uno::UNO_QUERY_THROW); -uno::Sequencebeans::PropertyValue aDescriptor(1); +uno::Sequencebeans::PropertyValue aDescriptor(2); aDescriptor[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(InputStream)); uno::Referenceio::XStream xStream(new utl::OStreamWrapper(*pStrm)); aDescriptor[0].Value = xStream; +aDescriptor[1].Name = IsNewDoc; +aDescriptor[1].Value = sal_False; xFilter-filter(aDescriptor); return 0; diff --git a/writerfilter/inc/dmapper/DomainMapper.hxx b/writerfilter/inc/dmapper/DomainMapper.hxx index 95ddc6f..eaf5e74 100644 --- a/writerfilter/inc/dmapper/DomainMapper.hxx +++ b/writerfilter/inc/dmapper/DomainMapper.hxx @@ -89,7 +89,8 @@ public: DomainMapper(const ::com::sun::star::uno::Reference ::com::sun::star::uno::XComponentContext xContext, ::com::sun::star::uno::Reference ::com::sun::star::io::XInputStream xInputStream, ::com::sun::star::uno::Reference ::com::sun::star::lang::XComponent xModel, -SourceDocumentType eDocumentType ); +SourceDocumentType eDocumentType, +bool bIsNewDoc = true); virtual ~DomainMapper(); // Stream diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index 3eed3cd..37fbfd4 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -97,11 +97,12 @@ struct _PageSz DomainMapper::DomainMapper( const uno::Reference uno::XComponentContext xContext, uno::Reference io::XInputStream xInputStream, uno::Reference lang::XComponent xModel, -SourceDocumentType eDocumentType) : +SourceDocumentType eDocumentType, +bool bIsNewDoc ) : LoggedProperties(dmapper_logger, DomainMapper), LoggedTable(dmapper_logger, DomainMapper), LoggedStream(dmapper_logger, DomainMapper), -m_pImpl( new DomainMapper_Impl( *this, xContext, xModel, eDocumentType )), +m_pImpl( new DomainMapper_Impl( *this, xContext, xModel, eDocumentType, bIsNewDoc )), mnBackgroundColor(0), mbIsHighlightSet(false) { // #i24363# tab stops relative to indent diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index ee6e291..951d500 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -184,7 +184,8 @@ DomainMapper_Impl::DomainMapper_Impl( DomainMapper rDMapper, uno::Reference uno::XComponentContext xContext, uno::Reference lang::XComponent xModel, -SourceDocumentType eDocumentType) : +SourceDocumentType eDocumentType, +bool bIsNewDoc) : m_eDocumentType( eDocumentType ), m_rDMapper( rDMapper ), m_xTextDocument( xModel, uno::UNO_QUERY ), @@ -209,7 +210,8 @@ DomainMapper_Impl::DomainMapper_Impl( m_bIsFirstParaInSection( true ), m_bIsLastParaInSection( false ), m_bParaSectpr( false ), -m_bUsingEnhancedFields( false ) +
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/core/view/pagepreviewlayout.cxx | 29 +++-- 1 file changed, 23 insertions(+), 6 deletions(-) New commits: commit 7a0949b101e4ea70984e714065c94854fa071fd6 Author: Issa Alkurtass ialkurt...@kacst.edu.sa Date: Tue Sep 4 13:22:26 2012 +0300 fdo#43210 Corrected page preview direction for RTL interface Change-Id: I412510bc17a29873310689e3141c75d32b261e37 Reviewed-on: https://gerrit.libreoffice.org/557 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com (cherry picked from commit f49db879b7e6362a12450c87352f6ba72823c45e) Signed-off-by: Lior Kaplan kaplanl...@gmail.com diff --git a/sw/source/core/view/pagepreviewlayout.cxx b/sw/source/core/view/pagepreviewlayout.cxx index fff8fce..a60fbe4 100644 --- a/sw/source/core/view/pagepreviewlayout.cxx +++ b/sw/source/core/view/pagepreviewlayout.cxx @@ -26,6 +26,8 @@ * / +#include vcl/svapp.hxx + #include pagepreviewlayout.hxx #include prevwpage.hxx @@ -586,10 +588,19 @@ void SwPagePreviewLayout::_CalcPreviewPages() // calculate initial paint offset Point aInitialPaintOffset; -if ( maPaintStartPageOffset != Point( -1, -1 ) ) -aInitialPaintOffset = Point(0,0) - maPaintStartPageOffset; -else -aInitialPaintOffset = Point( mnXFree, mnYFree ); +/// check whether RTL interface or not +if(!Application::GetSettings().GetLayoutRTL()){ +if ( maPaintStartPageOffset != Point( -1, -1 ) ) +aInitialPaintOffset = Point(0,0) - maPaintStartPageOffset; +else +aInitialPaintOffset = Point( mnXFree, mnYFree ); +} +else { +if ( maPaintStartPageOffset != Point( -1, -1 ) ) +aInitialPaintOffset = Point(0 + ((SwPagePreviewLayout::mnCols-1)*mnColWidth),0) - maPaintStartPageOffset; +else +aInitialPaintOffset = Point( mnXFree + ((SwPagePreviewLayout::mnCols-1)*mnColWidth), mnYFree ); +} aInitialPaintOffset += maAdditionalPaintOffset; // prepare loop data @@ -635,7 +646,10 @@ void SwPagePreviewLayout::_CalcPreviewPages() { // first page in 2nd column // -- continue with increased paint offset and next column -aCurrPaintOffset.X() += mnColWidth; +/// check whether RTL interface or not +if(!Application::GetSettings().GetLayoutRTL()) +aCurrPaintOffset.X() += mnColWidth; +else aCurrPaintOffset.X() -= mnColWidth; ++nCurrCol; continue; } @@ -658,7 +672,10 @@ void SwPagePreviewLayout::_CalcPreviewPages() // prepare data for next loop pPage = static_castconst SwPageFrm*(pPage-GetNext()); -aCurrPaintOffset.X() += mnColWidth; +/// check whether RTL interface or not +if(!Application::GetSettings().GetLayoutRTL()) +aCurrPaintOffset.X() += mnColWidth; +else aCurrPaintOffset.X() -= mnColWidth; ++nCurrCol; if ( nCurrCol mnCols ) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/core/crsr/crstrvl.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 358c53f9751ba8c27097aea25707af70ddb729d5 Author: Cédric Bosdonnat cedric.bosdon...@free.fr Date: Wed Oct 10 15:27:57 2012 +0200 fdo#54094: Add a space in sw outline tooltips Change-Id: I1f2046cc52261b717165a2f6838a826acefb7b09 (cherry picked from commit 0c0e5c82c7d9fb790d0894c28af5cff99d71a910) diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index 80a2ba5..d1a4fae 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -1031,7 +1031,7 @@ sal_Bool SwCrsrShell::GetContentAtPos( const Point rPt, if( pONd ) { rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_OUTLINE; -rCntntAtPos.sStr = pONd-GetExpandTxt( 0, STRING_LEN, true ); +rCntntAtPos.sStr = pONd-GetExpandTxt( 0, STRING_LEN, true, true ); bRet = sal_True; } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/filter/ww8/docxattributeoutput.cxx | 16 ++-- sw/source/filter/ww8/docxattributeoutput.hxx |2 +- 2 files changed, 11 insertions(+), 7 deletions(-) New commits: commit a010c4eaea6d6c45621a11d035f76266b0a5147c Author: Caolán McNamara caol...@redhat.com Date: Thu Oct 11 12:20:07 2012 +0100 Resolves: fdo#48569 crash on export to .docx of inline anchored frame we're currently deferring to the end of the text node to export the contents of frames. If its anchored as character then the sw::Frame (which is allocated on stack) has gone out of scope so this pointer points to junk. Copy it instead. Sill need to export frames property at some stage. Change-Id: Ib9f8c6857ce1afe6acba84986b692139e44a7aad (cherry picked from commit 60a93729c95d31edab50a905236faa9e38a81556) Signed-off-by: Eike Rathke er...@redhat.com diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 179c2f6..7149e49 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -311,7 +311,10 @@ void DocxAttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pT // Write the anchored frame if any if ( m_pParentFrame ) { -const SwFrmFmt rFrmFmt = m_pParentFrame-GetFrmFmt( ); +sw::Frame *pParentFrame = m_pParentFrame; +m_pParentFrame = NULL; + +const SwFrmFmt rFrmFmt = pParentFrame-GetFrmFmt( ); const SwNodeIndex* pNodeIndex = rFrmFmt.GetCntnt().GetCntntIdx(); sal_uLong nStt = pNodeIndex ? pNodeIndex-GetIndex()+1 : 0; @@ -319,12 +322,13 @@ void DocxAttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pT m_rExport.SaveData( nStt, nEnd ); -m_rExport.mpParentFrame = m_pParentFrame; -m_pParentFrame = NULL; +m_rExport.mpParentFrame = pParentFrame; m_rExport.WriteText( ); m_rExport.RestoreData(); + +delete pParentFrame; } } @@ -2396,8 +2400,8 @@ void DocxAttributeOutput::OutputFlyFrame_Impl( const sw::Frame rFrame, const Po break; case sw::Frame::eTxtBox: { -// The frame output is postponed at the end of the anchor paragraph -m_pParentFrame = rFrame; +// The frame output is postponed to the end of the anchor paragraph +m_pParentFrame = new sw::Frame(rFrame); } break; case sw::Frame::eOle: @@ -4455,7 +4459,7 @@ DocxAttributeOutput::~DocxAttributeOutput() delete m_pEndnotesList, m_pEndnotesList = NULL; delete m_pTableWrt, m_pTableWrt = NULL; -m_pParentFrame = NULL; +delete m_pParentFrame; } DocxExport DocxAttributeOutput::GetExport() diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx index 4caf047..0d176e1 100644 --- a/sw/source/filter/ww8/docxattributeoutput.hxx +++ b/sw/source/filter/ww8/docxattributeoutput.hxx @@ -587,7 +587,7 @@ private: // beginning of the next paragraph DocxColBreakStatus m_nColBreakStatus; -const sw::Frame *m_pParentFrame; +sw::Frame *m_pParentFrame; // close of hyperlink needed bool m_closeHyperlinkInThisRun; bool m_closeHyperlinkInPreviousRun; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/filter/ww8/wrtw8esh.cxx |4 1 file changed, 4 insertions(+) New commits: commit ffb06e5eaadabf2d80277a3f8808957fca8b3b0e Author: Michael Stahl mst...@redhat.com Date: Tue Oct 9 13:32:15 2012 +0200 fdo#54648: WW8 export: test that FlyFrm actually has layout frm The bugdoc has 2 hidden drawing objects that are invisible. Change-Id: I58179f2e620348db5357b38f834e1edca1f20ae2 (cherry picked from commit c1d2eed375293d7c27bb885f344cc24ec0cd40ca) Reviewed-on: https://gerrit.libreoffice.org/845 Reviewed-by: Muthu Subramanian K muthus...@gmail.com Reviewed-by: Miklos Vajna vmik...@suse.cz Tested-by: Miklos Vajna vmik...@suse.cz diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index cfaf64b..88055d2 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -1665,6 +1665,10 @@ bool lcl_isInHeader(const SwFrmFmt rFmt) if (!pFlyFrmFmt) return false; SwFlyFrm* pFlyFrm = const_castSwFlyFrm*(pFlyFrmFmt-GetFrm()); +if (!pFlyFrm) // fdo#54648: hidden drawing object has no layout frame +{ +return false; +} SwPageFrm* pPageFrm = pFlyFrm-FindPageFrmOfAnchor(); SwFrm* pHeader = pPageFrm-Lower(); if (pHeader-GetType() == FRM_HEADER) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/core/docnode/ndtbl.cxx | 51 ++- 1 file changed, 24 insertions(+), 27 deletions(-) New commits: commit 314f92b0da54085499ea06e7ee53bef4b27181db Author: Michael Stahl mst...@redhat.com Date: Thu Oct 4 19:17:56 2012 +0200 rhbz#820283, fdo#55462: sw: better fix for DOCX table import crash: The fix in 6d2e09db4a677068095b0bebd08fbbb96620d60c is completely bogus. Only vertically merged boxes result in dummy boxes with negative span, while horizontally merged boxes result in different numbers of boxes per line. So instead of inserting boxes, adjust the width of the last box in rows that are missing boxes, such that all lines have the same width. (cherry picked from commit 4113d9664c60d004474dfc1cffbcd7dc50fa6dc4) Conflicts: sw/source/core/docnode/ndtbl.cxx Change-Id: I4e90e852b314bf6f7885bde7b450dab7c668469e Reviewed-on: https://gerrit.libreoffice.org/764 Reviewed-by: Fridrich Strba fridr...@documentfoundation.org Tested-by: Fridrich Strba fridr...@documentfoundation.org diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index ea1f4e4..0b97807 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -1261,6 +1261,29 @@ SwNodeRange * SwNodes::ExpandRangeForTableBox(const SwNodeRange rRange) return pResult; } +static void +lcl_SetTableBoxWidths2(SwTable rTable, size_t const nMaxBoxes, +SwTableBoxFmt rBoxFmt, SwDoc rDoc) +{ +// rhbz#820283, fdo#55462: set default box widths so table width is covered +SwTableLines rLines = rTable.GetTabLines(); +for (size_t nTmpLine = 0; nTmpLine rLines.Count(); ++nTmpLine) +{ +SwTableBoxes rBoxes = rLines[nTmpLine]-GetTabBoxes(); +size_t const nMissing = nMaxBoxes - rBoxes.size(); +if (nMissing) +{ +// default width for box at the end of an incomplete line +SwTableBoxFmt *const pNewFmt = rDoc.MakeTableBoxFmt(); +pNewFmt-SetFmtAttr( SwFmtFrmSize(ATT_VAR_SIZE, +(USHRT_MAX / nMaxBoxes) * (nMissing + 1)) ); +pNewFmt-Add(rBoxes.back()); +} +} +// default width for all boxes not at the end of an incomplete line +rBoxFmt.SetFmtAttr(SwFmtFrmSize(ATT_VAR_SIZE, USHRT_MAX / nMaxBoxes)); +} + SwTableNode* SwNodes::TextToTable( const SwNodes::TableRanges_t rTableNodes, SwTableFmt* pTblFmt, SwTableLineFmt* pLineFmt, @@ -1372,33 +1395,7 @@ SwTableNode* SwNodes::TextToTable( const SwNodes::TableRanges_t rTableNodes, nMaxBoxes = nBoxes; } -// die Tabelle ausgleichen, leere Sections einfuegen -sal_uInt16 n; - -if( !aPosArr.empty() ) -{ -SwTableLines rLns = pTable-GetTabLines(); -sal_uInt16 nLastPos = 0; -for( n = 0; n aPosArr.size(); ++n ) -{ -SwTableBoxFmt *pNewFmt = pDoc-MakeTableBoxFmt(); -pNewFmt-SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE, -aPosArr[ n ] - nLastPos )); -for( sal_uInt16 nLines2 = 0; nLines2 rLns.Count(); ++nLines2 ) -//JP 24.06.98: hier muss ein Add erfolgen, da das BoxFormat -// von der rufenden Methode noch gebraucht wird! -pNewFmt-Add( rLns[ nLines2 ]-GetTabBoxes()[ n ] ); - -nLastPos = aPosArr[ n ]; -} - -// damit die Tabelle die richtige Groesse bekommt, im BoxFormat die -// Groesse nach oben transportieren. -OSL_ENSURE( !pBoxFmt-GetDepends(), wer ist in dem Format noch angemeldet ); -pBoxFmt-SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE, nLastPos )); -} -else -pBoxFmt-SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE, USHRT_MAX / nMaxBoxes )); +lcl_SetTableBoxWidths2(*pTable, nMaxBoxes, *pBoxFmt, *pDoc); // das wars doch wohl ?? return pTblNd; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/ui/app/applab.cxx | 77 +--- 1 file changed, 23 insertions(+), 54 deletions(-) New commits: commit 4bbcf581ad7a478387491058b38e6dd8a344af44 Author: Winfried Donkers o...@dci-electronics.nl Date: Fri Sep 28 12:15:11 2012 +0200 fdo#53673 fix for layout problems with version 3.6 and up Change-Id: I626ec5bce931005dccbc8f4d235e8208ae98f9a5 diff --git a/sw/source/ui/app/applab.cxx b/sw/source/ui/app/applab.cxx index 4159f18..fe2dd11 100644 --- a/sw/source/ui/app/applab.cxx +++ b/sw/source/ui/app/applab.cxx @@ -91,21 +91,19 @@ const char MASTER_LABEL[] = MasterLabel; const SwFrmFmt *lcl_InsertBCText( SwWrtShell rSh, const SwLabItem rItem, SwFrmFmt rFmt, -sal_uInt16 nCol, sal_uInt16 nRow, sal_Bool bPage) +sal_uInt16 nCol, sal_uInt16 nRow ) { SfxItemSet aSet(rSh.GetAttrPool(), RES_ANCHOR, RES_ANCHOR, RES_VERT_ORIENT, RES_VERT_ORIENT, RES_HORI_ORIENT, RES_HORI_ORIENT, 0 ); sal_uInt16 nPhyPageNum, nVirtPageNum; rSh.GetPageNum( nPhyPageNum, nVirtPageNum ); -aSet.Put(SwFmtAnchor(bPage ? FLY_AS_CHAR : FLY_AT_PAGE, nPhyPageNum)); -if (!bPage) -{ -aSet.Put(SwFmtHoriOrient(rItem.lLeft + nCol * rItem.lHDist, - text::HoriOrientation::NONE, text::RelOrientation::PAGE_FRAME )); -aSet.Put(SwFmtVertOrient(rItem.lUpper + nRow * rItem.lVDist, - text::VertOrientation::NONE, text::RelOrientation::PAGE_FRAME )); -} +//anchor frame to page +aSet.Put( SwFmtAnchor( FLY_AT_PAGE, nPhyPageNum ) ); +aSet.Put( SwFmtHoriOrient( rItem.lLeft + nCol * rItem.lHDist, + text::HoriOrientation::NONE, text::RelOrientation::PAGE_FRAME ) ); +aSet.Put( SwFmtVertOrient( rItem.lUpper + nRow * rItem.lVDist, + text::VertOrientation::NONE, text::RelOrientation::PAGE_FRAME ) ); const SwFrmFmt *pFmt = rSh.NewFlyFrm(aSet, sal_True, rFmt ); // Insert Fly OSL_ENSURE( pFmt, Fly not inserted ); @@ -130,21 +128,19 @@ const SwFrmFmt *lcl_InsertBCText( SwWrtShell rSh, const SwLabItem rItem, const SwFrmFmt *lcl_InsertLabText( SwWrtShell rSh, const SwLabItem rItem, SwFrmFmt rFmt, SwFldMgr rFldMgr, -sal_uInt16 nCol, sal_uInt16 nRow, sal_Bool bLast, sal_Bool bPage) +sal_uInt16 nCol, sal_uInt16 nRow, sal_Bool bLast ) { SfxItemSet aSet(rSh.GetAttrPool(), RES_ANCHOR, RES_ANCHOR, RES_VERT_ORIENT, RES_VERT_ORIENT, RES_HORI_ORIENT, RES_HORI_ORIENT, 0 ); sal_uInt16 nPhyPageNum, nVirtPageNum; rSh.GetPageNum( nPhyPageNum, nVirtPageNum ); -aSet.Put(SwFmtAnchor(bPage ? FLY_AS_CHAR : FLY_AT_PAGE, nPhyPageNum)); -if (!bPage) -{ -aSet.Put(SwFmtHoriOrient(rItem.lLeft + nCol * rItem.lHDist, - text::HoriOrientation::NONE, text::RelOrientation::PAGE_FRAME )); -aSet.Put(SwFmtVertOrient(rItem.lUpper + nRow * rItem.lVDist, - text::VertOrientation::NONE, text::RelOrientation::PAGE_FRAME )); -} +//anchor frame to page +aSet.Put( SwFmtAnchor( FLY_AT_PAGE, nPhyPageNum ) ); +aSet.Put( SwFmtHoriOrient( rItem.lLeft + nCol * rItem.lHDist, + text::HoriOrientation::NONE, text::RelOrientation::PAGE_FRAME ) ); +aSet.Put( SwFmtVertOrient( rItem.lUpper + nRow * rItem.lVDist, + text::VertOrientation::NONE, text::RelOrientation::PAGE_FRAME ) ); const SwFrmFmt *pFmt = rSh.NewFlyFrm(aSet, sal_True, rFmt ); // Insert Fly OSL_ENSURE( pFmt, Fly not inserted ); @@ -300,26 +296,11 @@ void SwModule::InsertLab(SfxRequest rReq, sal_Bool bLabel) SwFmtFrmSize aFrmSize( ATT_FIX_SIZE, iWidth, iHeight ); pFmt-SetFmtAttr( aFrmSize ); -SwFrmFmt* pFmtEORow = new SwFrmFmt (*pFmt); -SwFrmFmt* pFmtEOCol = new SwFrmFmt (*pFmt); -SwFrmFmt* pFmtEOColEORow = new SwFrmFmt (*pFmt); - -SvxULSpaceItem aFrmULSpace( 0, (sal_uInt16)(rItem.lVDist - rItem.lHeight), -RES_UL_SPACE ); +//frame represents label itself, no border space SvxULSpaceItem aFrmNoULSpace( 0, 0, RES_UL_SPACE ); - -SvxLRSpaceItem aFrmLRSpace( 0, (sal_uInt16)(rItem.lHDist - rItem.lWidth), -0, 0, RES_LR_SPACE ); SvxLRSpaceItem aFrmNoLRSpace( 0, 0, 0, 0, RES_LR_SPACE ); - -pFmt-SetFmtAttr(aFrmULSpace); -pFmt-SetFmtAttr(aFrmLRSpace); -pFmtEORow-SetFmtAttr(aFrmULSpace); -pFmtEORow-SetFmtAttr(aFrmNoLRSpace); -pFmtEOCol-SetFmtAttr(aFrmNoULSpace); -
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/filter/ww8/ww8par2.cxx |1 - 1 file changed, 1 deletion(-) New commits: commit 55fe92fb396ebcfffe30831ebb460bfb3e6274aa Author: Caolán McNamara caol...@redhat.com Date: Mon Oct 1 23:57:06 2012 +0100 Resolves: fdo#54862 extra ++n causing merged cells to be skipped commit 567c1db25bd705faac44203e4a3d01d0f5e1385c reverted a pile of other commits, including 858b5b4f36a357fe7192e7c2ed9cc3cdfc81fd8f but didn't revert the ++n of that commit, leading to merge groups getting skipped Change-Id: Ie2b46ebc433df636ebe0092f4a992631b7f06a3f (cherry picked from commit b966a09c2da9441961c93c44be556399575db849) Signed-off-by: Michael Stahl mst...@redhat.com diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index 1b5bd75..679f116 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -2751,7 +2751,6 @@ void WW8TabDesc::FinishSwTable() nRowSpan : ((-1) * (nRowSpan - n)); pCurrentBox-setRowSpan( nRowSpanSet ); -++n; } } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/ui/dbui/dbmgr.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit 5b536e72f2a4e35275eb33317ec6b6e14845b75c Author: Lionel Elie Mamane lio...@mamane.lu Date: Sun Sep 30 08:35:03 2012 +0200 fdo#31405 CommandType is a LONG, so use a sal_Int32 to retrieve it Else, operator= flat out refuses to extract it, even though the particular value in this particular call would fit. Also OSL_VERIFY the result of = (instead of ignoring it) to facilitate future detection of similar problem Change-Id: I859c38c3589dc9e9ef5bdd882663aa3386a43237 (cherry picked from commit 3f84462b47f070b4921fdd5fdab8397ab1439fd6) Signed-off-by: Michael Stahl mst...@redhat.com diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index eada5cc..5fde0e5 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -2395,13 +2395,13 @@ void SwNewDBMgr::ExecuteFormLetter( SwWrtShell rSh, rtl::OUString sDataSource, sDataTableOrQuery; SequenceAny aSelection; -sal_Int16 nCmdType = CommandType::TABLE; +sal_Int32 nCmdType = CommandType::TABLE; uno::Reference XConnection xConnection; ODataAccessDescriptor aDescriptor(rProperties); sDataSource = aDescriptor.getDataSource(); -aDescriptor[daCommand] = sDataTableOrQuery; -aDescriptor[daCommandType] = nCmdType; +OSL_VERIFY(aDescriptor[daCommand] = sDataTableOrQuery); +OSL_VERIFY(aDescriptor[daCommandType] = nCmdType); if ( aDescriptor.has(daSelection) ) aDescriptor[daSelection] = aSelection; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/core/crsr/crsrsh.cxx | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) New commits: commit 6bcbf68b29b609cf06dbea0e192533e11eb523c3 Author: Michael Stahl mst...@redhat.com Date: Wed Sep 19 20:47:48 2012 +0200 rhbz#689053: fix crash following delete at last table cell: The IsSelOvr() in SwCrsrShell::Combine() detects that the PaM with mark in the last table cell and point ouside the table is invalid, but unfortunatley restores the wrong position, which does not actually correct the PaM; the deletion on the invalid PaM then removes the last SwTxtNode in the document, which leads to crash later. (cherry picked from commit af4b6c94c68b5f67b931cde8d0acda6ec8b288bb) Conflicts: sw/source/core/crsr/crsrsh.cxx Change-Id: Ib2ae0b54e6c15dbe5b6811d8696531bf2022e1a4 Reviewed-on: https://gerrit.libreoffice.org/652 Reviewed-by: Miklos Vajna vmik...@suse.cz Tested-by: Miklos Vajna vmik...@suse.cz diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index ca62c55..1493d14 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -2012,26 +2012,27 @@ void SwCrsrShell::Combine() return; SwCallLink aLk( *this );// Crsr-Moves ueberwachen, evt. Link callen -SwCrsrSaveState aSaveState( *pCurCrsr ); +// rhbz#689053: IsSelOvr must restore the saved stack position, not the +// current one, because current point + stack mark may be invalid PaM +SwCrsrSaveState aSaveState(*pCrsrStk); if( pCrsrStk-HasMark() ) // nur wenn GetMark gesetzt wurde { bool const bResult = CheckNodesRange( pCrsrStk-GetMark()-nNode, pCurCrsr-GetPoint()-nNode, sal_True ); OSL_ENSURE(bResult, StackCrsr act. Crsr not in same Section.); (void) bResult; // non-debug: unused -// kopiere das GetMark -if( !pCurCrsr-HasMark() ) -pCurCrsr-SetMark(); -*pCurCrsr-GetMark() = *pCrsrStk-GetMark(); -pCurCrsr-GetMkPos() = pCrsrStk-GetMkPos(); } +*pCrsrStk-GetPoint() = *pCurCrsr-GetPoint(); +pCrsrStk-GetPtPos() = pCurCrsr-GetPtPos(); SwShellCrsr * pTmp = 0; if( pCrsrStk-GetNext() != pCrsrStk ) { pTmp = dynamic_castSwShellCrsr*(pCrsrStk-GetNext()); } -delete pCrsrStk; +delete pCurCrsr; +pCurCrsr = pCrsrStk; +pCrsrStk-MoveTo(0); // remove from ring pCrsrStk = pTmp; if( !pCurCrsr-IsInProtectTable( sal_True ) !pCurCrsr-IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE | ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/core/doc/dbgoutsw.cxx |5 + 1 file changed, 1 insertion(+), 4 deletions(-) New commits: commit 538760dc0c9baaf0e15abefe4aae32448ba61592 Author: Stephan Bergmann sberg...@redhat.com Date: Tue Jul 24 13:55:49 2012 +0200 warning C4702: unreachable code Change-Id: Ia3e119e1b9ac68fbdd9aa4a9a5177e28c1a0d605 (cherry picked from commit b265709fbf9ff9f03645cbcbbc441699402c73a8) diff --git a/sw/source/core/doc/dbgoutsw.cxx b/sw/source/core/doc/dbgoutsw.cxx old mode 100644 new mode 100755 index b14e07d..ad42cff --- a/sw/source/core/doc/dbgoutsw.cxx +++ b/sw/source/core/doc/dbgoutsw.cxx @@ -973,12 +973,9 @@ String lcl_TokenType2Str(FormTokenType nType) case TOKEN_END: return String(END, RTL_TEXTENCODING_ASCII_US); default: +OSL_FAIL(should not be reached); return String(??, RTL_TEXTENCODING_ASCII_US); } - -OSL_FAIL(should not be reached); - -return String(??, RTL_TEXTENCODING_ASCII_US); } String lcl_dbg_out(const SwFormToken rToken) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/filter/xml/xmltble.cxx | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) New commits: commit bcc65a92293fa8ad78c891c79ac433ff96767d82 Author: Michael Stahl mst...@redhat.com Date: Wed Sep 12 23:19:57 2012 +0200 fdo#45700: sw ODF export: workaround corrupted table model: do not export invalid table:number-columns-spanned=0 (cherry picked from commit c45c64e3de51d9f56c9d9789729b6f7952547a61) Conflicts: sw/source/filter/xml/xmltble.cxx Change-Id: I7e286a9fcb6ed3df7222c83fe73e870e69561649 Reviewed-on: https://gerrit.libreoffice.org/611 Reviewed-by: Miklos Vajna vmik...@suse.cz Tested-by: Miklos Vajna vmik...@suse.cz diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx index ba8d4a9..1991770 100644 --- a/sw/source/filter/xml/xmltble.cxx +++ b/sw/source/filter/xml/xmltble.cxx @@ -980,14 +980,9 @@ void SwXMLExport::ExportTableLine( const SwTableLine rLine, if ( nCol nOldCol ) { OSL_FAIL( table and/or table information seems to be corrupted. ); -if ( nBox == nBoxes - 1 ) -{ -nCol = rLines.GetColumns().Count() - 1; -} -else -{ -nCol = nOldCol; -} +// NOTE: nOldCol is not necessarily a valid index into +// GetColumns(), but that doesn't matter here +nCol = nOldCol; } sal_uInt16 nColSpan = nCol - nOldCol + 1U; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/core/unocore/unosect.cxx |8 1 file changed, 8 insertions(+) New commits: commit 525127d5b605bf34a8ff0b71f4b169fa7b72c435 Author: Michael Stahl mst...@redhat.com Date: Wed Sep 12 21:01:41 2012 +0200 fdo#42450: fix crash in SwXTextSection::attach: Inserting the section can fail if the given text range is not valid. Change-Id: Ib6ba3b02dd581dce08b646b841354073caf894b2 (cherry picked from commit 5bc6c7b2e170a35914d7cd07347c77a9c9d23664 and commit 2940a697dce2292e9c5b118feb8ec4159e3606fa) Reviewed-on: https://gerrit.libreoffice.org/602 Reviewed-by: Norbert Thiebaud nthieb...@gmail.com Reviewed-by: Miklos Vajna vmik...@suse.cz Tested-by: Miklos Vajna vmik...@suse.cz diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx index 338c376..9e3ba6b 100644 --- a/sw/source/core/unocore/unosect.cxx +++ b/sw/source/core/unocore/unosect.cxx @@ -400,6 +400,14 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) SwSection *const pRet = pDoc-InsertSwSection( aPam, aSect, 0, aSet.Count() ? aSet : 0 ); +if (!pRet) // fdo#42450 text range could parially overlap existing section +{ +// shouldn't have created an undo object yet +pDoc-GetIDocumentUndoRedo().EndUndo( UNDO_INSSECTION, NULL ); +throw lang::IllegalArgumentException( +SwXTextSection::attach(): invalid TextRange, +static_cast ::cppu::OWeakObject*(this), 0); +} pRet-GetFmt()-Add(m_pImpl.get()); pRet-GetFmt()-SetXObject(static_cast ::cppu::OWeakObject*(this)); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/core/doc/gctable.cxx | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) New commits: commit 032b29619484a2a4ade0600cd978df86d5d522a5 Author: David Tardon dtar...@redhat.com Date: Fri Sep 7 10:00:44 2012 +0200 fdo#54620 do not use vector iterator after insert Change-Id: I5e809f38a500ab818e9acef80b419dfece7a29fa (cherry picked from commit 06ae26b5676c29c4d1cc9c65f5bbaede9483a21d) Signed-off-by: Caolán McNamara caol...@redhat.com diff --git a/sw/source/core/doc/gctable.cxx b/sw/source/core/doc/gctable.cxx index 5507c54..f71cb2a 100644 --- a/sw/source/core/doc/gctable.cxx +++ b/sw/source/core/doc/gctable.cxx @@ -357,19 +357,20 @@ static bool lcl_MergeGCBox(SwTableBox* pTblBox, void*const pPara) if( 1 == pTblBox-GetTabLines().Count() ) { -// Box with a Line, then move all the Line's Boxes after this Box -// into the parent Line and delete this Box +// we have a box with a single line, so we just replace it by the line's boxes SwTableLine* pInsLine = pTblBox-GetUpper(); SwTableLine* pCpyLine = pTblBox-GetTabLines()[0]; SwTableBoxes::iterator it = std::find( pInsLine-GetTabBoxes().begin(), pInsLine-GetTabBoxes().end(), pTblBox ); for( n = 0; n pCpyLine-GetTabBoxes().size(); ++n ) pCpyLine-GetTabBoxes()[n]-SetUpper( pInsLine ); -pInsLine-GetTabBoxes().insert( it + 1, pCpyLine-GetTabBoxes().begin(), pCpyLine-GetTabBoxes().end()); +// remove the old box from its parent line +it = pInsLine-GetTabBoxes().erase( it ); +// insert the nested line's boxes in its place +pInsLine-GetTabBoxes().insert( it, pCpyLine-GetTabBoxes().begin(), pCpyLine-GetTabBoxes().end()); pCpyLine-GetTabBoxes().clear(); -// Delete the old Box with the Line -delete *it; -pInsLine-GetTabBoxes().erase( it ); +// destroy the removed box +delete pTblBox; return false; // set up anew } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/ui/docvw/PageBreakWin.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit e8ddde302cdea785e6588be6175e15c7fa2bc809 Author: Ivan Timofeev timofeev@gmail.com Date: Fri Aug 24 14:30:56 2012 +0400 SwPageBreakWin: memory leak Change-Id: Ibb543b8da8c89c7fa3799fada03c787dabe2b3cb (cherry picked from commit a251863970e0512a1dc2bd857913a3adf7148bb3) Reviewed-on: https://gerrit.libreoffice.org/472 Reviewed-by: Norbert Thiebaud nthieb...@gmail.com Tested-by: Norbert Thiebaud nthieb...@gmail.com diff --git a/sw/source/ui/docvw/PageBreakWin.cxx b/sw/source/ui/docvw/PageBreakWin.cxx index 02a3dcb..b8a3553 100644 --- a/sw/source/ui/docvw/PageBreakWin.cxx +++ b/sw/source/ui/docvw/PageBreakWin.cxx @@ -215,6 +215,7 @@ void SwPageBreakWin::Paint( const Rectangle ) *this, aNewViewInfos ); pProcessor-process( aGhostedSeq ); +delete pProcessor; } void SwPageBreakWin::Select( ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/ui/uiview/viewsrch.cxx | 46 +++ 1 file changed, 23 insertions(+), 23 deletions(-) New commits: commit 546f1a008482ca5227897faaf4e588a7d8f5dd58 Author: Michael Stahl mst...@redhat.com Date: Sat Aug 25 00:39:21 2012 +0200 fdo#49901: SwView::ExecSearch: fix Replace All cursor: Because the fix for i#8288 only set the point of the cursor and not the mark, it can happen that after a Replace All weird things are selected; fix that (and i#8288 properly) by using the SwCrsrShell stack, and don't do it when searching in the selection. This cannot be done in SwCrsrShell itself because ExecSearch sets the cursor to the beginning/end of the document already. (regression from cda75d6f358d438f7ed36ed7fa296ac23e3c4a04) Change-Id: Ie9f8d7da2fa26000a0237c24f8742e47ffa29213 (cherry picked from commit b3233579ccb2528912835deedde37c1d48417d6c) Reviewed-on: https://gerrit.libreoffice.org/481 Reviewed-by: Miklos Vajna vmik...@suse.cz Tested-by: Miklos Vajna vmik...@suse.cz diff --git a/sw/source/ui/uiview/viewsrch.cxx b/sw/source/ui/uiview/viewsrch.cxx index d0f6079..1e583ce 100644 --- a/sw/source/ui/uiview/viewsrch.cxx +++ b/sw/source/ui/uiview/viewsrch.cxx @@ -286,36 +286,36 @@ void SwView::ExecSearch(SfxRequest rReq, sal_Bool bNoMessage) case SVX_SEARCHCMD_REPLACE_ALL: { SwSearchOptions aOpts( pWrtShell, pSrchItem-GetBackward() ); - -// Fix for i#8288: Replace all should leave the cursor at the place it was -// before executing the command, rather than at the site of the final replacement. -// To do this take note of the current cursor position before replace all begins: -// note: must be stored so that it is corrected by PamCorr* -::boost::scoped_ptrSwUnoCrsr const pTmpCursor( -pWrtShell-GetDoc()-CreateUnoCrsr( -*pWrtShell-GetSwCrsr()-GetPoint())); - -if( !pSrchItem-GetSelection() ) -{ -// bestehende Selektionen aufheben, -// wenn nicht in selektierten Bereichen gesucht werden soll -pWrtShell-KillSelection(0, false); -if( DOCPOS_START == aOpts.eEnd ) -pWrtShell-EndDoc(); -else -pWrtShell-SttDoc(); -} - bExtra = sal_False; sal_uLong nFound; { //Scope for SwWait-Object SwWait aWait( *GetDocShell(), sal_True ); pWrtShell-StartAllAction(); +if (!pSrchItem-GetSelection()) +{ +// if we don't want to search in the selection... +pWrtShell-KillSelection(0, false); +// i#8288 replace all should not change cursor +// position, so save current cursor +pWrtShell-Push(); +if (DOCPOS_START == aOpts.eEnd) +{ +pWrtShell-EndDoc(); +} +else +{ +pWrtShell-SttDoc(); +} +} nFound = FUNC_Search( aOpts ); -// #i8288# Now that everything has been replaced, restore the original cursor position. -*(pWrtShell-GetSwCrsr()-GetPoint()) = -*pTmpCursor-GetPoint(); +if (!pSrchItem-GetSelection()) +{ +// create it just to overwrite it with stack cursor +pWrtShell-CreateCrsr(); +// i#8288 restore the original cursor position +pWrtShell-Pop(false); +} pWrtShell-EndAllAction(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source writerfilter/Library_writerfilter.mk writerfilter/source
sw/source/filter/ww8/docxattributeoutput.cxx | 11 +++ writerfilter/Library_writerfilter.mk |1 + writerfilter/source/ooxml/OOXMLFastContextHandler.cxx |9 +++-- 3 files changed, 15 insertions(+), 6 deletions(-) New commits: commit 44bdf23e3fa29f1b37faa6460bdf61e4b4627fe8 Author: LuboÅ¡ LuÅák l.lu...@suse.cz Date: Thu Aug 23 14:06:45 2012 +0200 fix math export/import in docx/rtf For some reason older gcc versions don't manage to dynamic_cast to the necessary cast. I'm not quite sure why, forcing sal/osl/unx/module.cxx to always use RTLD_GLOBAL does not seem to help. Most probably compiler bug. Changing the cast to two simpler ones helps. Signed-off-by: Miklos Vajna vmik...@suse.cz diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 34e383c..7ad5a1e 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -96,6 +96,7 @@ #include editeng/opaqitem.hxx #include svx/svdmodel.hxx #include svx/svdobj.hxx +#include sfx2/sfxbasemodel.hxx #include anchoredobject.hxx #include docufld.hxx @@ -2333,10 +2334,12 @@ void DocxAttributeOutput::WritePostponedMath() return; uno::Reference embed::XEmbeddedObject xObj(const_castSwOLENode*(m_postponedMath)-GetOLEObj().GetOleRef()); uno::Reference uno::XInterface xInterface( xObj-getComponent(), uno::UNO_QUERY ); -if( oox::FormulaExportBase* formulaexport = dynamic_cast oox::FormulaExportBase* ( xInterface.get())) -formulaexport-writeFormulaOoxml( m_pSerializer, GetExport().GetFilter().getVersion()); -else -OSL_FAIL( Math OLE object cannot write out OOXML ); +// gcc4.4 (and 4.3 and possibly older) have a problem with dynamic_cast directly to the target class, +// so help it with an intermediate cast. I'm not sure what exactly the problem is, seems to be unrelated +// to RTLD_GLOBAL, so most probably a gcc bug. +oox::FormulaExportBase* formulaexport = dynamic_castoox::FormulaExportBase*(dynamic_castSfxBaseModel*(xInterface.get())); +assert( formulaexport != NULL ); +formulaexport-writeFormulaOoxml( m_pSerializer, GetExport().GetFilter().getVersion()); m_postponedMath = NULL; } diff --git a/writerfilter/Library_writerfilter.mk b/writerfilter/Library_writerfilter.mk index 5a34f94..f157ae1 100644 --- a/writerfilter/Library_writerfilter.mk +++ b/writerfilter/Library_writerfilter.mk @@ -66,6 +66,7 @@ $(eval $(call gb_Library_use_libraries,writerfilter,\ msfilter \ oox \ sal \ +sfx \ sot \ svt \ tl \ diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx index 6efa44c..f062a26 100644 --- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx +++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx @@ -42,6 +42,7 @@ #include comphelper/embeddedobjectcontainer.hxx #include tools/globname.hxx #include comphelper/classids.hxx +#include sfx2/sfxbasemodel.hxx #include OOXMLFastContextHandler.hxx #include OOXMLFactory.hxx #include Handler.hxx @@ -2452,8 +2453,12 @@ void OOXMLFastContextHandlerMath::process() rtl::OUString aName; uno::Reference embed::XEmbeddedObject ref = container.CreateEmbeddedObject( name.GetByteSequence(), aName ); uno::Reference uno::XInterface component( ref-getComponent(), uno::UNO_QUERY ); -if( oox::FormulaImportBase* import = dynamic_cast oox::FormulaImportBase* ( component.get())) -import-readFormulaOoxml( buffer ); +// gcc4.4 (and 4.3 and possibly older) have a problem with dynamic_cast directly to the target class, +// so help it with an intermediate cast. I'm not sure what exactly the problem is, seems to be unrelated +// to RTLD_GLOBAL, so most probably a gcc bug. +oox::FormulaImportBase* import = dynamic_cast oox::FormulaImportBase* ( dynamic_cast SfxBaseModel* (component.get())); +assert( import != NULL ); +import-readFormulaOoxml( buffer ); if (isForwardEvents()) { OOXMLPropertySet * pProps = new OOXMLPropertySetImpl(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/core/doc/docnew.cxx |1 - 1 file changed, 1 deletion(-) New commits: commit 311c1b76a1d0aee201b6d060dc533a3d1d587d55 Author: Cédric Bosdonnat cedric.bosdon...@free.fr Date: Fri Aug 24 10:00:27 2012 +0200 Revert initialize member: the commit to fix isn't in 3.6 This reverts commit 7f18b80a3bd2b3c126ac852c7ecd5ceb376f389d. Change-Id: Ie577edba915ad78eaa82a66280a51ddd6ba9398e diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index ab66dc7..3ed8f0a 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -340,7 +340,6 @@ SwDoc::SwDoc() mbUseFormerTextWrapping = aOptions.IsUseOurTextWrapping(); mbConsiderWrapOnObjPos = aOptions.IsConsiderWrappingStyle(); mbMathBaselineAlignment = false;// default for *old* documents is 'off' -mbStylesNoDefault = false; mbAddFlyOffsets = false;// hidden mbOldNumbering = false;// hidden mbUseHiResolutionVirtualDevice = true; // hidden ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/ui/index/cnttab.cxx | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) New commits: commit 3f88a4b00c6140c4294583cbaf75954486f5f5b6 Author: Michael Stahl mst...@redhat.com Date: Wed Aug 22 21:45:27 2012 +0200 SwTokenWindow::InsertAtSelection: fix STL assertion: error: attempt to copy-construct an iterator from a singular iterator. (regression from 39b8a5f87f55abe53488c9c3c35b65fb0df84cde) Change-Id: Iab29f4c356ea1cb5ca0f687bcfc5e54f185fbba3 (cherry picked from commit c47505a4525c342694ba4196544715467c2bdb8e) Reviewed-on: https://gerrit.libreoffice.org/458 Reviewed-by: Miklos Vajna vmik...@suse.cz Tested-by: Miklos Vajna vmik...@suse.cz diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index ffacb5d..5b8fef5 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -3147,13 +3147,11 @@ voidSwTokenWindow::InsertAtSelection( ctrl_iterator iterActive = std::find(aControlList.begin(), aControlList.end(), pActiveCtrl); -ctrl_iterator iterInsert = iterActive; - Size aControlSize(GetOutputSizePixel()); if( WINDOW_EDIT == pActiveCtrl-GetType()) { -++iterInsert; +++iterActive; Selection aSel = ((SwTOXEdit*)pActiveCtrl)-GetSelection(); aSel.Justify(); @@ -3169,7 +3167,7 @@ voidSwTokenWindow::InsertAtSelection( SwFormToken aTmpToken(TOKEN_TEXT); SwTOXEdit* pEdit = new SwTOXEdit(aCtrlParentWin, this, aTmpToken); -iterInsert = aControlList.insert(iterInsert, pEdit); +iterActive = aControlList.insert(iterActive, pEdit); pEdit-SetText(sRight); pEdit-SetSizePixel(aControlSize); @@ -3181,7 +3179,7 @@ voidSwTokenWindow::InsertAtSelection( } else { -aControlList.erase(iterActive); +iterActive = aControlList.erase(iterActive); pActiveCtrl-Hide(); delete pActiveCtrl; } @@ -3189,7 +3187,7 @@ voidSwTokenWindow::InsertAtSelection( //now the new button SwTOXButton* pButton = new SwTOXButton(aCtrlParentWin, this, aToInsertToken); -aControlList.insert(iterInsert, pButton); +aControlList.insert(iterActive, pButton); pButton-SetPrevNextLink(LINK(this, SwTokenWindow, NextItemBtnHdl)); pButton-SetGetFocusHdl(LINK(this, SwTokenWindow, TbxFocusBtnHdl)); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/core/unocore/unocoll.cxx | 74 ++--- 1 file changed, 60 insertions(+), 14 deletions(-) New commits: commit 5ae1369a87ddc0293f6a78ef368179b6f8e43495 Author: Michael Stahl mst...@redhat.com Date: Wed Aug 22 23:04:34 2012 +0200 fdo#51514: SwXBookmarks: only consider real bookmarks: Since CWS swrefactormarks2 the SwXBookmarks collection handles not only bookmarks but at least cross-ref marks as well, which then bother users when they show up in the Insert-Hyperlink dialog; remove non-bookmarks again. (regression from df6d312ca537402463e4eb0530f22b956600fc02) Change-Id: I6a64ba8a43468dd3ce1569e944371d3ef71f8824 (cherry picked from commit 45be3ac8151d63ccb61879f876696704542a4ce7) Reviewed-on: https://gerrit.libreoffice.org/459 Reviewed-by: Miklos Vajna vmik...@suse.cz Tested-by: Miklos Vajna vmik...@suse.cz diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx index 859cbd0..7de0788 100644 --- a/sw/source/core/unocore/unocoll.cxx +++ b/sw/source/core/unocore/unocoll.cxx @@ -86,6 +86,7 @@ #include vbahelper/vbaaccesshelper.hxx #include basic/basmgr.hxx #include comphelper/processfactory.hxx +#include comphelper/sequenceasvector.hxx using ::rtl::OUString; using namespace ::com::sun::star; @@ -1644,7 +1645,20 @@ sal_Int32 SwXBookmarks::getCount(void) SolarMutexGuard aGuard; if(!IsValid()) throw uno::RuntimeException(); -return GetDoc()-getIDocumentMarkAccess()-getBookmarksCount(); + +sal_Int32 count(0); +IDocumentMarkAccess* const pMarkAccess = GetDoc()-getIDocumentMarkAccess(); +for (IDocumentMarkAccess::const_iterator_t ppMark = +pMarkAccess-getBookmarksBegin(); + ppMark != pMarkAccess-getBookmarksEnd(); ++ppMark) +{ +if (IDocumentMarkAccess::BOOKMARK == +IDocumentMarkAccess::GetType(**ppMark)) +{ +++count; // only count real bookmarks +} +} +return count; } uno::Any SwXBookmarks::getByIndex(sal_Int32 nIndex) @@ -1657,12 +1671,26 @@ uno::Any SwXBookmarks::getByIndex(sal_Int32 nIndex) if(nIndex 0 || nIndex = pMarkAccess-getBookmarksCount()) throw IndexOutOfBoundsException(); -uno::Any aRet; -::sw::mark::IMark* pBkmk = pMarkAccess-getBookmarksBegin()[nIndex].get(); -const uno::Reference text::XTextContent xRef = -SwXBookmark::CreateXBookmark(*GetDoc(), *pBkmk); -aRet = xRef; -return aRet; +sal_Int32 count(0); +for (IDocumentMarkAccess::const_iterator_t ppMark = +pMarkAccess-getBookmarksBegin(); + ppMark != pMarkAccess-getBookmarksEnd(); ++ppMark) +{ +if (IDocumentMarkAccess::BOOKMARK == +IDocumentMarkAccess::GetType(**ppMark)) +{ +if (count == nIndex) +{ +uno::Any aRet; +const uno::Reference text::XTextContent xRef = +SwXBookmark::CreateXBookmark(*GetDoc(), **ppMark); +aRet = xRef; +return aRet; +} +++count; // only count real bookmarks +} +} +throw IndexOutOfBoundsException(); } uno::Any SwXBookmarks::getByName(const rtl::OUString rName) @@ -1691,13 +1719,19 @@ uno::Sequence OUString SwXBookmarks::getElementNames(void) if(!IsValid()) throw uno::RuntimeException(); +::comphelper::SequenceAsVector ::rtl::OUString ret; IDocumentMarkAccess* const pMarkAccess = GetDoc()-getIDocumentMarkAccess(); -uno::SequenceOUString aSeq(pMarkAccess-getBookmarksCount()); -sal_Int32 nCnt = 0; -for(IDocumentMarkAccess::const_iterator_t ppMark = pMarkAccess-getBookmarksBegin(); -ppMark != pMarkAccess-getBookmarksEnd();) -aSeq[nCnt++] = (*ppMark++)-GetName(); -return aSeq; +for (IDocumentMarkAccess::const_iterator_t ppMark = +pMarkAccess-getBookmarksBegin(); + ppMark != pMarkAccess-getBookmarksEnd(); ++ppMark) +{ +if (IDocumentMarkAccess::BOOKMARK == +IDocumentMarkAccess::GetType(**ppMark)) +{ +ret.push_back((*ppMark)-GetName()); // only add real bookmarks +} +} +return ret.getAsConstList(); } sal_Bool SwXBookmarks::hasByName(const OUString rName) @@ -1723,7 +1757,19 @@ sal_Bool SwXBookmarks::hasElements(void) SolarMutexGuard aGuard; if(!IsValid()) throw uno::RuntimeException(); -return GetDoc()-getIDocumentMarkAccess()-getBookmarksCount() != 0; + +IDocumentMarkAccess* const pMarkAccess = GetDoc()-getIDocumentMarkAccess(); +for (IDocumentMarkAccess::const_iterator_t ppMark = +pMarkAccess-getBookmarksBegin(); + ppMark != pMarkAccess-getBookmarksEnd(); ++ppMark) +{ +if (IDocumentMarkAccess::BOOKMARK == +IDocumentMarkAccess::GetType(**ppMark)) +{ +return true; +}
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/ui/docvw/HeaderFooterWin.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 8aad87be76ba86a9ce5bd5e6b358c48eb35fbd42 Author: Ivan Timofeev timofeev@gmail.com Date: Thu Aug 23 20:15:51 2012 +0400 SwHeaderFooterWin: memory leak Change-Id: Ie8322b93745c48970766c2033a23cca2c710a516 (cherry picked from commit 442d0766eb9575a45572e29f2018bed2831c177f) Reviewed-on: https://gerrit.libreoffice.org/466 Reviewed-by: Bosdonnat Cedric cedric.bosdon...@free.fr Tested-by: Bosdonnat Cedric cedric.bosdon...@free.fr diff --git a/sw/source/ui/docvw/HeaderFooterWin.cxx b/sw/source/ui/docvw/HeaderFooterWin.cxx index 9475c4f..f35f603 100644 --- a/sw/source/ui/docvw/HeaderFooterWin.cxx +++ b/sw/source/ui/docvw/HeaderFooterWin.cxx @@ -390,6 +390,7 @@ void SwHeaderFooterWin::Paint( const Rectangle ) aSeq, BColorModifier( Color( COL_WHITE ).getBColor(), 1.0 - nFadeRate, BCOLORMODIFYMODE_INTERPOLATE ) ) ); pProcessor-process( aGhostedSeq ); +delete pProcessor; } bool SwHeaderFooterWin::IsEmptyHeaderFooter( ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/core/doc/docnew.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 7f18b80a3bd2b3c126ac852c7ecd5ceb376f389d Author: LuboÅ¡ LuÅák l.lu...@suse.cz Date: Thu Aug 23 18:09:59 2012 +0200 initialize member Introduced by b95d203bc17c83ec0fe5139f519d53ed1d842d3a . Change-Id: I2497ee7cd55776fbd801d07470968e5aa47e971a Signed-off-by: Cédric Bosdonnat cedric.bosdon...@free.fr diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index 3ed8f0a..ab66dc7 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -340,6 +340,7 @@ SwDoc::SwDoc() mbUseFormerTextWrapping = aOptions.IsUseOurTextWrapping(); mbConsiderWrapOnObjPos = aOptions.IsConsiderWrappingStyle(); mbMathBaselineAlignment = false;// default for *old* documents is 'off' +mbStylesNoDefault = false; mbAddFlyOffsets = false;// hidden mbOldNumbering = false;// hidden mbUseHiResolutionVirtualDevice = true; // hidden ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/filter/ww8/docxattributeoutput.cxx | 17 - sw/source/filter/ww8/docxattributeoutput.hxx |1 + 2 files changed, 13 insertions(+), 5 deletions(-) New commits: commit f672ba611a8cef83acad3233d27dc6414b463a42 Author: Cédric Bosdonnat cedric.bosdon...@free.fr Date: Tue Aug 21 07:02:46 2012 +0200 fdo#53175: Fixed the end of hyperlinks This fixes the end of hyperlinks appearing after field ends (while the start of hyperlink is after field start too). Change-Id: If21b8973baaca183e0103e3a70ed98b99aa59392 (cherry picked from commit c1c2688912e769dfd7654e11e87dae380a8ce1eb) Signed-off-by: Miklos Vajna vmik...@suse.cz diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 71d39af..34e383c 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -573,6 +573,7 @@ void DocxAttributeOutput::EndRun() m_pSerializer-startElementNS( XML_w, XML_hyperlink, xAttrList ); m_pHyperlinkAttrList = NULL; +m_startedHyperlink = true; } DoWriteBookmarks( ); @@ -588,16 +589,21 @@ void DocxAttributeOutput::EndRun() WritePostponedMath(); +if ( m_closeHyperlinkInThisRun ) +{ +if ( m_startedHyperlink ) +{ +m_pSerializer-endElementNS( XML_w, XML_hyperlink ); +m_startedHyperlink = false; +} +m_closeHyperlinkInThisRun = false; +} + while ( m_Fields.begin() != m_Fields.end() ) { EndField_Impl( m_Fields.front( ) ); m_Fields.erase( m_Fields.begin( ) ); } -if ( m_closeHyperlinkInThisRun ) -{ -m_pSerializer-endElementNS( XML_w, XML_hyperlink ); -m_closeHyperlinkInThisRun = false; -} // if there is some redlining in the document, output it EndRedline(); @@ -4375,6 +4381,7 @@ DocxAttributeOutput::DocxAttributeOutput( DocxExport rExport, FSHelperPtr pSeri m_pParentFrame( NULL ), m_closeHyperlinkInThisRun( false ), m_closeHyperlinkInPreviousRun( false ), + m_startedHyperlink( false ), m_postponedGraphic( NULL ), m_postponedMath( NULL ), m_postitFieldsMaxId( 0 ), diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx index 788905f..db78516 100644 --- a/sw/source/filter/ww8/docxattributeoutput.hxx +++ b/sw/source/filter/ww8/docxattributeoutput.hxx @@ -590,6 +590,7 @@ private: // close of hyperlink needed bool m_closeHyperlinkInThisRun; bool m_closeHyperlinkInPreviousRun; +bool m_startedHyperlink; struct PostponedGraphic { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/core/doc/docfld.cxx | 30 -- 1 file changed, 28 insertions(+), 2 deletions(-) New commits: commit b5edfe152737650772504dc6464dbbb2f607f453 Author: Miklos Vajna vmik...@suse.cz Date: Fri Aug 10 21:09:40 2012 +0200 fdo#53210 SwDoc::UpdateExpFlds don't crash when hiding all sections (cherry picked from commit bb6bd1ff9cd3eecec7eb2cd7bd0a4dcef584c903) Change-Id: I9b7a61f18f987214708195a89f6e346c865c7f9f Signed-off-by: Petr Mladek pmla...@suse.cz diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx index 4d0aa72..a2a58fc 100644 --- a/sw/source/core/doc/docfld.cxx +++ b/sw/source/core/doc/docfld.cxx @@ -1296,18 +1296,44 @@ void SwDoc::UpdateExpFlds( SwTxtFld* pUpdtFld, bool bUpdRefFlds ) SwNewDBMgr* pMgr = GetNewDBMgr(); pMgr-CloseAll(sal_False); -String aNew; +// Make sure we don't hide all sections, which would lead to a crash. First, count how many of them do we have. +int nShownSections = 0; const _SetGetExpFldPtr* ppSortLst = pUpdtFlds-GetSortLst()-GetData(); for( n = pUpdtFlds-GetSortLst()-Count(); n; --n, ++ppSortLst ) { SwSection* pSect = (SwSection*)(*ppSortLst)-GetSection(); +if ( pSect !pSect-IsCondHidden()) +nShownSections++; +} + +String aNew; +ppSortLst = pUpdtFlds-GetSortLst()-GetData(); +for( n = pUpdtFlds-GetSortLst()-Count(); n; --n, ++ppSortLst ) +{ +SwSection* pSect = (SwSection*)(*ppSortLst)-GetSection(); if( pSect ) { SwSbxValue aValue = aCalc.Calculate( pSect-GetCondition() ); if(!aValue.IsVoidValue()) -pSect-SetCondHidden( aValue.GetBool() ); +{ +// Do we want to hide this one? +bool bHide = aValue.GetBool(); +if (bHide !pSect-IsCondHidden()) +{ +// This section will be hidden, but it wasn't before +if (nShownSections == 1) +{ +// This would be the last section, so set its condition to false, and avoid hiding it. +rtl::OUString aCond(RTL_CONSTASCII_USTRINGPARAM(0)); +pSect-SetCondition(aCond); +bHide = false; +} +nShownSections--; +} +pSect-SetCondHidden( bHide ); +} continue; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/core/layout/paintfrm.cxx | 21 - 1 file changed, 16 insertions(+), 5 deletions(-) New commits: commit 93e819418070deb2750a918a1c3ea52376558d21 Author: Miklos Vajna vmik...@suse.cz Date: Mon Aug 13 16:03:17 2012 +0200 fdo#53439 SwPageFrm::PaintBorderAndShadow fix painting at small zoom Change-Id: I235895caaf95225148e61d96f4c3b14bf9f5542e (cherry picked from commit c5b9c197d70a0fb7d75bcedf2d70e6320175e846) Signed-off-by: Ivan Timofeev timofeev@gmail.com diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index ad81f20..74936a1 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -5677,13 +5677,24 @@ sal_Bool SwPageFrm::IsLeftShadowNeeded() const } } +enum PaintArea {LEFT, RIGHT, TOP, BOTTOM}; + /// Wrapper around pOut-DrawBitmapEx. -void lcl_paintBitmapExToRect(OutputDevice *pOut, Point aPoint, BitmapEx rBitmapEx) +void lcl_paintBitmapExToRect(OutputDevice *pOut, Point aPoint, BitmapEx rBitmapEx, PaintArea eArea) { // The problem is that if we get called multiple times and the color is // partly transparent, then the result will get darker and darker. To avoid // this, always paint the background color before doing the real paint. Rectangle aRect(aPoint, rBitmapEx.GetSizePixel()); + +switch (eArea) +{ +case LEFT: aRect.Left() = aRect.Right() - 1; break; +case RIGHT: aRect.Right() = aRect.Left() + 1; break; +case TOP: aRect.Top() = aRect.Bottom() - 1; break; +case BOTTOM: aRect.Bottom() = aRect.Top() + 1; break; +} + pOut-SetFillColor( SwViewOption::GetAppBackgroundColor()); pOut-SetLineColor(); pOut-DrawRect(pOut-PixelToLogic(aRect)); @@ -5795,7 +5806,7 @@ void lcl_paintBitmapExToRect(OutputDevice *pOut, Point aPoint, BitmapEx rBitmap aPageTopRightShadow ); BitmapEx aPageRightShadow = aPageRightShadowBase; aPageRightShadow.Scale( 1, aPagePxRect.Height() - 2 * (mnShadowPxWidth - 1) ); -lcl_paintBitmapExToRect(pOut, Point( aPaintRect.Right() + mnShadowPxWidth, aPagePxRect.Top() + mnShadowPxWidth - 1), aPageRightShadow ); +lcl_paintBitmapExToRect(pOut, Point( aPaintRect.Right() + mnShadowPxWidth, aPagePxRect.Top() + mnShadowPxWidth - 1), aPageRightShadow, RIGHT ); } // Left shadows and corners @@ -5807,15 +5818,15 @@ void lcl_paintBitmapExToRect(OutputDevice *pOut, Point aPoint, BitmapEx rBitmap pOut-DrawBitmapEx( pOut-PixelToLogic( Point( lLeft, aPagePxRect.Top() - mnShadowPxWidth ) ), aPageTopLeftShadow ); BitmapEx aPageLeftShadow = aPageLeftShadowBase; aPageLeftShadow.Scale( 1, aPagePxRect.Height() - 2 * (mnShadowPxWidth - 1) ); -lcl_paintBitmapExToRect(pOut, Point( lLeft, aPagePxRect.Top() + mnShadowPxWidth - 1), aPageLeftShadow); +lcl_paintBitmapExToRect(pOut, Point( lLeft, aPagePxRect.Top() + mnShadowPxWidth - 1), aPageLeftShadow, LEFT); } BitmapEx aPageBottomShadow = aPageBottomShadowBase; aPageBottomShadow.Scale( aPaintRect.Width(), 1 ); -lcl_paintBitmapExToRect(pOut, Point( aPaintRect.Left(), aPagePxRect.Bottom() + 1 ), aPageBottomShadow); +lcl_paintBitmapExToRect(pOut, Point( aPaintRect.Left(), aPagePxRect.Bottom() + 1 ), aPageBottomShadow, BOTTOM); BitmapEx aPageTopShadow = aPageTopShadowBase; aPageTopShadow.Scale( aPaintRect.Width(), 1 ); -lcl_paintBitmapExToRect(pOut, Point( aPaintRect.Left(), aPagePxRect.Top() - mnShadowPxWidth ), aPageTopShadow ); +lcl_paintBitmapExToRect(pOut, Point( aPaintRect.Left(), aPagePxRect.Top() - mnShadowPxWidth ), aPageTopShadow, TOP); } //mod #i6193# paint sidebar for notes ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/ui/docvw/PageBreakWin.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit cbb047527d856258b7b925dc37f56f0e9b0b3e90 Author: Ivan Timofeev timofeev@gmail.com Date: Fri Aug 10 16:14:17 2012 +0400 Page Break: don't show if mouse is gone and button is still invisible (fdo#46518) it seems when the mouse leaves the dashed line, it immediately appears inside a button (if the mouse motion is not super-fast). Change-Id: I43c792fdba59feafd761bde8529a8683c07bf3d3 Signed-off-by: Petr Mladek pmla...@suse.cz diff --git a/sw/source/ui/docvw/PageBreakWin.cxx b/sw/source/ui/docvw/PageBreakWin.cxx index c96f280..02a3dcb 100644 --- a/sw/source/ui/docvw/PageBreakWin.cxx +++ b/sw/source/ui/docvw/PageBreakWin.cxx @@ -87,7 +87,7 @@ namespace { // don't fade if we just move to the 'button' Point aEventPos( GetPosPixel() + rMEvt.GetPosPixel() ); -if ( !m_pWin-Contains( aEventPos ) ) +if ( !m_pWin-Contains( aEventPos ) || !m_pWin-IsVisible() ) m_pWin-Fade( false ); } else if ( !m_pWin-IsVisible() ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/core/layout/paintfrm.cxx | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) New commits: commit e8b150131925d69786df4cf818484fa2b523131b Author: Miklos Vajna vmik...@suse.cz Date: Wed Aug 8 10:13:53 2012 +0200 n#773515 SwPageFrm::PaintBorderAndShadow fix shadow color on partial redraw How to reproduce: if you have a paragraph of text, and hit Enter in the middle of the paragraph, the frame around the document below the cursor position gets darker. Regression from f23d055dbee887ef9ebdf0a72b83ee1de91b7b8b. Change-Id: I41f9972b9be8d3ea02b52c0bc7355b012b41395d Signed-off-by: Jan Holesovsky ke...@suse.cz diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 4d874a1..ad81f20 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -5677,6 +5677,20 @@ sal_Bool SwPageFrm::IsLeftShadowNeeded() const } } +/// Wrapper around pOut-DrawBitmapEx. +void lcl_paintBitmapExToRect(OutputDevice *pOut, Point aPoint, BitmapEx rBitmapEx) +{ +// The problem is that if we get called multiple times and the color is +// partly transparent, then the result will get darker and darker. To avoid +// this, always paint the background color before doing the real paint. +Rectangle aRect(aPoint, rBitmapEx.GetSizePixel()); +pOut-SetFillColor( SwViewOption::GetAppBackgroundColor()); +pOut-SetLineColor(); +pOut-DrawRect(pOut-PixelToLogic(aRect)); + +pOut-DrawBitmapEx(pOut-PixelToLogic(aPoint), rBitmapEx); +} + /** paint page border and shadow OD 12.02.2003 for #i9719# and #105645# @@ -5781,7 +5795,7 @@ sal_Bool SwPageFrm::IsLeftShadowNeeded() const aPageTopRightShadow ); BitmapEx aPageRightShadow = aPageRightShadowBase; aPageRightShadow.Scale( 1, aPagePxRect.Height() - 2 * (mnShadowPxWidth - 1) ); -pOut-DrawBitmapEx( pOut-PixelToLogic( Point( aPaintRect.Right() + mnShadowPxWidth, aPagePxRect.Top() + mnShadowPxWidth - 1) ), aPageRightShadow ); +lcl_paintBitmapExToRect(pOut, Point( aPaintRect.Right() + mnShadowPxWidth, aPagePxRect.Top() + mnShadowPxWidth - 1), aPageRightShadow ); } // Left shadows and corners @@ -5793,15 +5807,15 @@ sal_Bool SwPageFrm::IsLeftShadowNeeded() const pOut-DrawBitmapEx( pOut-PixelToLogic( Point( lLeft, aPagePxRect.Top() - mnShadowPxWidth ) ), aPageTopLeftShadow ); BitmapEx aPageLeftShadow = aPageLeftShadowBase; aPageLeftShadow.Scale( 1, aPagePxRect.Height() - 2 * (mnShadowPxWidth - 1) ); -pOut-DrawBitmapEx( pOut-PixelToLogic( Point( lLeft, aPagePxRect.Top() + mnShadowPxWidth - 1) ), aPageLeftShadow ); +lcl_paintBitmapExToRect(pOut, Point( lLeft, aPagePxRect.Top() + mnShadowPxWidth - 1), aPageLeftShadow); } BitmapEx aPageBottomShadow = aPageBottomShadowBase; aPageBottomShadow.Scale( aPaintRect.Width(), 1 ); -pOut-DrawBitmapEx( pOut-PixelToLogic( Point( aPaintRect.Left(), aPagePxRect.Bottom() + 1 ) ), aPageBottomShadow); +lcl_paintBitmapExToRect(pOut, Point( aPaintRect.Left(), aPagePxRect.Bottom() + 1 ), aPageBottomShadow); BitmapEx aPageTopShadow = aPageTopShadowBase; aPageTopShadow.Scale( aPaintRect.Width(), 1 ); -pOut-DrawBitmapEx( pOut-PixelToLogic( Point( aPaintRect.Left(), aPagePxRect.Top() - mnShadowPxWidth ) ), aPageTopShadow ); +lcl_paintBitmapExToRect(pOut, Point( aPaintRect.Left(), aPagePxRect.Top() - mnShadowPxWidth ), aPageTopShadow ); } //mod #i6193# paint sidebar for notes ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/filter/ww8/wrtw8nds.cxx |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit 108f7a5aa75e3f35b6fa57af402a1e903fefea24 Author: Cédric Bosdonnat cedric.bosdon...@free.fr Date: Thu Aug 2 14:11:50 2012 +0200 fdo#46020: fixed missing footnote docx/doc/rtf export Don't skip a next position when parsing a paragraph into runs to export. Change-Id: If7e887ea84ad24256b37aa96187bc30ea154632b Signed-off-by: Miklos Vajna vmik...@suse.cz diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index adeeb5a..d70ad1f 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -1622,8 +1622,10 @@ void MSWordExportBase::UpdatePosition( SwWW8AttrIter* aAttrIter, xub_StrLen nAkt xub_StrLen nNextPos; // go to next attribute if no bookmark is found or if the bookmark is behind the next attribute position +// It may happend that the WhereNext() wasn't used in the previous increment because there was a +// bookmark before it. Use that position before trying to find another one. bool bNextBookmark = NearestBookmark( nNextPos, nAktPos, true ); -if( !bNextBookmark || nNextPos aAttrIter-WhereNext() ) +if( nAktPos == aAttrIter-WhereNext() ( !bNextBookmark || nNextPos aAttrIter-WhereNext() ) ) aAttrIter-NextPos(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/filter/ww8/docxattributeoutput.cxx | 25 ++--- sw/source/filter/ww8/docxattributeoutput.hxx |2 +- 2 files changed, 15 insertions(+), 12 deletions(-) New commits: commit 11cfa8bd5fb734ce3d2ee3b9370745fc8ad5c7f9 Author: Cédric Bosdonnat cedric.bosdon...@free.fr Date: Thu Aug 2 10:20:59 2012 +0200 fdo#52610: Fixed several docx export bugs + hyperlink starting before a field and ending in its results isn't valid. + when footnotes have hyperlinks we need to add the proper XML namespace and output the relations to a different file. Change-Id: I1c6cb8acba21c35e10bb0497eeaf96bbd73730d1 (cherry picked from commit 0e4846ec20c1aefc554037e8f08255019c08da47) Signed-off-by: Miklos Vajna vmik...@suse.cz diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 4737501..71d39af 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -548,14 +548,6 @@ void DocxAttributeOutput::EndRun() m_pSerializer-endElementNS( XML_w, XML_hyperlink ); m_closeHyperlinkInPreviousRun = false; } -// prepend the actual run start -if ( m_pHyperlinkAttrList ) -{ -XFastAttributeListRef xAttrList ( m_pHyperlinkAttrList ); - -m_pSerializer-startElementNS( XML_w, XML_hyperlink, xAttrList ); -m_pHyperlinkAttrList = NULL; -} // Write the hyperlink and toc fields starts for ( std::vectorFieldInfos::iterator pIt = m_Fields.begin(); pIt != m_Fields.end(); ) @@ -574,6 +566,15 @@ void DocxAttributeOutput::EndRun() ++pIt; } +// Start the hyperlink after the fields separators or we would generate invalid file +if ( m_pHyperlinkAttrList ) +{ +XFastAttributeListRef xAttrList ( m_pHyperlinkAttrList ); + +m_pSerializer-startElementNS( XML_w, XML_hyperlink, xAttrList ); +m_pHyperlinkAttrList = NULL; +} + DoWriteBookmarks( ); m_pSerializer-startElementNS( XML_w, XML_r, FSEND ); @@ -1213,9 +1214,10 @@ bool DocxAttributeOutput::StartURL( const String rUrl, const String rTarget ) { OUString osUrl( sUrl ); -::rtl::OString sId = m_rExport.AddRelation( -S( http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink; ), -osUrl ); +OString sId = rtl::OUStringToOString( GetExport().GetFilter().addRelation( m_pSerializer-getOutputStream(), +S( http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink; ), +osUrl, true ), RTL_TEXTENCODING_UTF8 ); + m_pHyperlinkAttrList-add( FSNS( XML_r, XML_id), sId.getStr()); } else @@ -3543,6 +3545,7 @@ void DocxAttributeOutput::FootnotesEndnotes( bool bFootnotes ) m_pSerializer-startElementNS( XML_w, nBody, FSNS( XML_xmlns, XML_w ), http://schemas.openxmlformats.org/wordprocessingml/2006/main;, +FSNS( XML_xmlns, XML_r ), http://schemas.openxmlformats.org/officeDocument/2006/relationships;, FSEND ); sal_Int32 nIndex = 0; diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx index 3c855cf..788905f 100644 --- a/sw/source/filter/ww8/docxattributeoutput.hxx +++ b/sw/source/filter/ww8/docxattributeoutput.hxx @@ -612,7 +612,7 @@ public: virtual DocxExport GetExport(); const DocxExport GetExport() const { return const_cast DocxAttributeOutput* ( this )-GetExport(); } -/// For eg. the output of the styles, we need to switch the serializer to enother one. +/// For eg. the output of the styles, we need to switch the serializer to an other one. void SetSerializer( ::sax_fastparser::FSHelperPtr pSerializer ) { m_pSerializer = pSerializer; } /// Occasionnaly need to use this serializer from the outside ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/core/layout/paintfrm.cxx | 39 - 1 file changed, 26 insertions(+), 13 deletions(-) New commits: commit a6d01758da37af1d6bab9c14197134ce410d9408 Author: Michael Stahl mst...@redhat.com Date: Mon Jul 23 14:24:31 2012 +0200 fdo#39812: Writer: fix collapsing merged table border painting: Create a table with a merged cell like in the screenshot in the bug, with a SAL_DEBUG in SwTabFrmPainter::PaintLines the following lines are painted: debug: paint start 1 debug: start: 2749,1488 end: 12387,1488 2 debug: start: 2749,1945 end: 7567,1945 3 debug: start: 7567,1945 end: 12387,1945 4 debug: start: 2749,2015 end: 12387,2015 5 debug: start: 2749,2542 end: 7567,2542 6 debug: start: 7567,2542 end: 12387,2542 7 debug: start: 2749,1488 end: 2749,1945 8 debug: start: 2749,1945 end: 2749,2015 9 debug: start: 2749,2015 end: 2749,2542 A debug: start: 7567,1945 end: 7567,2542 B debug: start: 12387,1488 end: 12387,1945 C debug: start: 12387,1945 end: 12387,2015 D debug: start: 12387,2015 end: 12387,2542 debug: paint end *1*1* 7 B 7 B *2*3* 8 A C *4*4* 9 A D 9 A D *5*6* The problem is obviously that the Y coordinates of the lines 2, 3 and 4 differ; they should be on the same Y position. The problem here is that logically horizontal lines must be painted not centered but below the line, and It turns out that SwTabFrmPainter::Insert cannot correct the positions properly to do that, because it only looks at borders in a single cell. When using the UI to set the borders, we get (for innner table borders) only a bottom border in the cells, but no top borders, so the top position of the logically vertical borders needs to be corrected with the width of the bottom border of the cell _above_; a symmetric correction of the bottom position to the top border of the cell below is also necessary. Fortunately if we just leave the positons alone in Insert then TabFrmPainter will eliminate duplicate lines with equal positions and so it's only necessary to correct the positions when actually painting the line in wTabFrmPainter::PaintLines, where we have the neighboring lines available. (cherry picked from commit 02e80d2e431a57ad775a674eb3cfcd6cec53e09f) Change-Id: Ia8519f6673db0f3a1ecaa68038896cac39609129 Signed-off-by: Miklos Vajna vmik...@suse.cz diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index d26dca7..4d874a1 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -2534,6 +2534,28 @@ void SwTabFrmPainter::PaintLines( OutputDevice rDev, const SwRect rRect ) cons aPaintEnd.Y() = aUpperAligned._Bottom(); } +// logically vertical lines are painted centered on the line, +// logically horizontal lines are painted below the line +bool const isBelow((mrTabFrm.IsVertical()) ? !bHori : bHori); +double const offsetStart = (isBelow) +? aStyles[0].GetWidth() / 2.0 +: std::maxdouble(aStyles[1].GetWidth(), +aStyles[3].GetWidth()) / 2.0; +double const offsetEnd = (isBelow) +? aStyles[0].GetWidth() / 2.0 +: std::maxdouble(aStyles[4].GetWidth(), +aStyles[6].GetWidth()) / 2.0; +if (mrTabFrm.IsVertical()) +{ +aPaintStart.X() -= static_castlong(offsetStart + 0.5); +aPaintEnd.X() -= static_castlong(offsetEnd + 0.5); +} +else +{ +aPaintStart.Y() += static_castlong(offsetStart + 0.5); +aPaintEnd.Y() += static_castlong(offsetEnd + 0.5); +} + aPaintStart.X() -= nTwipXCorr; // nHalfPixelSzW - 2 to assure that we do not leave the pixel aPaintEnd.X() -= nTwipXCorr; aPaintStart.Y() -= nTwipYCorr; @@ -2732,19 +2754,10 @@ void SwTabFrmPainter::Insert( const SwFrm rFrm, const SvxBoxItem rBoxItem ) aR.MirrorSelf(); aB.MirrorSelf(); -const SwTwips nHalfBottomWidth = aB.GetWidth() / 2; -const SwTwips nHalfTopWidth = (bBottomAsTop) -? nHalfBottomWidth : aT.GetWidth() / 2; - -// these are positions of the lines -const SwTwips nLeft = -aBorderRect._Left() - ((bVert) ? nHalfBottomWidth : 0); -const SwTwips nRight = -aBorderRect._Right() - ((bVert) ? nHalfTopWidth : 0); -const SwTwips nTop= -aBorderRect._Top() + ((bVert) ? 0 : nHalfTopWidth); -const SwTwips nBottom
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/core/fields/authfld.cxx |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) New commits: commit 48d61f4ad1eb4f8a031e65c3fcbebc5023d600e9 Author: David Tardon dtar...@redhat.com Date: Thu Jul 19 14:00:55 2012 +0200 fdo#52241 remove just one entry Change-Id: Ida7920c3196105f7f8aab519da12e79135839345 (cherry picked from commit 859018061956b1937c7be3809a9858cbd610fa9c) Signed-off-by: LuboÅ¡ LuÅák l.lu...@suse.cz diff --git a/sw/source/core/fields/authfld.cxx b/sw/source/core/fields/authfld.cxx index 1f3c24b..ccfdfcf 100644 --- a/sw/source/core/fields/authfld.cxx +++ b/sw/source/core/fields/authfld.cxx @@ -322,9 +322,8 @@ sal_uInt16 SwAuthorityFieldType::GetSequencePos(long nHandle) DELETEZ(pNew); else // remove the old content { -for (SwTOXSortTabBases::const_iterator it = aSortArr.begin(); it != aSortArr.end(); ++it) -delete *it; -aSortArr.clear(); +aSortArr.erase(aSortArr.begin() + i); +delete pOld; } break; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/core/inc/rolbck.hxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 3669bb966f709089f43111b5ca1057bfe4a22697 Author: Caolán McNamara caol...@redhat.com Date: Sun Jul 15 20:46:27 2012 +0100 Resolves: fdo#52013 use vector::insert instead Change-Id: Ie12e5b11196b1b0f919bd18f28a0b86f60cc6513 Signed-off-by: Takeshi Abe t...@fixedpoint.jp diff --git a/sw/source/core/inc/rolbck.hxx b/sw/source/core/inc/rolbck.hxx index efb6f41..cd5a947 100644 --- a/sw/source/core/inc/rolbck.hxx +++ b/sw/source/core/inc/rolbck.hxx @@ -402,7 +402,8 @@ public: { SwpHstry::iterator itSourceBegin = pIns-m_SwpHstry.begin() + nStart; SwpHstry::iterator itSourceEnd = pIns-m_SwpHstry.end(); -std::copy( itSourceBegin, itSourceEnd, m_SwpHstry.begin() + nPos ); +if (itSourceBegin == itSourceEnd) return; +m_SwpHstry.insert(m_SwpHstry.begin() + nPos, itSourceBegin, itSourceEnd); pIns-m_SwpHstry.erase( itSourceBegin, itSourceEnd ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/filter/ww8/docxattributeoutput.cxx |7 ++- sw/source/filter/ww8/docxexport.cxx |6 ++ sw/source/filter/ww8/docxexport.hxx |5 +++-- 3 files changed, 15 insertions(+), 3 deletions(-) New commits: commit d34d2c1a026ce99c3f6e2730efbf8c41dcbcd3e1 Author: LuboÅ¡ LuÅák l.lu...@suse.cz Date: Fri Jul 13 18:22:27 2012 +0200 do not write default tab stop into the default style in .docx Use w:defaultTabStop in w:settings instead. Change-Id: I7056ff0ee8574fd942e2f330a1f76bae657a825e (cherry picked from commit 15af925c254f27046427de70a59011e2ac3d6bdb) Signed-off-by: Caolán McNamara caol...@redhat.com diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 2d1bb23..4737501 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -3788,7 +3788,12 @@ void DocxAttributeOutput::ParaTabStop( const SvxTabStopItem rTabStop ) sal_uInt16 nCount = rTabStop.Count(); for (sal_uInt16 i = 0; i nCount; i++ ) -impl_WriteTabElement( m_pSerializer, rTabStop[i], nCurrentLeft ); +{ +if( rTabStop[i].GetAdjustment() != SVX_TAB_ADJUST_DEFAULT ) +impl_WriteTabElement( m_pSerializer, rTabStop[i], nCurrentLeft ); +else +GetExport().setDefaultTabStop( rTabStop[i].GetTabPos()); +} m_pSerializer-endElementNS( XML_w, XML_tabs ); } diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index de50add..418589d 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -687,6 +687,9 @@ void DocxExport::WriteSettings() rtl::OString aZoom(rtl::OString::valueOf(sal_Int32(pViewShell-GetViewOptions()-GetZoom(; pFS-singleElementNS(XML_w, XML_zoom, FSNS(XML_w, XML_percent), aZoom.getStr(), FSEND); +if( settings.defaultTabStop != 0 ) +pFS-singleElementNS( XML_w, XML_defaultTabStop, FSNS( XML_w, XML_val ), +rtl::OString::valueOf( sal_Int32( settings.defaultTabStop )).getStr(), FSEND ); if( settings.evenAndOddHeaders ) pFS-singleElementNS( XML_w, XML_evenAndOddHeaders, FSEND ); @@ -833,6 +836,7 @@ DocxExport::~DocxExport() DocxSettingsData::DocxSettingsData() : evenAndOddHeaders( false ) +, defaultTabStop( 0 ) { } @@ -840,6 +844,8 @@ bool DocxSettingsData::hasData() const { if( evenAndOddHeaders ) return true; +if( defaultTabStop != 0 ) +return true; return false; } diff --git a/sw/source/filter/ww8/docxexport.hxx b/sw/source/filter/ww8/docxexport.hxx index 8963cd3..c89afc7 100644 --- a/sw/source/filter/ww8/docxexport.hxx +++ b/sw/source/filter/ww8/docxexport.hxx @@ -64,6 +64,7 @@ struct DocxSettingsData DocxSettingsData(); bool hasData() const; /// returns true if there are any non-default settings (i.e. something to write) bool evenAndOddHeaders; +int defaultTabStop; }; /// The class that does all the actual DOCX export-related work. @@ -228,8 +229,8 @@ public: /// Reference to the VMLExport instance for the main document. oox::vml::VMLExport VMLExporter(); -/// Data to be exported in the settings part of the document -DocxSettingsData settingsData(); +/// Set the document default tab stop. +void setDefaultTabStop( int stop ) { settings.defaultTabStop = stop; } private: /// No copying. ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/core/txtnode/txtedt.cxx | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) New commits: commit 553f9ccfc8a6048528b9ffcd535adf7f1cd51fc7 Author: Muhammad Haggag mhag...@gmail.com Date: Wed Jun 13 16:45:06 2012 +0200 fdo#46757 Word/character count incorrect with record changes enabled We were ignoring redlined (deleted) text when counting characters, but not when counting words or characters without spaces. We now mask all redlined/hidden content from the expanded node text before operating on it. Change-Id: If882a6dde883a2ba0ca99909ca7ac2b9abd4a1fb diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx index 3fbef67..7f350c6 100644 --- a/sw/source/core/txtnode/txtedt.cxx +++ b/sw/source/core/txtnode/txtedt.cxx @@ -1856,13 +1856,6 @@ void SwTxtNode::CountWords( SwDocStat rStat, return; } -// make a copy of the text -String rTextCopy = m_Text.Copy( ); - -// mask out the redlined and hidden text with ' ' -const xub_Unicode cChar(' '); -const sal_uInt16 nNumOfMaskedChars = lcl_MaskRedlinesAndHiddenText( *this, rTextCopy, nStt, nEnd, cChar, false ); - // expand text into pConversionMap for scanner rtl::OUString aExpandText; const ModelToViewHelper::ConversionMap* pConversionMap = BuildConversionMap( aExpandText ); @@ -1877,6 +1870,12 @@ void SwTxtNode::CountWords( SwDocStat rStat, return; } +// make a copy of the expanded text for masking redlined/hidden text with ' ' +String textCopy = aExpandText; +const xub_Unicode cChar(' '); +const sal_uInt16 nNumOfMaskedChars = lcl_MaskRedlinesAndHiddenText( *this, textCopy, nExpandBegin, nExpandEnd, cChar, false ); +aExpandText = textCopy; + //do the count // all counts exclude hidden paras and hidden+redlined within para // definition of space/white chars in SwScanner (and BreakIter!) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/filter/ww8/ww8graf.cxx |4 1 file changed, 4 insertions(+) New commits: commit 2930a1abf8ba74d9bba0be808c1172ea7cd8e149 Author: Michael Stahl mst...@redhat.com Date: Tue Jun 12 15:40:45 2012 +0200 fdo#43249: WW8: fix double border import: The border widths are tripled on import, because that is effectively what SetWidth does for DOUBLE borders; set a divisor of 3 similar to e2ffb71305c5f085eec6d396651c76d6daee3406 70a6a4d425558340bb49507975343a3e0a1bdde8 Change-Id: I40b175bedc1ed2d564be126bf9e6870b43474aba (cherry picked from commit 36e43b52992735c622833e923faa63774b9e2f76) Signed-off-by: Michael Stahl mst...@redhat.com diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx index 65431a5..084fc15 100644 --- a/sw/source/filter/ww8/ww8graf.cxx +++ b/sw/source/filter/ww8/ww8graf.cxx @@ -1570,6 +1570,10 @@ sal_Int32 SwWW8ImplReader::MatchSdrBoxIntoFlyBoxItem(const Color rLineColor, aLine.SetWidth( nLineThick ); // No conversion here, nLineThick is already in twips aLine.SetStyle( nIdx ); +if (editeng::DOUBLE == nIdx) +{ // fdo#43249: divide width by 3 for outer line, gap, inner line + aLine.ScaleMetrics(1, 3); +} for(sal_uInt16 nLine = 0; nLine 4; ++nLine) rBox.SetLine(new SvxBorderLine( aLine ), nLine); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/core/txtnode/txtedt.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 29ff3d49c8f0bc45a322d3ab67300bd269593181 Author: Muhammad Haggag mhag...@gmail.com Date: Sat Jun 9 23:48:27 2012 +0200 fdo#50141: Character count (with spaces) incorrect with numbering on. There was a typo in the character counting code of text nodes. When a numbered list is detected, the code attempts to add the character count of the item number to the total count, but ends up overwriting it instead (uses '=' instead of '+='). This resulted in the item number strings to be the only ones counted in a numbered list. Change-Id: I9d96311065f66026dd4f05d3cd5ae61e2c0dafb4 (cherry picked from commit a585863f013aa4207270e11f5e031126adf1ed4a) diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx index f65bfe9..3fbef67 100644 --- a/sw/source/core/txtnode/txtedt.cxx +++ b/sw/source/core/txtnode/txtedt.cxx @@ -1939,7 +1939,7 @@ void SwTxtNode::CountWords( SwDocStat rStat, nTmpCharsExcludingSpaces += pBreakIt-getGraphemeCount(rWord); } -nTmpChars = pBreakIt-getGraphemeCount(aNumString); +nTmpChars += pBreakIt-getGraphemeCount(aNumString); } else if ( HasBullet() ) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/core/fields/expfld.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit d56ad449084272e5ccc36444d5ce16e0b5e368a4 Author: Andras Timar ati...@suse.com Date: Wed Jun 6 23:15:19 2012 +0200 fdo#50144 put full reference text to selection field Change-Id: I99a4a2a3fc6e20f9c8d35213609075f2269eab2f diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx index 53a90d3..9afe607 100644 --- a/sw/source/core/fields/expfld.cxx +++ b/sw/source/core/fields/expfld.cxx @@ -607,7 +607,7 @@ sal_uInt16 SwSetExpFieldType::GetSeqFldList( SwSeqFldList rList ) pNd-GetNodes().IsDocNodes() ) { _SeqFldLstElem* pNew = new _SeqFldLstElem( -pNd-GetExpandTxt( 0, (*pF-GetTxtFld()-GetStart()) + 1 ), +pNd-GetExpandTxt( 0, USHRT_MAX ), ((SwSetExpField*)pF-GetFld())-GetSeqNumber() ); rList.InsertSort( pNew ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/ui/uiview/view2.cxx |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) New commits: commit 59ea2faff4e938c77c71ec89bf9b6ea17a446cd1 Author: Muhammad Haggag mhag...@gmail.com Date: Mon Jun 4 20:25:19 2012 +0200 fdo#50386 Page count field makes scrolling impossible (Also fixes fdo#50540 View area jumps when start drawing) The word count code for the status bar was calling EndAction, which scrolls the view to focus on the cursor. We were calling it directly (Start/EndAction) and indirectly (through SwWrtShell::GetUpdatedDocStat). I removed the direct calls and replaced the SwWrtShell call with SwDoc::GetUpdatedDocStat, which doesn't call Start/EndAction. Change-Id: I764e8c2d9c10f8eb685d36d0e26142cf3fee628c (cherry picked from commit a8080cad1089431a2d97903f73623eabe2eb23a7) diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx index 58b5ce4..73a8b96 100644 --- a/sw/source/ui/uiview/view2.cxx +++ b/sw/source/ui/uiview/view2.cxx @@ -1205,10 +1205,8 @@ void SwView::StateStatusLine(SfxItemSet rSet) SwDocStat documentStats; { SwWait aWait( *GetDocShell(), sal_True ); -rShell.StartAction(); rShell.CountWords(selectionStats); -documentStats = rShell.GetUpdatedDocStat(); -rShell.EndAction(); +documentStats = rShell.GetDoc()-GetUpdatedDocStat(); } const sal_uInt32 stringId = selectionStats.nWord? STR_STATUSBAR_WORDCOUNT : STR_STATUSBAR_WORDCOUNT_NO_SELECTION; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/ui/uiview/view2.cxx |1 - 1 file changed, 1 deletion(-) New commits: commit 265772797081d6d5b5cb94248a3a85d18487cd93 Author: Michael Stahl mst...@redhat.com Date: Tue Jun 5 20:09:54 2012 +0200 fdo#50386: SwView::StateStatusLine: remove SwWait: This will turn the mouse cursor into an arrow cursor when the word count is updated, which seems odd. Change-Id: I136824a554cc31e302193cce58241cdf4e4dd281 (cherry picked from commit 78b61b4d944db7f00093d7ee250d234694f1d5b5) diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx index 73a8b96..b70670a 100644 --- a/sw/source/ui/uiview/view2.cxx +++ b/sw/source/ui/uiview/view2.cxx @@ -1204,7 +1204,6 @@ void SwView::StateStatusLine(SfxItemSet rSet) SwDocStat selectionStats; SwDocStat documentStats; { -SwWait aWait( *GetDocShell(), sal_True ); rShell.CountWords(selectionStats); documentStats = rShell.GetDoc()-GetUpdatedDocStat(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
sw/source/core/fields/expfld.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 89fbb7fc5a71a98f187ebb159ace053f7a28d291 Author: Andras Timar ati...@suse.com Date: Tue Jun 5 21:51:45 2012 +0200 fdo#50139 do not cut first character of field text Change-Id: Ia80e0bc0540259f9a752452ad677c645c97fc7f5 diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx index 4888bd8..53a90d3 100644 --- a/sw/source/core/fields/expfld.cxx +++ b/sw/source/core/fields/expfld.cxx @@ -607,7 +607,7 @@ sal_uInt16 SwSetExpFieldType::GetSeqFldList( SwSeqFldList rList ) pNd-GetNodes().IsDocNodes() ) { _SeqFldLstElem* pNew = new _SeqFldLstElem( -pNd-GetExpandTxt( 1, (*pF-GetTxtFld()-GetStart()) ), +pNd-GetExpandTxt( 0, (*pF-GetTxtFld()-GetStart()) + 1 ), ((SwSetExpField*)pF-GetFld())-GetSeqNumber() ); rList.InsertSort( pNew ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits