[Libreoffice-commits] core.git: cui/source desktop/source editeng/source forms/source framework/inc framework/source include/editeng include/svl include/svx oox/source sc/inc sc/qa sc/source sd/source
cui/source/options/optgdlg.cxx | 10 - desktop/source/app/langselect.cxx |4 editeng/source/editeng/editdoc.cxx | 18 +- editeng/source/editeng/editdoc.hxx |5 editeng/source/editeng/editeng.cxx |6 editeng/source/editeng/editobj.cxx | 12 - editeng/source/editeng/editobj2.hxx | 13 - editeng/source/editeng/editview.cxx | 10 - editeng/source/editeng/impedit.hxx |7 editeng/source/editeng/impedit2.cxx | 12 - editeng/source/editeng/impedit3.cxx |9 - editeng/source/editeng/impedit4.cxx | 22 +- editeng/source/items/textitem.cxx | 80 ++ editeng/source/outliner/outlin2.cxx |2 editeng/source/outliner/outlvw.cxx | 10 - forms/source/richtext/richtextimplcontrol.cxx |8 - forms/source/richtext/richtextimplcontrol.hxx |4 forms/source/richtext/rtattributehandler.cxx| 19 +- forms/source/richtext/rtattributehandler.hxx| 21 +- forms/source/richtext/rtattributes.hxx |2 framework/inc/helper/mischelper.hxx | 11 - framework/inc/uielement/langselectionmenucontroller.hxx |8 - framework/source/fwi/helper/mischelper.cxx |4 framework/source/uielement/langselectionmenucontroller.cxx |6 framework/source/uielement/langselectionstatusbarcontroller.cxx | 14 - include/editeng/editeng.hxx |7 include/editeng/editobj.hxx |3 include/editeng/editview.hxx|3 include/editeng/outliner.hxx|7 include/editeng/scripttypeitem.hxx | 12 - include/svl/languageoptions.hxx | 48 -- include/svx/svdedxv.hxx |5 oox/source/export/drawingml.cxx |4 sc/inc/celltextattr.hxx |5 sc/inc/column.hxx |8 - sc/inc/document.hxx | 15 + sc/inc/documentimport.hxx |3 sc/inc/global.hxx |7 sc/inc/globalnames.hxx |4 sc/inc/patattr.hxx |7 sc/inc/table.hxx|6 sc/qa/unit/ucalc_column.cxx |8 - sc/source/core/data/celltextattr.cxx|2 sc/source/core/data/column.cxx | 14 - sc/source/core/data/column2.cxx | 42 ++--- sc/source/core/data/column3.cxx |2 sc/source/core/data/column4.cxx |2 sc/source/core/data/documen6.cxx| 39 ++-- sc/source/core/data/documen8.cxx|6 sc/source/core/data/document.cxx|6 sc/source/core/data/documentimport.cxx | 14 - sc/source/core/data/global.cxx | 24 +-- sc/source/core/data/patattr.cxx | 12 - sc/source/core/data/table1.cxx | 10 - sc/source/core/data/table5.cxx |4 sc/source/core/tool/numformat.cxx |4 sc/source/filter/excel/xestyle.cxx | 28 --- sc/source/filter/excel/xlroot.cxx |6 sc/source/filter/html/htmlexp.cxx |4 sc/source/filter/inc/htmlexp.hxx|4 sc/source/filter/rtf/eeimpars.cxx |6 sc/source/filter/xml/xmlimprt.cxx |2 sc/source/ui/app/inputwin.cxx | 14 - sc/source/ui/drawfunc/drtxtob.cxx |6 sc/source/ui/inc/gridwin.hxx|2 sc/source/ui/inc/viewfunc.hxx |2 sc/source/ui/inc/viewutil.hxx |4 sc/source/ui/view/editsh.cxx
[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - vcl/source
vcl/source/outdev/text.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 84b28b7d0b5061377b368c809acdb286902b4069 Author: Michael Stahl Date: Thu Apr 16 22:25:23 2015 +0200 tdf#86793: vcl: speed up OutputDevice::GetEllipsisString() The ridiculous algrorithm used for TEXT_DRAW_CENTERELLIPSIS will go faster if we cut out most of the text at the beginning instead of one at a time. (regression from 912ecaf565e68d2ca3fb9584712313e712749f75) (cherry picked from commit c6ec3e4cee8c7c22380780f2661ac23946cdb050) Change-Id: I9310dda184715bafe372e3efef9d365e1ad9 Reviewed-on: https://gerrit.libreoffice.org/15355 Tested-by: Miklos Vajna Reviewed-by: Miklos Vajna diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx index 113a42e..8c066d1 100644 --- a/vcl/source/outdev/text.cxx +++ b/vcl/source/outdev/text.cxx @@ -1993,7 +1993,8 @@ OUString OutputDevice::ImplGetEllipsisString( const OutputDevice& rTargetDevice, if( (nStyle & TEXT_DRAW_CENTERELLIPSIS) == TEXT_DRAW_CENTERELLIPSIS ) { OUStringBuffer aTmpStr( aStr ); -sal_Int32 nEraseChars = 4; +// speed it up by removing all but 1.33x as many as the break pos. +sal_Int32 nEraseChars = std::max(4, aStr.getLength() - (nIndex*4)/3); while( nEraseChars < aStr.getLength() && _rLayout.GetTextWidth( aTmpStr.toString(), 0, aTmpStr.getLength() ) > nMaxWidth ) { aTmpStr = OUStringBuffer(aStr); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: ciabot/run-libreoffice-ciabot.pl
ciabot/run-libreoffice-ciabot.pl |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit 2bd27f18f2435681259c0535c7b223195b3bdf7b Author: Markus Mohrhard Date: Fri Apr 17 07:42:46 2015 + we need to always include a branch name diff --git a/ciabot/run-libreoffice-ciabot.pl b/ciabot/run-libreoffice-ciabot.pl index 80551a0..517960c 100755 --- a/ciabot/run-libreoffice-ciabot.pl +++ b/ciabot/run-libreoffice-ciabot.pl @@ -120,7 +120,10 @@ sub report($$$) { qx(perl -I $cwd $cwd/sigui-bugzilla.pl $repo $_ $branch_name); } else { if ( is_valid_bugzilla_commit( $repo, $branch_name ) ) { -qx(python $cwd/libreoffice-bugzilla2.py -r $repo -c $_ -b $branch_name); + my $branch = $branch_name; + $branch = 'master' if ($branch eq ''); + print "reporting to bugzilla: $_ and branch $branch"; +qx(python $cwd/libreoffice-bugzilla2.py -r $repo -c $_ -b $branch >> /home/ciabot/bugzilla.log); } qx($ciabot $repo $_ $branch_name $ciaproxy); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - oox/source
oox/source/export/chartexport.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 6beaa148f59e22610fb38db1f1e628963789d5d7 Author: Caolán McNamara Date: Wed Apr 15 10:30:34 2015 +0100 fix crash on export of fdo60365-2.ods to xlsx Change-Id: I1a281b096e4d1831bcf67ca03180afff043fbcfd (cherry picked from commit 135907f2061550624ee1859745d94eee01849070) Reviewed-on: https://gerrit.libreoffice.org/15322 Tested-by: Markus Mohrhard Reviewed-by: Markus Mohrhard diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 3dc8602..5ad9f35 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -1943,7 +1943,7 @@ void ChartExport::exportSeriesCategory( const Reference< chart2::data::XDataSequ pFS->startElement( FSNS( XML_c, XML_cat ), FSEND ); -OUString aCellRange = xValueSeq->getSourceRangeRepresentation(); +OUString aCellRange = xValueSeq.is() ? xValueSeq->getSourceRangeRepresentation() : OUString(); aCellRange = parseFormula( aCellRange ); // TODO: need to handle XML_multiLvlStrRef according to aCellRange pFS->startElement( FSNS( XML_c, XML_strRef ), @@ -1986,7 +1986,7 @@ void ChartExport::exportSeriesValues( const Reference< chart2::data::XDataSequen pFS->startElement( FSNS( XML_c, nValueType ), FSEND ); -OUString aCellRange = xValueSeq->getSourceRangeRepresentation(); +OUString aCellRange = xValueSeq.is() ? xValueSeq->getSourceRangeRepresentation() : OUString(); aCellRange = parseFormula( aCellRange ); // TODO: need to handle XML_multiLvlStrRef according to aCellRange pFS->startElement( FSNS( XML_c, XML_numRef ), ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: include/svx svx/source
include/svx/svddrgv.hxx |2 svx/source/svdraw/svdoashp.cxx |8 +-- svx/source/svdraw/svdocirc.cxx |6 +- svx/source/svdraw/svdoedge.cxx | 88 svx/source/svdraw/svdopath.cxx | 34 +++ svx/source/svdraw/svdotxtr.cxx |4 - svx/source/unodraw/unoshap2.cxx |8 +-- 7 files changed, 75 insertions(+), 75 deletions(-) New commits: commit 7e5980ccf39b54240524f059a65497b766af91cc Author: Miklos Vajna Date: Fri Apr 17 09:13:11 2015 +0200 svx: nPntAnz -> nPointCount Change-Id: I2a4c7ef9d33db1c34a4ab338f70f800b30083f4f diff --git a/include/svx/svddrgv.hxx b/include/svx/svddrgv.hxx index c7269ae..1aae1fb 100644 --- a/include/svx/svddrgv.hxx +++ b/include/svx/svddrgv.hxx @@ -180,7 +180,7 @@ public: // all polygons. Default=500. // NoDragPolys is (temporarily) activated, if one of the limits // is exceeded. -void SetDragXorPointLimit(sal_uIntPtr nPntAnz) { nDragXorPointLimit=nPntAnz; } +void SetDragXorPointLimit(sal_uIntPtr nPointCount) { nDragXorPointLimit=nPointCount; } sal_uIntPtr GetDragXorPointLimit() const { return nDragXorPointLimit; } void SetSolidDragging(bool bOn); diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index 238166b..9b06946 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -3108,8 +3108,8 @@ bool SdrObjCustomShape::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegf Point aRef1( ( aBoundRect.Left() + aBoundRect.Right() ) >> 1, aBoundRect.Top() ); Point aRef2( aRef1.X(), aRef1.Y() + 1000 ); sal_uInt16 i; -sal_uInt16 nPntAnz=aPol.GetSize(); -for (i=0; i> 1 ); Point aRef2( aRef1.X() + 1000, aRef1.Y() ); sal_uInt16 i; -sal_uInt16 nPntAnz=aPol.GetSize(); -for (i=0; i 2) +if(OBJ_CIRC != meCircleKind && nPointCount > 2) { const ImpCircUser* pU = static_cast(rDrag.GetUser()); sal_Int32 nAngle; aBuf.appendAscii(" ("); -if(3 == nPntAnz) +if(3 == nPointCount) { nAngle = pU->nStart; } diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx index 27f4763..48cc722 100644 --- a/svx/source/svdraw/svdoedge.cxx +++ b/svx/source/svdraw/svdoedge.cxx @@ -413,18 +413,18 @@ bool SdrEdgeObj::IsNode() const SdrGluePoint SdrEdgeObj::GetVertexGluePoint(sal_uInt16 nNum) const { Point aPt; -sal_uInt16 nPntAnz=pEdgeTrack->GetPointCount(); -if (nPntAnz>0) +sal_uInt16 nPointCount=pEdgeTrack->GetPointCount(); +if (nPointCount>0) { Point aOfs = GetSnapRect().Center(); if (nNum==2 && GetConnectedNode(true)==NULL) aPt=(*pEdgeTrack)[0]; -else if (nNum==3 && GetConnectedNode(false)==NULL) aPt=(*pEdgeTrack)[nPntAnz-1]; +else if (nNum==3 && GetConnectedNode(false)==NULL) aPt=(*pEdgeTrack)[nPointCount-1]; else { -if ((nPntAnz & 1) ==1) { -aPt=(*pEdgeTrack)[nPntAnz/2]; +if ((nPointCount & 1) ==1) { +aPt=(*pEdgeTrack)[nPointCount/2]; } else { -Point aPt1((*pEdgeTrack)[nPntAnz/2-1]); -Point aPt2((*pEdgeTrack)[nPntAnz/2]); +Point aPt1((*pEdgeTrack)[nPointCount/2-1]); +Point aPt2((*pEdgeTrack)[nPointCount/2]); aPt1+=aPt2; aPt1.X()/=2; aPt1.Y()/=2; @@ -1266,16 +1266,16 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec nNum--; aXP1.Insert(XPOLY_APPEND,aXP2[nNum],XPOLY_NORMAL); } -sal_uInt16 nPntAnz=aXP1.GetPointCount(); +sal_uInt16 nPointCount=aXP1.GetPointCount(); char cForm=0; if (bInfo || pnQuality!=NULL) { cForm='?'; -if (nPntAnz==2) cForm='I'; -else if (nPntAnz==3) cForm='L'; -else if (nPntAnz==4) { // Z or U +if (nPointCount==2) cForm='I'; +else if (nPointCount==3) cForm='L'; +else if (nPointCount==4) { // Z or U if (nAngle1==nAngle2) cForm='U'; else cForm='Z'; -} else if (nPntAnz==6) { // S or C or ... +} else if (nPointCount==6) { // S or C or ... if (nAngle1!=nAngle2) { // For type S, line 2 has the same direction as line 4. // For type C, the opposite is true. @@ -1315,7 +1315,7 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec sal_uIntPtr nQual0=nQual; // prevent overruns bool bOverflow = false; Point aPt0(aXP1[0]); -for (sal_uInt16 nPntNum=1; nPntNum15) bOverflow = true; } -if (nPntAnz>=2) { // check exit angle again +if (nPointCount>=2) { // check exit angle again Point aP1(aXP1[1]); aP1-=
[Libreoffice-commits] core.git: Branch 'feature/vclptr' - basctl/source basic/source vcl/README.lifecycle
basctl/source/basicide/baside2.cxx |6 +++--- basctl/source/basicide/baside2b.cxx | 22 +++--- basctl/source/basicide/baside3.cxx |2 +- basctl/source/basicide/basides2.cxx |4 ++-- basctl/source/basicide/basides3.cxx |4 ++-- basctl/source/basicide/basidesh.cxx | 10 +- basctl/source/basicide/layout.cxx |4 ++-- basctl/source/basicide/moduldl2.cxx |2 +- basctl/source/basicide/moduldlg.cxx | 14 +++--- basctl/source/basicide/objdlg.cxx |4 ++-- basic/source/runtime/inputbox.cxx |4 ++-- basic/source/runtime/iosys.cxx |4 ++-- basic/source/runtime/methods.cxx| 10 +- vcl/README.lifecycle|7 +++ 14 files changed, 52 insertions(+), 45 deletions(-) New commits: commit 5cc560f6c27dc60764f644d6b5fb5ccb1b8072be Author: Michael Meeks Date: Fri Apr 17 09:11:51 2015 +0100 basctl, basic: convert new to ::Create. Change-Id: I1fc2c69640ed625425a679380d6f25178bc5aeb1 diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index df27e30..48f9eab 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -192,7 +192,7 @@ ModulWindow::ModulWindow ( BaseWindow(pParent, rDocument, aLibName, aName), rLayout(*pParent), nValid(ValidWindow), -aXEditorWindow(new ComplexEditorWindow(this)), +aXEditorWindow(VclPtr::Create(this)), m_aModule(aModule) { aXEditorWindow->Show(); @@ -1470,8 +1470,8 @@ void ModulWindow::UpdateModule () ModulWindowLayout::ModulWindowLayout (vcl::Window* pParent, ObjectCatalog& rObjectCatalog_) : Layout(pParent), pChild(0), -aWatchWindow(new WatchWindow(this)), -aStackWindow(new StackWindow(this)), +aWatchWindow(VclPtr::Create(this)), +aStackWindow(VclPtr::Create(this)), rObjectCatalog(rObjectCatalog_) { } diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index 076aa3e..f44fb4e 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -227,7 +227,7 @@ EditorWindow::EditorWindow (vcl::Window* pParent, ModulWindow* pModulWindow) : bHighlightning(false), bDoSyntaxHighlight(true), bDelayHighlight(true), -pCodeCompleteWnd(new CodeCompleteWindow(this)) +pCodeCompleteWnd(VclPtr::Create(this)) { SetBackground(Wallpaper(GetSettings().GetStyleSettings().GetFieldColor())); SetPointer( Pointer( POINTER_TEXT ) ); @@ -1599,11 +1599,11 @@ namespace WatchWindow::WatchWindow (Layout* pParent) : DockingWindow(pParent), aWatchStr( IDEResId( RID_STR_REMOVEWATCH ) ), -aXEdit( new ExtendedEdit(this, IDEResId( RID_EDT_WATCHEDIT )) ), -aRemoveWatchButton( new ImageButton(this, IDEResId( RID_IMGBTN_REMOVEWATCH )) ), -aTreeListBox( new WatchTreeListBox(this, WB_BORDER | WB_3DLOOK | WB_HASBUTTONS | WB_HASLINES | WB_HSCROLL | WB_TABSTOP +aXEdit( VclPtr::Create(this, IDEResId( RID_EDT_WATCHEDIT )) ), +aRemoveWatchButton( VclPtr::Create(this, IDEResId( RID_IMGBTN_REMOVEWATCH )) ), +aTreeListBox( VclPtr::Create(this, WB_BORDER | WB_3DLOOK | WB_HASBUTTONS | WB_HASLINES | WB_HSCROLL | WB_TABSTOP | WB_HASLINESATROOT | WB_HASBUTTONSATROOT) ), -aHeaderBar( new HeaderBar( this, WB_BUTTONSTYLE | WB_BORDER ) ) +aHeaderBar( VclPtr::Create( this, WB_BUTTONSTYLE | WB_BORDER ) ) { aXEdit->SetAccessibleName(IDEResId(RID_STR_WATCHNAME).toString()); aTreeListBox->SetAccessibleName(IDEResId(RID_STR_WATCHNAME).toString()); @@ -1902,7 +1902,7 @@ void WatchWindow::UpdateWatches( bool bBasicStopped ) StackWindow::StackWindow (Layout* pParent) : DockingWindow(pParent), -aTreeListBox( new SvTreeListBox(this, WB_BORDER | WB_3DLOOK | WB_HSCROLL | WB_TABSTOP) ), +aTreeListBox( VclPtr::Create(this, WB_BORDER | WB_3DLOOK | WB_HSCROLL | WB_TABSTOP) ), aStackStr( IDEResId( RID_STR_STACK ) ) { aTreeListBox->SetHelpId(HID_BASICIDE_STACKWINDOW_LIST); @@ -2044,10 +2044,10 @@ void StackWindow::UpdateCalls() ComplexEditorWindow::ComplexEditorWindow( ModulWindow* pParent ) : Window( pParent, WB_3DLOOK | WB_CLIPCHILDREN ), -aBrkWindow(new BreakPointWindow(this, pParent)), -aLineNumberWindow(new LineNumberWindow(this, pParent)), -aEdtWindow(new EditorWindow(this, pParent)), -aEWVScrollBar( new ScrollBar(this, WB_VSCROLL | WB_DRAG) ) +aBrkWindow(VclPtr::Create(this, pParent)), +aLineNumberWindow(VclPtr::Create(this, pParent)), +aEdtWindow(VclPtr::Create(this, pParent)), +aEWVScrollBar( VclPtr::Create(this, WB_VSCROLL | WB_DRAG) ) { aEdtWindow->Show(); aBrkWindow->Show(); @@ -2862,7 +2862,7 @@ void CodeCompleteListBox::HideAndRestoreFocus() CodeCompleteWindow::CodeCompleteWindow( EditorWindow* pPar ) : Window( pPar ), pParent( pPar ), -pListBox( new CodeCompleteListBox(this) ) +pListBox( VclPtr::Create(this) ) { SetS
[Libreoffice-commits] core.git: Branch 'feature/vclptr' - compilerplugins/clang
compilerplugins/clang/vclwidgets.cxx | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) New commits: commit e0686cb7564eb2eeab62ac35a2a36da8f83ed90a Author: Noel Grandin Date: Fri Apr 17 09:59:18 2015 +0200 workaround ErrorContextImpl in vclwidget clang plugin Change-Id: I6c0265f33a88169708d0812639169b665a95fc1f diff --git a/compilerplugins/clang/vclwidgets.cxx b/compilerplugins/clang/vclwidgets.cxx index 2c171d0..e12e957 100644 --- a/compilerplugins/clang/vclwidgets.cxx +++ b/compilerplugins/clang/vclwidgets.cxx @@ -265,13 +265,17 @@ bool VCLWidgets::VisitFieldDecl(const FieldDecl * fieldDecl) { if (fieldDecl->isBitField()) { return true; } +const CXXRecordDecl *pParentRecordDecl = dyn_cast(fieldDecl->getParent()); if (containsWindowSubclass(fieldDecl->getType())) { -report( -DiagnosticsEngine::Warning, -"OutputDevice subclass declared as a pointer field, should be wrapped in VclPtr." + fieldDecl->getType().getAsString(), -fieldDecl->getLocation()) - << fieldDecl->getSourceRange(); -return true; +// have to ignore this for now, nasty reverse dependency from tools->vcl +if (!(pParentRecordDecl != nullptr && pParentRecordDecl->getQualifiedNameAsString() == "ErrorContextImpl")) { +report( +DiagnosticsEngine::Warning, +"OutputDevice subclass declared as a pointer field, should be wrapped in VclPtr." + fieldDecl->getType().getAsString(), +fieldDecl->getLocation()) + << fieldDecl->getSourceRange(); +return true; + } } const RecordType *recordType = fieldDecl->getType()->getAs(); if (recordType == nullptr) { @@ -292,7 +296,6 @@ bool VCLWidgets::VisitFieldDecl(const FieldDecl * fieldDecl) { } // If this field is a VclPtr field, then the class MUST have a dispose method -const CXXRecordDecl *pParentRecordDecl = dyn_cast(fieldDecl->getParent()); if (pParentRecordDecl && isDerivedFromWindow(pParentRecordDecl) && startsWith(recordDecl->getQualifiedNameAsString(), "VclPtr")) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - instsetoo_native/util sw/qa writerfilter/source
instsetoo_native/util/openoffice.lst.in|4 ++-- sw/qa/extras/rtfimport/data/tdf86182.rtf |4 sw/qa/extras/rtfimport/rtfimport.cxx |7 +++ writerfilter/source/rtftok/rtfdocumentimpl.cxx |2 +- 4 files changed, 14 insertions(+), 3 deletions(-) New commits: commit 06a2e00c1a3c00cb40700f61f7cd61ac6681a7c3 Author: Miklos Vajna Date: Fri Apr 17 11:32:10 2015 +0200 instsetoo_native: also keep profile at 4 here Change-Id: I29f7efd065805b12199b8a6a3aadcf62cdcecee7 diff --git a/instsetoo_native/util/openoffice.lst.in b/instsetoo_native/util/openoffice.lst.in index fc2e98b..46176a9 100644 --- a/instsetoo_native/util/openoffice.lst.in +++ b/instsetoo_native/util/openoffice.lst.in @@ -51,7 +51,7 @@ LibreOffice POSTVERSIONEXTENSION BUNDLEIDENTIFIER @MACOSX_BUNDLE_IDENTIFIER@ BRANDPACKAGEVERSION @LIBO_VERSION_MAJOR@.@LIBO_VERSION_MINOR@ -USERDIRPRODUCTVERSION @LIBO_VERSION_MAJOR@ +USERDIRPRODUCTVERSION 4 ABOUTBOXPRODUCTVERSION @LIBO_VERSION_MAJOR@.@LIBO_VERSION_MINOR@.@LIBO_VERSION_MICRO@.@LIBO_VERSION_PATCH@@LIBO_VERSION_SUFFIX@ ABOUTBOXPRODUCTVERSIONSUFFIX @LIBO_VERSION_SUFFIX_SUFFIX@ BASEPRODUCTVERSION @LIBO_VERSION_MAJOR@.@LIBO_VERSION_MINOR@ @@ -98,7 +98,7 @@ LibreOffice_Dev POSTVERSIONEXTENSION BUNDLEIDENTIFIER @MACOSX_BUNDLE_IDENTIFIER@ BRANDPACKAGEVERSION @LIBO_VERSION_MAJOR@.@LIBO_VERSION_MINOR@ -USERDIRPRODUCTVERSION @LIBO_VERSION_MAJOR@ +USERDIRPRODUCTVERSION 4 ABOUTBOXPRODUCTVERSION @LIBO_VERSION_MAJOR@.@LIBO_VERSION_MINOR@.@LIBO_VERSION_MICRO@.@LIBO_VERSION_PATCH@@LIBO_VERSION_SUFFIX@ ABOUTBOXPRODUCTVERSIONSUFFIX @LIBO_VERSION_SUFFIX_SUFFIX@ BASEPRODUCTVERSION @LIBO_VERSION_MAJOR@.@LIBO_VERSION_MINOR@ commit 4ee2a882dddb395a816cd54004b634d57cfb2446 Author: Miklos Vajna Date: Fri Apr 17 10:44:47 2015 +0200 tdf#86182 RTF import: fix handling of \rtlpar Commit 558d5c25a0b1d6a937d33291a4b6cd7fca6cb15b (implement RTF_LTRPAR and RTF_RTLPAR, 2011-06-09) was just a guess, this one is the proper mapping. Change-Id: I1156ef5ddc34264d761d3e64dd0537bc6ec0ced7 diff --git a/sw/qa/extras/rtfimport/data/tdf86182.rtf b/sw/qa/extras/rtfimport/data/tdf86182.rtf new file mode 100644 index 000..d63c489 --- /dev/null +++ b/sw/qa/extras/rtfimport/data/tdf86182.rtf @@ -0,0 +1,4 @@ +{\rtf1 +\rtlpar +\u1662\'3f\u1587\'3f +\par} diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx index c579403..f4c14c7 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -46,6 +46,7 @@ #include #include #include +#include #include #include @@ -2238,6 +2239,12 @@ DECLARE_RTFIMPORT_TEST(mathtype, "mathtype.rtf") CPPUNIT_ASSERT(!aFormula.isEmpty()); } +DECLARE_RTFIMPORT_TEST(testTdf86182, "tdf86182.rtf") +{ +// Writing mode was the default, i.e. text::WritingMode2::CONTEXT. +CPPUNIT_ASSERT_EQUAL(text::WritingMode2::RL_TB, getProperty(getParagraph(1), "WritingMode")); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 8550613..4965e13 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -3021,7 +3021,7 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword) case RTF_RTLPAR: { auto pValue = std::make_shared(nKeyword == RTF_LTRPAR ? 0 : 1); - m_aStates.top().aParagraphSprms.set(NS_ooxml::LN_CT_PPrBase_textDirection, pValue); +m_aStates.top().aParagraphSprms.set(NS_ooxml::LN_CT_PPrBase_bidi, pValue); } break; case RTF_LTRROW: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
Crash test update
New crashtest update available at http://dev-builds.libreoffice.org/crashtest/468aaa1bcf96c86c4a33b5dcd0aabb41e14b042d/ exportCrashes.csv Description: Binary data importCrash.csv Description: Binary data validationErrors.csv Description: Binary data ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: Branch 'feature/vclptr' - desktop/source
desktop/source/deployment/gui/dp_gui_dialog2.cxx |6 +++--- desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx |8 +++- desktop/source/deployment/gui/dp_gui_extlistbox.cxx|4 ++-- desktop/source/deployment/gui/dp_gui_service.cxx |5 ++--- desktop/source/deployment/gui/dp_gui_theextmgr.cxx |4 ++-- desktop/source/deployment/gui/dp_gui_updatedialog.cxx |2 +- desktop/source/deployment/gui/license_dialog.cxx |3 ++- desktop/source/splash/splash.cxx |2 +- 8 files changed, 16 insertions(+), 18 deletions(-) New commits: commit 0703fc22519b391cece54f9d67012cffd9867765 Author: Michael Meeks Date: Fri Apr 17 11:22:09 2015 +0100 desktop: convert new to ::Create. Change-Id: I114ab23302970ce0abe551ffd693e92b0f4ae8c5 diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx index 1313475..63d0986 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx @@ -166,9 +166,9 @@ void ExtBoxWithBtns_Impl::InitFromDialog(ExtMgrDialog *pParentDialog) m_pParent = pParentDialog; -m_pOptionsBtn = new PushButton( this, WB_TABSTOP ); -m_pEnableBtn = new PushButton( this, WB_TABSTOP ); -m_pRemoveBtn = new PushButton( this, WB_TABSTOP ); +m_pOptionsBtn = VclPtr::Create( this, WB_TABSTOP ); +m_pEnableBtn = VclPtr::Create( this, WB_TABSTOP ); +m_pRemoveBtn = VclPtr::Create( this, WB_TABSTOP ); SetHelpId( HID_EXTENSION_MANAGER_LISTBOX ); m_pOptionsBtn->SetHelpId( HID_EXTENSION_MANAGER_LISTBOX_OPTIONS ); diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx index 1b2136d..29d3c90 100644 --- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx +++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx @@ -814,7 +814,7 @@ void ExtensionCmdQueue::Thread::execute() const SolarMutexGuard guard; ScopedVclPtr box( -new MessageDialog(currentCmdEnv->activeDialog(), msg)); + VclPtr::Create(currentCmdEnv->activeDialog(), msg)); if ( m_pDialogHelper ) box->SetText( m_pDialogHelper->getWindow()->GetText() ); box->Execute(); @@ -923,12 +923,10 @@ void ExtensionCmdQueue::Thread::_removeExtension( ::rtl::Reference< ProgressCmdE void ExtensionCmdQueue::Thread::_checkForUpdates( const std::vector > &vExtensionList ) { -ScopedVclPtr pUpdateDialog; -std::vector< UpdateData > vData; - const SolarMutexGuard guard; -pUpdateDialog = new UpdateDialog( m_xContext, m_pDialogHelper? m_pDialogHelper->getWindow() : NULL, vExtensionList, &vData ); +std::vector< UpdateData > vData; +ScopedVclPtrInstance pUpdateDialog( m_xContext, m_pDialogHelper? m_pDialogHelper->getWindow() : nullptr, vExtensionList, &vData ); pUpdateDialog->notifyMenubar( true, false ); // prepare the checking, if there updates to be notified via menu bar icon diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx index 6eef818..50d5156 100644 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx @@ -201,7 +201,7 @@ void ExtensionBox_Impl::Init() { SetHelpId( HID_EXTENSION_MANAGER_LISTBOX ); -m_pScrollBar = new ScrollBar( this, WB_VERT ); +m_pScrollBar = VclPtr::Create( this, WB_VERT ); m_pScrollBar->SetScrollHdl( LINK( this, ExtensionBox_Impl, ScrollHdl ) ); m_pScrollBar->EnableDrag(); @@ -544,7 +544,7 @@ void ExtensionBox_Impl::DrawRow( const Rectangle& rRect, const TEntry_Impl& rEnt // Init publisher link here if ( !rEntry->m_pPublisher && !rEntry->m_sPublisher.isEmpty() ) { -rEntry->m_pPublisher = new FixedHyperlink( this ); +rEntry->m_pPublisher = VclPtr::Create( this ); rEntry->m_pPublisher->SetBackground(); rEntry->m_pPublisher->SetPaintTransparent( true ); rEntry->m_pPublisher->SetURL( rEntry->m_sPublisherURL ); diff --git a/desktop/source/deployment/gui/dp_gui_service.cxx b/desktop/source/deployment/gui/dp_gui_service.cxx index badb58f..f07042d 100644 --- a/desktop/source/deployment/gui/dp_gui_service.cxx +++ b/desktop/source/deployment/gui/dp_gui_service.cxx @@ -223,9 +223,8 @@ void ServiceImpl::startExecuteModal( catch (const Exception & exc) { if (bAppUp) { const SolarMutexGuard guard; -VclPtr box( -new MessageDialog(Application::GetActiveTopWindow(), - exc.Message)); +ScopedVclPtrInstance box( +Application::GetActiveTopWindow(), exc.Message); box-
[Libreoffice-commits] core.git: 2 commits - framework/source sw/source
framework/source/layoutmanager/layoutmanager.cxx |8 ++-- sw/source/uibase/app/docsh.cxx |3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) New commits: commit 5ed0006b385849896d399241639cc8883e9bca47 Author: László Németh Date: Fri Apr 17 11:38:19 2015 +0200 Don't enable toolbar layout manager using LibreOfficeKit LibreOfficeKit doesn't need ToolbarLayoutManager. Change-Id: I10ec8733448407b0a93ca63e444f914f05410eff diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index e8b5d51..1b173e3 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -60,6 +60,7 @@ #include #include +#include #include #include #include @@ -139,8 +140,11 @@ LayoutManager::LayoutManager( const Reference< XComponentContext >& xContext ) : m_aStatusBarElement.m_aType = "statusbar"; m_aStatusBarElement.m_aName = STATUS_BAR_ALIAS; -m_pToolbarManager = new ToolbarLayoutManager( xContext, Reference(m_xUIElementFactoryManager, UNO_QUERY_THROW), this ); -m_xToolbarManager = uno::Reference< ui::XUIConfigurationListener >( static_cast< OWeakObject* >( m_pToolbarManager ), uno::UNO_QUERY ); +if (!comphelper::LibreOfficeKit::isActive()) +{ +m_pToolbarManager = new ToolbarLayoutManager( xContext, Reference(m_xUIElementFactoryManager, UNO_QUERY_THROW), this ); +m_xToolbarManager = uno::Reference< ui::XUIConfigurationListener >( static_cast< OWeakObject* >( m_pToolbarManager ), uno::UNO_QUERY ); +} Application::AddEventListener( LINK( this, LayoutManager, SettingsChanged ) ); commit 21a9ddbc1c69f57dec7944dc7751b5377e9c50ff Author: László Németh Date: Fri Apr 17 11:26:26 2015 +0200 Writer export: don't update doc stat using SkipImages to speed up text extraction Change-Id: Ifa81483f537c8a79326c40fb610201f0bbbcc97a diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx index aadb707..c364136 100644 --- a/sw/source/uibase/app/docsh.cxx +++ b/sw/source/uibase/app/docsh.cxx @@ -589,7 +589,8 @@ bool SwDocShell::ConvertTo( SfxMedium& rMedium ) } // #i76360# Update document statistics -m_pDoc->getIDocumentStatistics().UpdateDocStat( false, true ); +if ( !rMedium.IsSkipImages() ) +m_pDoc->getIDocumentStatistics().UpdateDocStat( false, true ); CalcLayoutForOLEObjects(); // format for OLE objets // #i62875# ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/source
sc/source/ui/view/drawview.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 004381ddff4e926972a7a9d14915bb2f4638b1e5 Author: Noel Power Date: Thu Apr 16 19:07:29 2015 +0100 fix for fdo#70886 detective shape thingies set an anchor (with an invalid start address) no idea why, it seems intentional (for the case where the dependant stuff is on another tab) This screws up the alignment for zoom logic Change-Id: I0f2356da69caf705003e81c4f8020c466e031d69 Signed-off-by: Noel Power diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx index 498b5cc..afa14e1 100644 --- a/sc/source/ui/view/drawview.cxx +++ b/sc/source/ui/view/drawview.cxx @@ -910,7 +910,7 @@ void ScDrawView::SyncForGrid( SdrObject* pObj ) if ( pGridWin ) { ScAddress aOldStt; -if( pData ) +if( pData && pData->maStart.IsValid()) { aOldStt = pData->maStart; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/vclptr' - chart2/source dbaccess/source extensions/source filter/source include/svtools svtools/source svx/source
chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx |4 ++-- chart2/source/controller/inc/dlg_ChartType_UNO.hxx |2 +- dbaccess/source/ext/macromigration/macromigrationwizard.cxx |6 +++--- dbaccess/source/ui/inc/unosqlmessage.hxx|2 +- dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx |7 +++ dbaccess/source/ui/uno/DBTypeWizDlg.cxx |5 ++--- dbaccess/source/ui/uno/DBTypeWizDlg.hxx |2 +- dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx|4 ++-- dbaccess/source/ui/uno/DBTypeWizDlgSetup.hxx|2 +- dbaccess/source/ui/uno/TableFilterDlg.cxx |5 ++--- dbaccess/source/ui/uno/TableFilterDlg.hxx |2 +- dbaccess/source/ui/uno/UserSettingsDlg.cxx |5 ++--- dbaccess/source/ui/uno/UserSettingsDlg.hxx |2 +- dbaccess/source/ui/uno/admindlg.cxx |5 ++--- dbaccess/source/ui/uno/admindlg.hxx |2 +- dbaccess/source/ui/uno/composerdialogs.cxx | 10 +- dbaccess/source/ui/uno/composerdialogs.hxx |8 dbaccess/source/ui/uno/copytablewizard.cxx |6 +++--- dbaccess/source/ui/uno/textconnectionsettings_uno.cxx |6 +++--- dbaccess/source/ui/uno/unoDirectSql.cxx |4 ++-- dbaccess/source/ui/uno/unoDirectSql.hxx |2 +- dbaccess/source/ui/uno/unosqlmessage.cxx|6 +++--- extensions/source/abpilot/unodialogabp.cxx |4 ++-- extensions/source/abpilot/unodialogabp.hxx |2 +- extensions/source/dbpilots/unoautopilot.hxx |2 +- extensions/source/dbpilots/unoautopilot.inl |4 ++-- extensions/source/propctrlr/MasterDetailLinkDialog.cxx |4 ++-- extensions/source/propctrlr/MasterDetailLinkDialog.hxx |2 +- extensions/source/propctrlr/controlfontdialog.cxx |5 ++--- extensions/source/propctrlr/controlfontdialog.hxx |2 +- extensions/source/propctrlr/pcrunodialogs.cxx |4 ++-- extensions/source/propctrlr/pcrunodialogs.hxx |2 +- filter/source/flash/swfdialog.cxx |7 +++ filter/source/flash/swfdialog.hxx |2 +- filter/source/pdf/pdfdialog.cxx | 12 +++- filter/source/pdf/pdfdialog.hxx |2 +- filter/source/svg/svgdialog.cxx |9 + filter/source/svg/svgdialog.hxx |2 +- include/svtools/genericunodialog.hxx|2 +- svtools/source/uno/addrtempuno.cxx |8 svtools/source/uno/genericunodialog.cxx |2 +- svtools/source/uno/wizard/unowizard.cxx |8 svx/source/form/xfm_addcondition.cxx|4 ++-- svx/source/inc/xfm_addcondition.hxx |2 +- 44 files changed, 88 insertions(+), 100 deletions(-) New commits: commit 0a497cb52a2ffecd94178eed296ba8ae7f526358 Author: Michael Meeks Date: Fri Apr 17 12:10:27 2015 +0100 Use VclPtr for OGenericUnoDialog::createDialog. Change-Id: I0c2040889931a4700735339c5252f8d5fee234ff diff --git a/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx b/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx index ee3d904..b6145c9 100644 --- a/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx +++ b/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx @@ -79,9 +79,9 @@ void ChartTypeUnoDlg::implInitialize(const uno::Any& _rValue) else ChartTypeUnoDlg_BASE::implInitialize(_rValue); } -Dialog* ChartTypeUnoDlg::createDialog(vcl::Window* _pParent) +VclPtr ChartTypeUnoDlg::createDialog(vcl::Window* _pParent) { -return new ChartTypeDialog( _pParent, m_xChartModel, m_aContext ); +return VclPtr::Create( _pParent, m_xChartModel, m_aContext ); } uno::Reference SAL_CALL ChartTypeUnoDlg::getPropertySetInfo() throw(uno::RuntimeException, std::exception) { diff --git a/chart2/source/controller/inc/dlg_ChartType_UNO.hxx b/chart2/source/controller/inc/dlg_ChartType_UNO.hxx index 95dc944..f91d222 100644 --- a/chart2/source/controller/inc/dlg_ChartType_UNO.hxx +++ b/chart2/source/controller/inc/dlg_ChartType_UNO.hxx @@ -44,7 +44,7 @@ private: // OGenericUnoDialog overridables virtual void implInitialize(const com::sun::star::uno::Any& _rValue) SAL_OVERRIDE; -virtual Dialog* createDialog(vcl::Window* _pParent) SAL_OVERRIDE; +virtual VclPtr createDialog(vcl::Window* _pParent) SAL_OVERRIDE; // XTypeProvider virtual com::sun::star::uno::Sequence SAL_CALL getImplementationId( ) throw(com:
VclPtr bits ...
Hi guys, As I mentioned in the ESC call, this is approaching merge-ability hopefully before Alpha 1, possibly afterwards work on feature/vclptr vs. a reasonably recent master as of last week or so. I append the new README.lifecycle from vcl/ - not everything is as obvious as it could be in a perfect world, but hopefully it de-tangles our VCL lifecycle in a helpful way, and one that we can build on in future =) ATB, Michael. ** Understanding transitional VCL lifecycle ** -- How it used to look -- All VCL classes were explicitly lifecycle managed; so you would do: Dialog aDialog(...); // old - on stack allocation aDialog.Execute(...); or: Dialog *pDialog = new Dialog(...); // old - manual heap allocation pDialog->Execute(...); delete pDialog; or: boost::shared_ptr xDialog(new pDialog()); // old xDialog->Execute(...); // depending who shared the ptr this would be freed sometime In several cases this lead to rather unpleasant code, when various shared_ptr wrappers were used, the lifecycle was far less than obvious. Where controls were wrapped by other ref-counted classes - such as UNO interfaces, which were also used by native Window pointers, the lifecycle became extremely opaque. In addition VCL had significant issues with re-enterancy and event emission - adding various means such as DogTags to try to detect destruction of a window between calls: ImplDelData aDogTag( this );// 'orrible old code Show( true, SHOW_NOACTIVATE ); if( !aDogTag.IsDead() ) // did 'this' go invalid yet ? Update(); Unfortunately use of such protection is/was ad-hoc, and far from uniform, despite the prevelance of such potential problems. When a lifecycle problem was hit, typically it would take the form of accessing memory that had been freed, and contained garbage due to lingering pointers to freed objects. -- Where we are now: -- To fix this situation we now have a VclPtr - which is a smart reference-counting pointer (include/vcl/vclptr.hxx) which is designed to look and behave -very- much like a normal pointer to reduce code-thrash. VclPtr is used to wrap all OutputDevice derived classes thus: VclPtr pDialog( new Dialog( ... ), SAL_NO_ACQUIRE ); ... pDialog.disposeAndClear(); However - while the VclPtr reference count controls the lifecycle of the Dialog object, it is necessary to be able to break reference count cycles. These are extremely common in widget hierarchies as each widget holds (smart) pointers to its parents and also its children. Thus - all previous 'delete' calls are replaced with 'dispose' method calls: ** What is dispose ? Dispose is defined to be a method that releases all references that an object holds - thus allowing their underlying resources to be released. However - in this specific case it also releases all backing graphical resources. In practical terms, all destructor functionality has been moved into 'dispose' methods, in order to provide a minimal initial behavioral change. As such a VclPtr can have three states: VclPtr pButton; ... assert (pButton == nullptr || !pButton);// null assert (pButton && !pButton->IsDisposed()); // alive assert (pButton && pButton->IsDisposed()); // disposed ** ScopedVclPtr - making disposes easier While replacing existing code with new, it can be a bit tiresome to have to manually add 'disposeAndClear()' calls to VclPtr<> instances. Luckily it is easy to avoid that with a ScopedVclPtr which does this for you when it goes out of scope. ** One extra gotcha - an initial reference-count of 1 In the normal world of love and sanity, eg. creating UNO objects, the objects start with a ref-count of zero. Thus the first reference is always taken after construction by the surrounding smart pointer. Unfortunately, the existing VCL code is somewhat tortured, and does a lot of reference and de-reference action on the class -during- construction. This forces us to construct with a reference of 1 - and to hand that into the initial smart pointer with a SAL_NO_ACQUIRE. To make this easier, we have 'Instance' template wrappers that make this apparently easier, by constructing the pointer for you. ** How does my familiar code change ? Lets tweak the exemplary code above to fit the new model: - Dialog aDialog(... dialog params ... ); - aDialog.Execute(...); + ScopedVclPtrInstance pDialog(... dialog params ... ); + pDialog->Execute(...); // VclPtr behaves
[Libreoffice-commits] core.git: Branch 'feature/vclptr' - include/vcl sw/source
include/vcl/vclptr.hxx | 12 +++- sw/source/uibase/sidebar/PageColumnControl.cxx |2 +- sw/source/uibase/sidebar/PageMarginControl.cxx | 24 sw/source/uibase/sidebar/PagePropertyPanel.cxx | 22 +- sw/source/uibase/sidebar/PagePropertyPanel.hxx | 10 +- sw/source/uibase/sidebar/PageSizeControl.cxx |4 ++-- sw/source/uibase/sidebar/WrapPropertyPanel.cxx |3 ++- sw/source/uibase/sidebar/WrapPropertyPanel.hxx |5 ++--- sw/source/uibase/uiview/pview.cxx |6 +++--- sw/source/uibase/uiview/srcview.cxx|2 +- sw/source/uibase/uiview/view.cxx |8 sw/source/uibase/uiview/viewling.cxx |4 ++-- sw/source/uibase/uiview/viewmdi.cxx|2 +- sw/source/uibase/utlui/condedit.cxx|6 -- sw/source/uibase/utlui/navipi.cxx | 14 +++--- sw/source/uibase/utlui/numfmtlb.cxx| 19 --- sw/source/uibase/utlui/unotools.cxx|2 +- 17 files changed, 67 insertions(+), 78 deletions(-) New commits: commit a3525585f10ff39b9aae14d7506e94cf77542c14 Author: Noel Grandin Date: Fri Apr 17 13:14:20 2015 +0200 sw: convert new to ::Create. Change-Id: I937aa67ee4a3b07bd180d3c665245ea08b92 diff --git a/include/vcl/vclptr.hxx b/include/vcl/vclptr.hxx index d97124d..5ad0bda 100644 --- a/include/vcl/vclptr.hxx +++ b/include/vcl/vclptr.hxx @@ -23,6 +23,7 @@ #include #include #include +#include /// @cond INTERNAL namespace vcl { namespace detail { @@ -165,7 +166,16 @@ public: m_rInnerRef.set(pBody); } -inline VclPtr& SAL_CALL operator= (reference_type * pBody) +/** Up-casting conversion constructor: Copies interface reference. + +Does not work for up-casts to ambiguous bases. For the special case of +up-casting to Reference< XInterface >, see the corresponding conversion +operator. + +@param rRef another reference +*/ +template< class derived_type, class = typename std::enable_if< ::vcl::detail::UpCast< reference_type, derived_type >::t >::type > +inline VclPtr& SAL_CALL operator= (derived_type * pBody) { m_rInnerRef.set(pBody); return *this; diff --git a/sw/source/uibase/sidebar/PageColumnControl.cxx b/sw/source/uibase/sidebar/PageColumnControl.cxx index 23676cb..39b6757 100644 --- a/sw/source/uibase/sidebar/PageColumnControl.cxx +++ b/sw/source/uibase/sidebar/PageColumnControl.cxx @@ -38,7 +38,7 @@ PageColumnControl::PageColumnControl( const bool bLandscape ) : ::svx::sidebar::PopupControl( pParent, SW_RES(RID_POPUP_SWPAGE_COLUMN) ) , mpColumnValueSet( new ::svx::sidebar::ValueSetWithTextControl( ::svx::sidebar::ValueSetWithTextControl::IMAGE_TEXT, this, SW_RES(VS_COLUMN) ) ) -, maMoreButton( new PushButton( this, SW_RES(CB_COLUMN_MORE) ) ) +, maMoreButton( VclPtr::Create( this, SW_RES(CB_COLUMN_MORE) ) ) , mnColumnType( nColumnType ) , mrPagePropPanel(rPanel) { diff --git a/sw/source/uibase/sidebar/PageMarginControl.cxx b/sw/source/uibase/sidebar/PageMarginControl.cxx index e01c373..6479a7f 100644 --- a/sw/source/uibase/sidebar/PageMarginControl.cxx +++ b/sw/source/uibase/sidebar/PageMarginControl.cxx @@ -50,18 +50,18 @@ PageMarginControl::PageMarginControl( const SfxMapUnit eUnit ) : ::svx::sidebar::PopupControl( pParent, SW_RES(RID_POPUP_SWPAGE_MARGIN) ) , mpMarginValueSet( new ::svx::sidebar::ValueSetWithTextControl( ::svx::sidebar::ValueSetWithTextControl::IMAGE_TEXT, this, SW_RES(VS_MARGIN) ) ) -, maCustom(new FixedText(this, SW_RES(FT_CUSTOM))) -, maLeft(new FixedText(this, SW_RES(FT_LEFT))) -, maInner(new FixedText(this, SW_RES(FT_INNER))) -, maLeftMarginEdit(new MetricField(this, SW_RES(MF_SWLEFT_MARGIN))) -, maRight(new FixedText(this, SW_RES(FT_RIGHT))) -, maOuter(new FixedText(this, SW_RES(FT_OUTER))) -, maRightMarginEdit(new MetricField(this, SW_RES(MF_SWRIGHT_MARGIN))) -, maTop(new FixedText(this, SW_RES(FT_TOP))) -, maTopMarginEdit(new MetricField(this, SW_RES(MF_SWTOP_MARGIN))) -, maBottom(new FixedText(this, SW_RES(FT_BOTTOM))) -, maBottomMarginEdit(new MetricField(this, SW_RES(MF_SWBOTTOM_MARGIN))) -, maWidthHeightField(new MetricField( this, SW_RES(FLD_WIDTH_HEIGHT) ) ) +, maCustom(VclPtr::Create(this, SW_RES(FT_CUSTOM))) +, maLeft(VclPtr::Create(this, SW_RES(FT_LEFT))) +, maInner(VclPtr::Create(this, SW_RES(FT_INNER))) +, maLeftMarginEdit(VclPtr::Create(this, SW_RES(MF_SWLEFT_MARGIN))) +, maRight(VclPtr::Create(this, SW_RES(FT_RIGHT))) +, maOuter(VclPtr::Create(this, SW_RES(FT_OUTER))) +, maRightMarginEdit(VclPtr::Create(this, SW_RES(MF_SWRIGHT_MARGIN))) +, maTop(VclPtr::Create(this, SW_RES(FT_TOP))) +, maTopMarginEdit(VclPtr::Create(this, SW_RES(MF_SWTOP_MARGIN))) +, maBottom(VclPtr::Cr
[Libreoffice-commits] core.git: Branch 'feature/vclptr' - filter/source
filter/source/graphicfilter/ios2met/ios2met.cxx |2 +- filter/source/graphicfilter/ipict/ipict.cxx |2 +- filter/source/svg/impsvgdialog.cxx| 14 +++--- filter/source/xsltdialog/xmlfilterdialogcomponent.cxx |2 +- filter/source/xsltdialog/xmlfiltersettingsdialog.cxx |6 +++--- filter/source/xsltdialog/xmlfiltertabdialog.cxx |4 ++-- 6 files changed, 15 insertions(+), 15 deletions(-) New commits: commit 9e43761446db5b085dbabea5df00f6fc253167ac Author: Michael Meeks Date: Fri Apr 17 12:19:15 2015 +0100 filter: convert new to ::Create. Change-Id: I6cea3011ff3c89c95fa19cc4264b43779aa0e0a9 diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx index 9e8b894..cecaf1f 100644 --- a/filter/source/graphicfilter/ios2met/ios2met.cxx +++ b/filter/source/graphicfilter/ios2met/ios2met.cxx @@ -2609,7 +2609,7 @@ void OS2METReader::ReadOS2MET( SvStream & rStreamOS2MET, GDIMetaFile & rGDIMetaF pOrdFile=NULL; -pVirDev = new VirtualDevice(); +pVirDev = VclPtr::Create(); pVirDev->EnableOutput(false); rGDIMetaFile.Record(pVirDev); diff --git a/filter/source/graphicfilter/ipict/ipict.cxx b/filter/source/graphicfilter/ipict/ipict.cxx index a578272..f88fff3 100644 --- a/filter/source/graphicfilter/ipict/ipict.cxx +++ b/filter/source/graphicfilter/ipict/ipict.cxx @@ -1881,7 +1881,7 @@ void PictReader::ReadPict( SvStream & rStreamPict, GDIMetaFile & rGDIMetaFile ) aHRes = aVRes = Fraction( 1, 1 ); -pVirDev = new VirtualDevice(); +pVirDev = VclPtr::Create(); pVirDev->EnableOutput(false); rGDIMetaFile.Record(pVirDev); diff --git a/filter/source/svg/impsvgdialog.cxx b/filter/source/svg/impsvgdialog.cxx index c142178..2e70390 100644 --- a/filter/source/svg/impsvgdialog.cxx +++ b/filter/source/svg/impsvgdialog.cxx @@ -36,13 +36,13 @@ inline sal_Int32 implMap( vcl::Window& /*rWnd*/, sal_Int32 nVal ) ImpSVGDialog::ImpSVGDialog( vcl::Window* pParent, Sequence< PropertyValue >& rFilterData ) : ModalDialog( pParent ), -maFI( new FixedLine(this) ), -maCBTinyProfile( new CheckBox(this) ), -maCBEmbedFonts( new CheckBox(this) ), -maCBUseNativeDecoration( new CheckBox(this) ), -maBTOK( new OKButton(this, WB_DEF_OK) ), -maBTCancel( new CancelButton(this) ), -maBTHelp( new HelpButton(this) ), +maFI( VclPtr::Create(this) ), +maCBTinyProfile( VclPtr::Create(this) ), +maCBEmbedFonts( VclPtr::Create(this) ), +maCBUseNativeDecoration( VclPtr::Create(this) ), +maBTOK( VclPtr::Create(this, WB_DEF_OK) ), +maBTCancel( VclPtr::Create(this) ), +maBTHelp( VclPtr::Create(this) ), maConfigItem( SVG_EXPORTFILTER_CONFIGPATH, &rFilterData ), mbOldNativeDecoration( false ) { diff --git a/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx b/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx index 9ff555c..2ee2058 100644 --- a/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx +++ b/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx @@ -331,7 +331,7 @@ sal_Int16 SAL_CALL XMLFilterDialogComponent::execute( ) throw(RuntimeException, pParent = VCLUnoHelper::GetWindow(mxParent); Reference< XComponent > xComp( this ); -mpDialog = new XMLFilterSettingsDialog(pParent, mxContext); +mpDialog = VclPtr::Create(pParent, mxContext); mpDialog->Execute(); } else if( !mpDialog->IsVisible() ) diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx index a5597e5..514d337f 100644 --- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx @@ -1356,12 +1356,12 @@ SvxPathControl::SvxPathControl(vcl::Window* pParent) : Window(pParent, WB_HIDE | WB_CLIPCHILDREN | WB_TABSTOP | WB_DIALOGCONTROL | WB_BORDER) , bHasBeenShown(false) { -m_pVBox = new VclVBox(this); +m_pVBox = VclPtr::Create(this); -m_pHeaderBar = new HeaderBar(m_pVBox, WB_BOTTOMBORDER); +m_pHeaderBar = VclPtr::Create(m_pVBox, WB_BOTTOMBORDER); m_pHeaderBar->set_height_request(GetTextHeight() + 6); -m_pFocusCtrl = new XMLFilterListBox(m_pVBox, this); +m_pFocusCtrl = VclPtr::Create(m_pVBox, this); m_pFocusCtrl->set_fill(true); m_pFocusCtrl->set_expand(true); diff --git a/filter/source/xsltdialog/xmlfiltertabdialog.cxx b/filter/source/xsltdialog/xmlfiltertabdialog.cxx index eb1eae8..ff725cc 100644 --- a/filter/source/xsltdialog/xmlfiltertabdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltertabdialog.cxx @@ -56,13 +56,13 @@ XMLFilterTabDialog::XMLFilterTabDialog(vcl::Window *pParent, ResMgr& rResMgr, m_pTabCtrl->SetActivatePageHdl( LINK( this, XMLFilterTabDialog, ActivatePageHdl ) ); m_pTabCtrl->SetDeactivatePageHdl( LINK( this, XMLFilterTabDialog, DeactivatePageHdl ) ); -mpBasicPag
[Libreoffice-commits] core.git: 2 commits - include/svx sw/source
include/svx/e3ditem.hxx |2 +- include/svx/e3dsceneupdater.hxx |2 +- include/svx/e3dundo.hxx |6 +++--- include/svx/extedit.hxx |4 ++-- include/svx/extrud3d.hxx |2 +- include/svx/extrusionbar.hxx |2 +- sw/source/filter/ww8/WW8TableInfo.hxx |2 +- 7 files changed, 10 insertions(+), 10 deletions(-) New commits: commit 06a9243ff34f0666141c9eabb322a2eedb4c331a Author: Caolán McNamara Date: Fri Apr 17 12:16:17 2015 +0100 it has always been the case that RowSpans are signed we just get away with this because we cast it to signed before use in ww8 Change-Id: I646ea3a0eb84923dd9835f18356d67f4f72ba18d diff --git a/sw/source/filter/ww8/WW8TableInfo.hxx b/sw/source/filter/ww8/WW8TableInfo.hxx index 34d56b3..ab5ff6c 100644 --- a/sw/source/filter/ww8/WW8TableInfo.hxx +++ b/sw/source/filter/ww8/WW8TableInfo.hxx @@ -44,7 +44,7 @@ typedef ::std::vector TableBoxVector; typedef boost::shared_ptr TableBoxVectorPtr; typedef ::std::vector GridCols; typedef boost::shared_ptr GridColsPtr; -typedef ::std::vector RowSpans; +typedef ::std::vector RowSpans; typedef boost::shared_ptr RowSpansPtr; typedef ::std::vector Widths; typedef boost::shared_ptr WidthsPtr; commit 350f11a8bd089698e004e0f288417108131ce74e Author: Caolán McNamara Date: Thu Apr 16 09:44:09 2015 +0100 add some SAL_WARN_UNUSED Change-Id: I41ba1bed4f49a122a15213edf41e094254bfb282 diff --git a/include/svx/e3ditem.hxx b/include/svx/e3ditem.hxx index 6b4c8ff..15dd162 100644 --- a/include/svx/e3ditem.hxx +++ b/include/svx/e3ditem.hxx @@ -26,7 +26,7 @@ class SvStream; -class SVX_DLLPUBLIC SvxB3DVectorItem : public SfxPoolItem +class SVX_DLLPUBLIC SAL_WARN_UNUSED SvxB3DVectorItem : public SfxPoolItem { basegfx::B3DVector aVal; diff --git a/include/svx/e3dsceneupdater.hxx b/include/svx/e3dsceneupdater.hxx index 54e5dcc..3208eb8 100644 --- a/include/svx/e3dsceneupdater.hxx +++ b/include/svx/e3dsceneupdater.hxx @@ -42,7 +42,7 @@ namespace drawinglayer { namespace geometry { // 3D content and tu use it. This is only wanted if changes to the scene's // content are intended to change the scene's 2D geometry attributes -class SVX_DLLPUBLIC E3DModifySceneSnapRectUpdater +class SVX_DLLPUBLIC SAL_WARN_UNUSED E3DModifySceneSnapRectUpdater { // the scene which may be changed. This gets set to the outmost scene // of the to-be-changed 3D object when the scene has a 3d transformation diff --git a/include/svx/e3dundo.hxx b/include/svx/e3dundo.hxx index 40a22fa..29e2eb5 100644 --- a/include/svx/e3dundo.hxx +++ b/include/svx/e3dundo.hxx @@ -29,7 +29,7 @@ |* Base class for all 3D undo actions. |* \/ -class E3dUndoAction : public SdrUndoAction +class SAL_WARN_UNUSED E3dUndoAction : public SdrUndoAction { protected : @@ -54,7 +54,7 @@ class E3dUndoAction : public SdrUndoAction |* Undo for 3D rotation through the rotation matrices |* \/ -class E3dRotateUndoAction : public E3dUndoAction +class SAL_WARN_UNUSED E3dRotateUndoAction : public E3dUndoAction { basegfx::B3DHomMatrix aMyOldRotation; basegfx::B3DHomMatrix aMyNewRotation; @@ -83,7 +83,7 @@ class E3dRotateUndoAction : public E3dUndoAction |* Undo for 3D attributes (implemented using Set3DAttributes()) |* \/ -class SVX_DLLPUBLIC E3dAttributesUndoAction : public SdrUndoAction +class SVX_DLLPUBLIC SAL_WARN_UNUSED E3dAttributesUndoAction : public SdrUndoAction { using SdrUndoAction::Repeat; diff --git a/include/svx/extedit.hxx b/include/svx/extedit.hxx index 65e178d..ab3e4cf 100644 --- a/include/svx/extedit.hxx +++ b/include/svx/extedit.hxx @@ -19,7 +19,7 @@ class Graphic; class GraphicObject; class FileChangedChecker; -class SVX_DLLPUBLIC ExternalToolEdit +class SVX_DLLPUBLIC SAL_WARN_UNUSED ExternalToolEdit { protected: OUString m_aFileName; @@ -42,7 +42,7 @@ public: class FmFormView; class SdrObject; -class SVX_DLLPUBLIC SdrExternalToolEdit +class SVX_DLLPUBLIC SAL_WARN_UNUSED SdrExternalToolEdit : public ExternalToolEdit , public SfxListener { diff --git a/include/svx/extrud3d.hxx b/include/svx/extrud3d.hxx index cdade62..3982014 100644 --- a/include/svx/extrud3d.hxx +++ b/include/svx/extrud3d.hxx @@ -29,7 +29,7 @@ |* \/ -class SVX_DLLPUBLIC E3dExtrudeObj : public E3dCompoundObject +class SVX_DLLPUBLIC SAL_WARN_UNUSED E3dExtrudeObj : public E3dCompoundObject { private: // to allow sdr::properties::E3dExtrudeProperties access to SetGeometryValid() diff --git a/include/svx/extrusionbar.hxx b/include/svx/extrusionbar.hxx index 921c1a2..9a42d6c 100644 --- a/include/svx/extrusionbar.hxx +++ b/i
[Libreoffice-commits] core.git: editeng/source
editeng/source/uno/unofield.cxx |9 + 1 file changed, 9 insertions(+) New commits: commit 3e56e3214073bb915c3a2ff4cb5429c63f18c459 Author: Katarina Behrens Date: Fri Apr 17 11:06:44 2015 +0200 Related tdf#88056: prep UNO stuff for ODF export/import Change-Id: I13c95b3e96db96634a3247154d28eddb3ae6c80d diff --git a/editeng/source/uno/unofield.cxx b/editeng/source/uno/unofield.cxx index 479e411..21b0ef5 100644 --- a/editeng/source/uno/unofield.cxx +++ b/editeng/source/uno/unofield.cxx @@ -508,6 +508,9 @@ SvxFieldData* SvxUnoTextField::CreateFieldData() const throw() case text::textfield::Type::PRESENTATION_DATE_TIME: pData = new SvxDateTimeField(); break; +case text::textfield::Type::PAGE_TITLE: +pData = new SvxPageTitleField(); +break; }; return pData; @@ -610,6 +613,8 @@ OUString SAL_CALL SvxUnoTextField::getPresentation( sal_Bool bShowCommand ) return OUString("Footer"); case text::textfield::Type::PRESENTATION_DATE_TIME: return OUString("DateTime"); +case text::textfield::Type::PAGE_TITLE: +return OUString("PageTitle"); default: return OUString("Unknown"); } @@ -857,6 +862,10 @@ uno::Sequence< OUString > SAL_CALL SvxUnoTextField::getSupportedServiceNames() pServices[2] = "com.sun.star.presentation.TextField.DateTime"; pServices[3] = "com.sun.star.presentation.textfield.DateTime"; break; +case text::textfield::Type::PAGE_TITLE: +pServices[2] = "com.sun.star.text.TextField.PageTitle"; +pServices[3] = "com.sun.star.text.textfield.PageTitle"; +break; default: aSeq.realloc(0); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Bug 75025] LibreOffice 4.3 most annoying bugs
https://bugs.documentfoundation.org/show_bug.cgi?id=75025 Jay Philips changed: What|Removed |Added Depends on||87360, 90070 --- Comment #106 from Jay Philips --- Bugs affecting Writer's embedding of images, OLEs, etc. when a border is added around them, which also causes compatibility problems. Bug 87360: Image/OLE should have 'spacing to content' disabled Bug 90070: Borders shrink image/OLE size rather than appearing on the outsides -- You are receiving this mail because: You are on the CC list for the bug. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: Branch 'feature/vclptr' - sw/source
sw/source/uibase/utlui/condedit.cxx |6 ++ sw/source/uibase/utlui/numfmtlb.cxx | 19 +++ 2 files changed, 25 insertions(+) New commits: commit 5459c4a7312ce7bc0326978f4164441e76e5d5a4 Author: Noel Grandin Date: Fri Apr 17 13:52:23 2015 +0200 restore these extern methods, they are used by VclBuilder Change-Id: I4c20e941975b6eb872729b351eb1af901adba649 diff --git a/sw/source/uibase/utlui/condedit.cxx b/sw/source/uibase/utlui/condedit.cxx index ca0c252..b15694b 100644 --- a/sw/source/uibase/utlui/condedit.cxx +++ b/sw/source/uibase/utlui/condedit.cxx @@ -34,6 +34,12 @@ ConditionEdit::ConditionEdit(vcl::Window* pParent, WinBits nStyle) { } +extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeConditionEdit(vcl::Window *pParent, VclBuilder::stringmap &rMap) +{ +VclBuilder::ensureDefaultWidthChars(rMap); +return new ConditionEdit(pParent, WB_LEFT|WB_VCENTER|WB_BORDER|WB_3DLOOK); +} + // Drop possible, respectively format known? sal_Int8 ConditionEdit::AcceptDrop( const AcceptDropEvent& /*rEvt*/ ) diff --git a/sw/source/uibase/utlui/numfmtlb.cxx b/sw/source/uibase/utlui/numfmtlb.cxx index 7710c70..64590d8 100644 --- a/sw/source/uibase/utlui/numfmtlb.cxx +++ b/sw/source/uibase/utlui/numfmtlb.cxx @@ -68,6 +68,25 @@ NumFormatListBox::NumFormatListBox(vcl::Window* pWin, WinBits nStyle) : Init(css::util::NumberFormat::NUMBER, true); } +extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeNumFormatListBox(vcl::Window *pParent, VclBuilder::stringmap &rMap) +{ +WinBits nBits = WB_LEFT|WB_VCENTER|WB_3DLOOK; + +bool bDropdown = VclBuilder::extractDropdown(rMap); + +if (bDropdown) +nBits |= WB_DROPDOWN; +else +nBits |= WB_BORDER; + +NumFormatListBox* pListBox = new NumFormatListBox(pParent, nBits|WB_SIMPLEMODE); + +if (bDropdown) +pListBox->EnableAutoSize(true); + +return pListBox; +} + void NumFormatListBox::Init(short nFormatType, bool bUsrFmts) { SwView *pView = GetView(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: svx/source
svx/source/engine3d/dragmt3d.cxx |5 - svx/source/engine3d/e3dundo.cxx |4 svx/source/engine3d/obj3d.cxx|3 --- svx/source/engine3d/scene3d.cxx |2 -- svx/source/svdraw/svdundo.cxx|4 5 files changed, 18 deletions(-) New commits: commit 7bcf9131032cbcdb162f33d03230e43d4f1db2aa Author: Tor Lillqvist Date: Fri Apr 17 15:00:27 2015 +0300 WaE: unused variables Change-Id: I3b0ed8a6c8e5d13b9236ee1a1337820c3cbce9ac diff --git a/svx/source/engine3d/dragmt3d.cxx b/svx/source/engine3d/dragmt3d.cxx index 39dd69f..e02a6a7 100644 --- a/svx/source/engine3d/dragmt3d.cxx +++ b/svx/source/engine3d/dragmt3d.cxx @@ -159,7 +159,6 @@ bool E3dDragMethod::EndSdrDrag(bool /*bCopy*/) for(nOb=0;nObSetTransform(rCandidate.maTransform); if( bUndo ) { @@ -187,7 +186,6 @@ void E3dDragMethod::CancelSdrDrag() { // Restore transformation E3dDragMethodUnit& rCandidate = maGrp[nOb]; -E3DModifySceneSnapRectUpdater aUpdater(rCandidate.mp3DObj); rCandidate.mp3DObj->SetTransform(rCandidate.maInitTransform); } } @@ -408,7 +406,6 @@ void E3dDragRotate::MoveSdrDrag(const Point& rPnt) if(mbMoveFull) { -E3DModifySceneSnapRectUpdater aUpdater(rCandidate.mp3DObj); rCandidate.mp3DObj->SetTransform(rCandidate.maTransform); } else @@ -558,7 +555,6 @@ void E3dDragMove::MoveSdrDrag(const Point& rPnt) if(mbMoveFull) { -E3DModifySceneSnapRectUpdater aUpdater(rCandidate.mp3DObj); rCandidate.mp3DObj->SetTransform(rCandidate.maTransform); } else @@ -677,7 +673,6 @@ void E3dDragMove::MoveSdrDrag(const Point& rPnt) if(mbMoveFull) { -E3DModifySceneSnapRectUpdater aUpdater(rCandidate.mp3DObj); rCandidate.mp3DObj->SetTransform(rCandidate.maTransform); } else diff --git a/svx/source/engine3d/e3dundo.cxx b/svx/source/engine3d/e3dundo.cxx index 9d6dcfc..4f7a6dd 100644 --- a/svx/source/engine3d/e3dundo.cxx +++ b/svx/source/engine3d/e3dundo.cxx @@ -49,7 +49,6 @@ E3dRotateUndoAction::~E3dRotateUndoAction () void E3dRotateUndoAction::Undo () { -E3DModifySceneSnapRectUpdater aUpdater(pMy3DObj); pMy3DObj->SetTransform(aMyOldRotation); } @@ -57,7 +56,6 @@ void E3dRotateUndoAction::Undo () void E3dRotateUndoAction::Redo () { -E3DModifySceneSnapRectUpdater aUpdater(pMy3DObj); pMy3DObj->SetTransform(aMyNewRotation); } @@ -83,13 +81,11 @@ E3dAttributesUndoAction::~E3dAttributesUndoAction() void E3dAttributesUndoAction::Undo() { -E3DModifySceneSnapRectUpdater aUpdater(pObject); pObject->SetMergedItemSetAndBroadcast(aOldSet); } void E3dAttributesUndoAction::Redo() { -E3DModifySceneSnapRectUpdater aUpdater(pObject); pObject->SetMergedItemSetAndBroadcast(aNewSet); } diff --git a/svx/source/engine3d/obj3d.cxx b/svx/source/engine3d/obj3d.cxx index ef50b3d..a701ad9 100644 --- a/svx/source/engine3d/obj3d.cxx +++ b/svx/source/engine3d/obj3d.cxx @@ -374,7 +374,6 @@ void E3dObject::NbcResize(const Point& rRef, const Fraction& xFact, const Fracti basegfx::B3DHomMatrix mObjTrans(GetTransform()); mObjTrans *= mTrans; -E3DModifySceneSnapRectUpdater aUpdater(this); SetTransform(mObjTrans); } } @@ -427,7 +426,6 @@ void E3dObject::NbcMove(const Size& rSize) basegfx::B3DHomMatrix aTranslate; aTranslate.translate(aMove.getX() - aPos.getX(), aMove.getY() - aPos.getY(), aMove.getZ() - aPos.getZ()); -E3DModifySceneSnapRectUpdater aUpdater(pScene); SetTransform(aTranslate * GetTransform()); } } @@ -739,7 +737,6 @@ void E3dObject::SaveGeoData(SdrObjGeoData& rGeo) const void E3dObject::RestGeoData(const SdrObjGeoData& rGeo) { maLocalBoundVol = static_cast(rGeo).maLocalBoundVol; -E3DModifySceneSnapRectUpdater aUpdater(this); NbcSetTransform(static_cast(rGeo).maTransformation); SdrAttrObj::RestGeoData (rGeo); } diff --git a/svx/source/engine3d/scene3d.cxx b/svx/source/engine3d/scene3d.cxx index 2876b4d..6140815 100644 --- a/svx/source/engine3d/scene3d.cxx +++ b/svx/source/engine3d/scene3d.cxx @@ -397,8 +397,6 @@ E3dScene* E3dScene::GetScene() const void E3dScene::removeAllNonSelectedObjects() { -E3DModifySceneSnapRectUpdater aUpdater(this); - for(size_t a = 0; a < maSubList.GetObjCount(); ++a) { SdrObject* pObj = maSubList.GetObj(a); diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx index 12bf420..2e11ebc 100644 --- a/svx/source/svdraw/svdundo.cxx +++ b/svx/source/svdraw/svdundo.cxx @@ -322,7 +322,6 @@ SdrUndoAttrObj::~SdrUndoAttrObj() void SdrUndoAttrObj::Undo() { -E3DModifyScen
[Libreoffice-commits] core.git: sfx2/source
sfx2/source/sidebar/SidebarChildWindow.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 0bdfe0f946042cdd59468d96a756f28db7cac7fe Author: Jan Holesovsky Date: Fri Apr 17 14:02:22 2015 +0200 draw sidebar: With the recent Jay's fixes, default to expanded sidebar too. Change-Id: I5a05b116fbaac553adf7a87f88cf4bab19df39f0 diff --git a/sfx2/source/sidebar/SidebarChildWindow.cxx b/sfx2/source/sidebar/SidebarChildWindow.cxx index 22d71d3..4d4730d 100644 --- a/sfx2/source/sidebar/SidebarChildWindow.cxx +++ b/sfx2/source/sidebar/SidebarChildWindow.cxx @@ -50,10 +50,10 @@ SidebarChildWindow::SidebarChildWindow ( SfxDockingWindow* pDockingParent = dynamic_cast(pWindow); if (pDockingParent != NULL) { -if (pInfo && pInfo->aExtraString.isEmpty() && pInfo->aModule != "simpress") +if (pInfo && pInfo->aExtraString.isEmpty() && pInfo->aModule != "sdraw" && pInfo->aModule != "simpress") { // When this is the first start (never had the sidebar open yet), -// default to non-expanded sidebars in Writer, Calc, and Draw +// default to non-expanded sidebars in Writer and Calc. // // HACK: unfortunately I haven't found a clean solution to do // this, so do it this way: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: cui/source
cui/source/tabpages/tpshadow.cxx |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) New commits: commit 466d0f2cb2b2bb7fba306ab089be7f648578474e Author: Stephan Bergmann Date: Fri Apr 17 14:09:46 2015 +0200 Clean up conversion from TriState to bool to witness, in Draw select multiple rectangles, with and without shadows, then "Format - Area... - Shadow" Change-Id: Ia1d042f0e3e99bb55228c558568c96b113edfe00 diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx index b163ceb..fe94d0e 100644 --- a/cui/source/tabpages/tpshadow.cxx +++ b/cui/source/tabpages/tpshadow.cxx @@ -257,10 +257,14 @@ bool SvxShadowTabPage::FillItemSet( SfxItemSet* rAttrs ) { const SfxPoolItem* pOld = NULL; -TriState eState = m_pTsbShowShadow->GetState(); if( m_pTsbShowShadow->IsValueChangedFromSaved() ) { -SdrOnOffItem aItem( makeSdrShadowItem(sal::static_int_cast< sal_Bool >( eState )) ); +TriState eState = m_pTsbShowShadow->GetState(); +assert(eState != TRISTATE_INDET); +// given how m_pTsbShowShadow is set up and saved in Reset(), +// eState == TRISTATE_INDET would imply +// !IsValueChangedFromSaved() +SdrOnOffItem aItem( makeSdrShadowItem(eState == TRISTATE_TRUE) ); pOld = GetOldItem( *rAttrs, SDRATTR_SHADOW ); if ( !pOld || !( *static_cast(pOld) == aItem ) ) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: chart2/source
chart2/source/view/diagram/VDiagram.cxx | 24 +++- 1 file changed, 3 insertions(+), 21 deletions(-) New commits: commit 063aec33f029f1fbdd1b1ee274e94a00f256465e Author: Tor Lillqvist Date: Fri Apr 17 15:08:02 2015 +0300 WaE: unused variables and fallout Change-Id: If6d68b54aa4fc5744a30521e5fa7caf9d876d975 diff --git a/chart2/source/view/diagram/VDiagram.cxx b/chart2/source/view/diagram/VDiagram.cxx index 9f5db99..ae8a165 100644 --- a/chart2/source/view/diagram/VDiagram.cxx +++ b/chart2/source/view/diagram/VDiagram.cxx @@ -209,24 +209,6 @@ void VDiagram::createShapes_2d() adjustPosAndSize_2d( m_aAvailablePosIncludingAxes, m_aAvailableSizeIncludingAxes ); } -E3dScene* lcl_getE3dScene( const uno::Reference< drawing::XShape >& xShape ) -{ -E3dScene* pRet=NULL; -uno::Reference< lang::XUnoTunnel > xUnoTunnel( xShape, uno::UNO_QUERY ); -uno::Reference< lang::XTypeProvider > xTypeProvider( xShape, uno::UNO_QUERY ); -if(xUnoTunnel.is()&&xTypeProvider.is()) -{ -SvxShape* pSvxShape = reinterpret_cast(xUnoTunnel->getSomething( SvxShape::getUnoTunnelId() )); -if(pSvxShape) -{ -SdrObject* pObj = pSvxShape->GetSdrObject(); -if( pObj && pObj->ISA(E3dScene) ) -pRet = static_cast(pObj); -} -} -return pRet; -} - void lcl_setLightSources( const uno::Reference< beans::XPropertySet > & xSource, const uno::Reference< beans::XPropertySet > & xDest ) @@ -437,7 +419,8 @@ void VDiagram::adjustAspectRatio3d( const awt::Size& rAvailableSize ) // To get the 3D aspect ratio's effect on the 2D scene size, the scene's 2D size needs to be adapted to // 3D content changes here. The tooling class remembers the current 3D transformation stack // and in its destructor, calculates a new 2D SnapRect for the scene and it's modified 3D geometry. -E3DModifySceneSnapRectUpdater aUpdater(lcl_getE3dScene( m_xOuterGroupShape )); + +// Unclear whether the above comment refers to an unused variable that was removed, or to the below code m_xAspectRatio3D->setPropertyValue( UNO_NAME_3D_TRANSFORM_MATRIX , uno::makeAny(BaseGFXHelper::B3DHomMatrixToHomogenMatrix( aResult )) ); @@ -602,7 +585,7 @@ void VDiagram::createShapes_3d() aEffectiveTranformation.shearXY(m_fYAnglePi,-m_fXAnglePi); //#i98497# 3D charts are rendered with wrong size -E3DModifySceneSnapRectUpdater aUpdater(lcl_getE3dScene( m_xOuterGroupShape )); + xDestProp->setPropertyValue( UNO_NAME_3D_TRANSFORM_MATRIX, uno::makeAny( BaseGFXHelper::B3DHomMatrixToHomogenMatrix( aEffectiveTranformation ) ) ); } @@ -659,7 +642,6 @@ void VDiagram::createShapes_3d() ::basegfx::B3DHomMatrix aM; aM.translate(GRID_TO_WALL_DISTANCE/fXScale, GRID_TO_WALL_DISTANCE/fYScale, GRID_TO_WALL_DISTANCE/fZScale); aM.scale( fXScale, fYScale, fZScale ); -E3DModifySceneSnapRectUpdater aUpdater(lcl_getE3dScene( m_xOuterGroupShape )); xShapeProp->setPropertyValue( UNO_NAME_3D_TRANSFORM_MATRIX , uno::makeAny(BaseGFXHelper::B3DHomMatrixToHomogenMatrix(aM)) ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: include/svx
include/svx/e3dsceneupdater.hxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 3ac1584549364c573d4d4e3baed9ad39ad6ce8e4 Author: Caolán McNamara Date: Fri Apr 17 13:40:27 2015 +0100 E3DModifySceneSnapRectUpdater does its work in its dtor Change-Id: I215bc3fe9e8e5a95d98cc8f5f1ec970c6d80dee3 diff --git a/include/svx/e3dsceneupdater.hxx b/include/svx/e3dsceneupdater.hxx index 3208eb8..54e5dcc 100644 --- a/include/svx/e3dsceneupdater.hxx +++ b/include/svx/e3dsceneupdater.hxx @@ -42,7 +42,7 @@ namespace drawinglayer { namespace geometry { // 3D content and tu use it. This is only wanted if changes to the scene's // content are intended to change the scene's 2D geometry attributes -class SVX_DLLPUBLIC SAL_WARN_UNUSED E3DModifySceneSnapRectUpdater +class SVX_DLLPUBLIC E3DModifySceneSnapRectUpdater { // the scene which may be changed. This gets set to the outmost scene // of the to-be-changed 3D object when the scene has a 3d transformation ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/vclptr' - extensions/source include/sfx2 include/svx sfx2/source svx/source sw/source
extensions/source/propctrlr/browserline.cxx |2 +- include/sfx2/tbxctrl.hxx |2 +- include/svx/linectrl.hxx |2 +- sfx2/source/toolbox/tbxitem.cxx |2 +- svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx |2 +- svx/source/tbxctrls/colorwindow.hxx |2 +- svx/source/tbxctrls/layctrl.cxx |8 svx/source/tbxctrls/lboxctrl.cxx |4 ++-- svx/source/tbxctrls/linectrl.cxx |2 +- svx/source/tbxctrls/tbcontrl.cxx | 10 +- sw/source/uibase/app/docsh2.cxx |6 +++--- sw/source/uibase/dbui/dbmgr.cxx |4 ++-- sw/source/uibase/dbui/dbtree.cxx |2 +- sw/source/uibase/dbui/mailmergechildwindow.cxx |2 +- sw/source/uibase/dbui/mailmergehelper.cxx|4 ++-- sw/source/uibase/docvw/HeaderFooterWin.cxx |2 +- sw/source/uibase/docvw/PageBreakWin.cxx |2 +- sw/source/uibase/docvw/SidebarWin.cxx|8 sw/source/uibase/docvw/srcedtw.cxx |6 +++--- sw/source/uibase/envelp/syncbtn.cxx |2 +- sw/source/uibase/inc/workctrl.hxx|2 +- sw/source/uibase/misc/glshell.cxx|2 +- sw/source/uibase/misc/redlndlg.cxx |2 +- sw/source/uibase/misc/swruler.cxx|2 +- sw/source/uibase/ribbar/inputwin.cxx |6 +++--- sw/source/uibase/ribbar/workctrl.cxx |6 +++--- 26 files changed, 47 insertions(+), 47 deletions(-) New commits: commit 0269ef901119635fa809245698c985b30e648ef4 Author: Noel Grandin Date: Fri Apr 17 15:11:54 2015 +0200 sw: convert new to ::Create. Change-Id: Iab0fc73540b3c7a60c64296dce86b70c1e02cf09 diff --git a/extensions/source/propctrlr/browserline.cxx b/extensions/source/propctrlr/browserline.cxx index 9a84905..c322075 100644 --- a/extensions/source/propctrlr/browserline.cxx +++ b/extensions/source/propctrlr/browserline.cxx @@ -141,7 +141,7 @@ namespace pcr { m_aFtTitle->SetZOrder(pRefWindow,nFlags); if ( m_pControlWindow ) -m_pControlWindow->SetZOrder( (vcl::Window*)&m_aFtTitle, WINDOW_ZORDER_BEHIND ); +m_pControlWindow->SetZOrder( m_aFtTitle.get(), WINDOW_ZORDER_BEHIND ); if ( m_pBrowseButton && m_pControlWindow ) m_pBrowseButton->SetZOrder( m_pControlWindow, WINDOW_ZORDER_BEHIND ); diff --git a/include/sfx2/tbxctrl.hxx b/include/sfx2/tbxctrl.hxx index 5284bcc..c7dab43 100644 --- a/include/sfx2/tbxctrl.hxx +++ b/include/sfx2/tbxctrl.hxx @@ -153,7 +153,7 @@ public: virtual ~SfxPopupWindow(); virtual voiddispose() SAL_OVERRIDE; -virtual SfxPopupWindow* Clone() const; +virtual VclPtr Clone() const; virtual voidMouseMove( const MouseEvent& rMEvt ) SAL_OVERRIDE; voidStartCascading(); diff --git a/include/svx/linectrl.hxx b/include/svx/linectrl.hxx index 4b5ccec..b9daf62 100644 --- a/include/svx/linectrl.hxx +++ b/include/svx/linectrl.hxx @@ -124,7 +124,7 @@ public: virtual voidStateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) SAL_OVERRIDE; -virtual SfxPopupWindow* Clone() const SAL_OVERRIDE; +virtual VclPtr Clone() const SAL_OVERRIDE; }; diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx index f229d8d..4fc75e1 100644 --- a/sfx2/source/toolbox/tbxitem.cxx +++ b/sfx2/source/toolbox/tbxitem.cxx @@ -1335,7 +1335,7 @@ void SfxPopupWindow::StartCascading() -SfxPopupWindow* SfxPopupWindow::Clone() const +VclPtr SfxPopupWindow::Clone() const /* [Description] diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx index 1ad7f6e..d40f8a4 100644 --- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx @@ -1038,7 +1038,7 @@ namespace sdr { namespace contact { if ( m_aControl.is() ) { -if ( m_pOutputDeviceForWindow.get() == const_cast( &_rDevice ) ) +if ( m_pOutputDeviceForWindow.get() == &_rDevice ) return true; // Somebody requested a control for a new device, which means either of diff --git a/svx/source/tbxctrls/colorwindow.hxx b/svx/source/tbxctrls/colorwindow.hxx index eae25a8..5cdf8b7 100644 --- a/svx/source/tbxctrls/colorwindow.hxx +++ b/svx/source/tbxctrls/colorwindow.hxx @@ -74,7 +74,7 @@ public: virtual voidKeyInput( const KeyEvent
[Libreoffice-commits] core.git: sw/source
sw/source/filter/ww8/docxattributeoutput.cxx | 24 +++- sw/source/filter/ww8/docxattributeoutput.hxx |3 ++- 2 files changed, 17 insertions(+), 10 deletions(-) New commits: commit 4b431291bba8429ea80c43721bc6dd5f0ad4d2e8 Author: Caolán McNamara Date: Fri Apr 17 13:59:52 2015 +0100 refactor a tiny bit for future plans, no change in logic Change-Id: If104cdbc7e9d38c9664492f433c53ee5ffb59578 diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 9ebf5eb..f65ba79 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -2812,7 +2812,7 @@ static void impl_cellMargins( FSHelperPtr pSerializer, const SvxBoxItem& rBox, s } } -void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) +void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner, sal_uInt32 nCell, sal_uInt32 nRow ) { m_pSerializer->startElementNS( XML_w, XML_tcPr, FSEND ); @@ -2824,9 +2824,9 @@ void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Point TableCellRedline( pTableTextNodeInfoInner ); // Cell preferred width -SwTwips nWidth = GetGridCols( pTableTextNodeInfoInner )->at( pTableTextNodeInfoInner->getCell() ); -if ( pTableTextNodeInfoInner->getCell() ) -nWidth = nWidth - GetGridCols( pTableTextNodeInfoInner )->at( pTableTextNodeInfoInner->getCell() - 1 ); +SwTwips nWidth = GetGridCols( pTableTextNodeInfoInner )->at( nCell ); +if ( nCell ) +nWidth = nWidth - GetGridCols( pTableTextNodeInfoInner )->at( nCell - 1 ); m_pSerializer->singleElementNS( XML_w, XML_tcW, FSNS( XML_w, XML_w ), OString::number( nWidth ).getStr( ), FSNS( XML_w, XML_type ), "dxa", @@ -2834,8 +2834,7 @@ void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Point // Horizontal spans const SwWriteTableRows& aRows = m_pTableWrt->GetRows( ); -SwWriteTableRow *pRow = aRows[ pTableTextNodeInfoInner->getRow( ) ]; -sal_uInt32 nCell = pTableTextNodeInfoInner->getCell(); +SwWriteTableRow *pRow = aRows[ nRow ]; const SwWriteTableCells *tableCells = &pRow->GetCells(); if (nCell < tableCells->size() ) { @@ -2987,7 +2986,7 @@ void DocxAttributeOutput::EndTableRow( ) m_pSerializer->endElementNS( XML_w, XML_tr ); } -void DocxAttributeOutput::StartTableCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) +void DocxAttributeOutput::StartTableCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner, sal_uInt32 nCell, sal_uInt32 nRow ) { if ( !m_pTableWrt ) InitTableHelper( pTableTextNodeInfoInner ); @@ -2995,11 +2994,18 @@ void DocxAttributeOutput::StartTableCell( ww8::WW8TableNodeInfoInner::Pointer_t m_pSerializer->startElementNS( XML_w, XML_tc, FSEND ); // Write the cell properties here -TableCellProperties( pTableTextNodeInfoInner ); +TableCellProperties( pTableTextNodeInfoInner, nCell, nRow ); m_tableReference->m_bTableCellOpen = true; } +void DocxAttributeOutput::StartTableCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) +{ +const sal_uInt32 nCell = pTableTextNodeInfoInner->getCell(); +const sal_uInt32 nRow = pTableTextNodeInfoInner->getRow(); +StartTableCell(pTableTextNodeInfoInner, nCell, nRow); +} + void DocxAttributeOutput::EndTableCell( ) { if (m_tableReference->m_bTableCellParaSdtOpen) @@ -3574,7 +3580,7 @@ void DocxAttributeOutput::TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer const SwWriteTableCells *tableCells = &pRow->GetCells(); if (nCell < tableCells->size() ) { -const SwWriteTableCell *pCell = &pRow->GetCells( )[ pTableTextNodeInfoInner->getCell( ) ]; +const SwWriteTableCell *pCell = &pRow->GetCells( )[ nCell ]; switch( pCell->GetVertOri()) { case text::VertOrientation::TOP: diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx index 093a56b..e3d2fbb 100644 --- a/sw/source/filter/ww8/docxattributeoutput.hxx +++ b/sw/source/filter/ww8/docxattributeoutput.hxx @@ -424,7 +424,8 @@ private: void StartTable( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ); void StartTableRow( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ); void StartTableCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ); -void TableCellProperties( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ); +void StartTableCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner, sal_uInt32 nCell, sal_uInt32 nRow ); +void TableCellProperties( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner, sal_uInt32 nCell, sal_uInt32 nRow )
[Libreoffice-commits] core.git: 14 commits - basic/source compilerplugins/clang connectivity/source dbaccess/source editeng/source filter/source idl/source include/vcl sc/source sd/source sot/source s
basic/source/classes/sbxmod.cxx |2 basic/source/sbx/sbxcoll.cxx |2 compilerplugins/clang/implicitboolconversion.cxx | 362 --- connectivity/source/commontools/FValue.cxx |2 dbaccess/source/ui/inc/tabletree.hxx |2 editeng/source/editeng/editattr.cxx |2 editeng/source/editeng/editdoc.cxx |2 editeng/source/editeng/editobj.cxx |6 editeng/source/items/bulitem.cxx |6 editeng/source/items/frmitems.cxx|4 editeng/source/items/textitem.cxx| 18 - editeng/source/outliner/outliner.cxx |2 filter/source/flash/swfwriter2.cxx |8 filter/source/msfilter/escherex.cxx |2 idl/source/objects/bastype.cxx |2 include/vcl/salbtype.hxx | 12 sc/source/core/data/patattr.cxx |2 sc/source/core/tool/autoform.cxx | 12 sc/source/core/tool/ddelink.cxx |2 sc/source/filter/inc/xcl97rec.hxx|2 sc/source/filter/xcl97/xcl97rec.cxx |4 sc/source/ui/drawfunc/fupoor.cxx |4 sc/source/ui/unoobj/cellsuno.cxx |6 sc/source/ui/unoobj/docuno.cxx |4 sd/source/filter/eppt/pptexanimations.cxx|2 sd/source/filter/html/pubdlg.cxx | 22 - sd/source/ui/dlg/morphdlg.cxx|4 sd/source/ui/dlg/vectdlg.cxx |2 sot/source/sdstor/stgelem.cxx| 20 - sot/source/sdstor/stgelem.hxx|4 svl/source/items/cenumitm.cxx|2 svl/source/items/ctypeitm.cxx|2 svtools/source/graphic/grfattr.cxx |2 svtools/source/graphic/grfmgr.cxx|2 svtools/source/misc/imap.cxx |4 svx/source/gallery2/galobj.cxx |2 svx/source/gallery2/galtheme.cxx |4 svx/source/items/pageitem.cxx|2 svx/source/svdraw/svdattr.cxx|2 sw/source/core/doc/tblafmt.cxx | 14 sw/source/core/doc/tblrwcl.cxx |2 sw/source/core/edit/ednumber.cxx |2 sw/source/filter/inc/rtf.hxx |4 sw/source/filter/ww8/wrtww8.hxx | 16 - sw/source/filter/ww8/ww8atr.cxx | 12 sw/source/filter/ww8/ww8par.cxx |6 sw/source/filter/ww8/ww8par2.cxx | 18 - sw/source/filter/ww8/ww8par3.cxx | 34 +- sw/source/filter/ww8/ww8par6.cxx |2 sw/source/filter/ww8/ww8scan.cxx |3 sw/source/filter/ww8/ww8scan.hxx |4 sw/source/filter/ww8/ww8struc.hxx|3 tools/source/generic/poly.cxx|2 vcl/source/gdi/animate.cxx |2 vcl/source/gdi/cvtsvm.cxx| 18 - vcl/source/gdi/dibtools.cxx | 61 ++- vcl/source/gdi/font.cxx | 10 vcl/source/gdi/mapmod.cxx|2 vcl/source/gdi/metaact.cxx | 22 - vcl/source/gdi/region.cxx|2 vcl/source/gdi/wall.cxx |2 61 files changed, 543 insertions(+), 244 deletions(-) New commits: commit 8e4d82cd1125502c26ddaaa85c49c4aa44f65811 Author: Stephan Bergmann Date: Fri Apr 17 15:07:50 2015 +0200 loplugin:implicitboolconversion: warn about conversions to unsigned char ...while avoiding warnings about conversions to bool-like typedefs (sal_Bool etc.), also in cases where those typedefs are used as type arguments of template specializations (which is no little feat, and the current code is only an approximation of it, one that appears to cover the relevant cases in our code base though). Change-Id: I0ed3801aec7787bf38b429b66e25244ec00cac9b diff --git a/compilerplugins/clang/implicitboolconversion.cxx b/compilerplugins/clang/implicitboolconversion.cxx index d8ef00e..57d0016 100644 --- a/compilerplugins/clang/implicitboolconversion.cxx +++ b/compilerplugins/clang/implicitboolconversion.cxx @@ -36,30 +36,68 @@ template<> struct std::iterator_traits { namespace { -bool isBool(Expr const * expr, bool allowTypedefs = true) { -QualType t1 { expr->getType() }; -if (t1->isBooleanType()) { +Expr const * ignoreParenAndTemporaryMaterialization(Expr const * expr) { +for (;;) { +expr = expr->IgnoreParens(); +auto e = dyn_cast(expr); +if (e == nullptr) { +return expr; +} +expr = e->GetTemporaryExpr(); +} +} + +Expr cons
[Libreoffice-commits] mso-dumper.git: 10 commits - doc-dump.py emf-dump.py Makefile msodumper/docdirstream.py msodumper/docrecord.py msodumper/docstream.py msodumper/msometa.py msodumper/vsdstream.py
Makefile |1 doc-dump.py |3 emf-dump.py |3 msodumper/docdirstream.py |3 msodumper/docrecord.py|7 - msodumper/docstream.py|8 + msodumper/msometa.py | 314 ++ msodumper/vsdstream.py| 293 -- test/doc/test.py |6 9 files changed, 337 insertions(+), 301 deletions(-) New commits: commit 34d3f8c16849f5a4c91d2a350f81a8c78f1539e7 Author: Miklos Vajna Date: Fri Apr 17 15:31:25 2015 +0200 DefTableShd80Operand.dump: Unused variable 'i' diff --git a/msodumper/docrecord.py b/msodumper/docrecord.py index 1586c48..d904d34 100644 --- a/msodumper/docrecord.py +++ b/msodumper/docrecord.py @@ -624,13 +624,14 @@ class Shd80(DOCDirStream): """The Shd80 structure specifies the colors and pattern that are used for background shading.""" size = 2 # in bytes, see 2.9.245 -def __init__(self, parent): +def __init__(self, parent, index): DOCDirStream.__init__(self, parent.bytes) self.pos = parent.pos self.parent = parent +self.index = index def dump(self): -print '' % self.pos +print '' % (self.pos, self.index) buf = self.readuInt16() self.printAndSet("icoFore", buf & 0x001f, dict=Ico) # 1..5th bits self.printAndSet("icoBack", (buf & 0x03e0) >> 5, dict=Ico) # 6..10th bits @@ -650,7 +651,7 @@ class DefTableShd80Operand(DOCDirStream): print '' % self.pos self.printAndSet("cb", self.readuInt8()) for i in xrange(self.cb / Shd80.size): -Shd80(self).dump() +Shd80(self, i).dump() print '' commit 06ab6a09468b8400bc1622f055505bb640c620b6 Author: Miklos Vajna Date: Fri Apr 17 15:29:15 2015 +0200 DOCDirStream.getString: Unused variable 'pos' diff --git a/msodumper/docdirstream.py b/msodumper/docdirstream.py index 88a91d6..7b9e8de 100644 --- a/msodumper/docdirstream.py +++ b/msodumper/docdirstream.py @@ -153,8 +153,7 @@ class DOCDirStream: return (self.quoteAttr(globals.encodeName(globals.getUTF8FromUTF16("".join(map(lambda x: chr(x), bytes), pos) def getString(self, limit=None): -ret, pos = self.__getString(limit) -return ret +return self.__getString(limit)[0] def readString(self, limit=None): ret, pos = self.__getString(limit) commit f7031b02e6d97fd926d847397050c5736d9013e1 Author: Miklos Vajna Date: Fri Apr 17 15:28:45 2015 +0200 emf-dump: Unused variable 'exname' diff --git a/emf-dump.py b/emf-dump.py index 1023a9f..1e8f3d3 100755 --- a/emf-dump.py +++ b/emf-dump.py @@ -25,8 +25,7 @@ class EMFDumper: def main(args): -exname, args = args[0], args[1:] -dumper = EMFDumper(args[0]) +dumper = EMFDumper(args[1]) dumper.dump() if __name__ == '__main__': commit f6a9a2b35c10b967efda2d792686dc10899268e7 Author: Miklos Vajna Date: Fri Apr 17 15:28:06 2015 +0200 doc-dump: Unused variable 'exname' diff --git a/doc-dump.py b/doc-dump.py index ab57719..a030fdd 100755 --- a/doc-dump.py +++ b/doc-dump.py @@ -33,9 +33,8 @@ class DOCDumper: def main(args): -exname, args = args[0], args[1:] params = globals.Params() -dumper = DOCDumper(args[0], params) +dumper = DOCDumper(args[1], params) dumper.dump() if __name__ == '__main__': commit f1f9e164a48fc29244d45269ef913c01b12f Author: Miklos Vajna Date: Fri Apr 17 15:11:23 2015 +0200 docstream: hook into msometa diff --git a/msodumper/docstream.py b/msodumper/docstream.py index a30859f..b455cea 100644 --- a/msodumper/docstream.py +++ b/msodumper/docstream.py @@ -14,6 +14,8 @@ import globals import sys import os import bisect +from msometa import SummaryInformationStream +from msometa import DocumentSummaryInformationStream class DOCFile: @@ -54,8 +56,12 @@ class DOCFile: def getStreamFromBytes(self, name, bytes): if name == "WordDocument": return WordDocumentStream(bytes, self.params, doc=self) -if name in ("0Table", "1Table"): +elif name in ("0Table", "1Table"): return TableStream(bytes, self.params, name, doc=self) +elif name == "\x05SummaryInformation": +return SummaryInformationStream(bytes, self.params, doc=self) +elif name == "\x05DocumentSummaryInformation": +return DocumentSummaryInformationStream(bytes, self.params, doc=self) else: return DOCDirStream(bytes, self.params, name, doc=self) diff --git a/test/doc/test.py b/test/doc/test.py index c63bc11..55d9819 100755 --- a/test/doc/test.py +++ b/test/doc/test.py @@ -157,6 +157,12 @@ class Test(unittest.TestCase): # Zoom is 42% self.assertEqual('0x2a', dopBase.findall('pctWwdSaved')[0].attrib['value']) +# Assert metadata: who is the author. +propertyIdentifier = self.r
[Libreoffice-commits] core.git: Branch 'feature/vclptr' - sw/source
sw/source/ui/fldui/flddb.cxx |2 +- sw/source/ui/fldui/flddinf.cxx |2 +- sw/source/ui/fldui/flddok.cxx |2 +- sw/source/ui/fldui/fldfunc.cxx |2 +- sw/source/ui/fldui/fldref.cxx |2 +- sw/source/ui/fldui/fldvar.cxx |2 +- sw/source/ui/frmdlg/column.cxx |2 +- sw/source/ui/frmdlg/frmpage.cxx|8 sw/source/ui/frmdlg/wrap.cxx |2 +- sw/source/ui/index/cnttab.cxx | 20 ++-- sw/source/ui/index/swuiidxmrk.cxx |8 sw/source/ui/misc/docfnote.cxx |4 ++-- sw/source/ui/misc/impfnote.hxx |2 +- sw/source/ui/misc/num.cxx |2 +- sw/source/ui/misc/outline.cxx |2 +- sw/source/ui/misc/pgfnote.cxx |2 +- sw/source/ui/misc/pggrid.cxx |2 +- sw/source/ui/table/tabledlg.cxx|6 +++--- sw/source/ui/table/tautofmt.cxx|2 +- sw/source/uibase/inc/column.hxx|3 +-- sw/source/uibase/inc/frmpage.hxx | 11 --- sw/source/uibase/inc/pgfnote.hxx |2 +- sw/source/uibase/inc/pggrid.hxx|3 +-- sw/source/uibase/inc/wrap.hxx |2 +- sw/source/uibase/table/tablepg.hxx |2 +- 25 files changed, 46 insertions(+), 51 deletions(-) New commits: commit f0f786e8fc7165a22b67ec73331ee8d66c01409c Author: Noel Grandin Date: Fri Apr 17 15:30:46 2015 +0200 sw: convert new to ::Create. Change-Id: I1669be3e1dfdb6733952b2a801371da243fb94c2 diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx index a05a7f2..4e16079 100644 --- a/sw/source/ui/fldui/flddb.cxx +++ b/sw/source/ui/fldui/flddb.cxx @@ -267,7 +267,7 @@ bool SwFldDBPage::FillItemSet(SfxItemSet* ) SfxTabPage* SwFldDBPage::Create(vcl::Window* pParent, const SfxItemSet* rAttrSet ) { -return ( new SwFldDBPage( pParent, *rAttrSet ) ); +return VclPtr::Create( pParent, *rAttrSet ); } sal_uInt16 SwFldDBPage::GetGroup() diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx index d5d41f3..d77fdf6 100644 --- a/sw/source/ui/fldui/flddinf.cxx +++ b/sw/source/ui/fldui/flddinf.cxx @@ -465,7 +465,7 @@ bool SwFldDokInfPage::FillItemSet(SfxItemSet* ) SfxTabPage* SwFldDokInfPage::Create(vcl::Window* pParent, const SfxItemSet* rAttrSet ) { -return ( new SwFldDokInfPage( pParent, *rAttrSet ) ); +return VclPtr::Create( pParent, *rAttrSet ); } sal_uInt16 SwFldDokInfPage::GetGroup() diff --git a/sw/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx index 2744141..cd0be8b 100644 --- a/sw/source/ui/fldui/flddok.cxx +++ b/sw/source/ui/fldui/flddok.cxx @@ -656,7 +656,7 @@ bool SwFldDokPage::FillItemSet(SfxItemSet* ) SfxTabPage* SwFldDokPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) { -return ( new SwFldDokPage( pParent, *rAttrSet ) ); +return VclPtr::Create( pParent, *rAttrSet ); } sal_uInt16 SwFldDokPage::GetGroup() diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx index 07d0fdd..b2cfeb3 100644 --- a/sw/source/ui/fldui/fldfunc.cxx +++ b/sw/source/ui/fldui/fldfunc.cxx @@ -631,7 +631,7 @@ OUString SwFldFuncPage::TurnMacroString(const OUString &rMacro) SfxTabPage* SwFldFuncPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) { -return ( new SwFldFuncPage( pParent, *rAttrSet ) ); +return VclPtr::Create( pParent, *rAttrSet ); } sal_uInt16 SwFldFuncPage::GetGroup() diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx index 527e44c..e421f1f 100644 --- a/sw/source/ui/fldui/fldref.cxx +++ b/sw/source/ui/fldui/fldref.cxx @@ -953,7 +953,7 @@ bool SwFldRefPage::FillItemSet(SfxItemSet* ) SfxTabPage* SwFldRefPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) { -return ( new SwFldRefPage( pParent, *rAttrSet ) ); +return VclPtr::Create( pParent, *rAttrSet ); } sal_uInt16 SwFldRefPage::GetGroup() diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx index 1163e0a..257181a 100644 --- a/sw/source/ui/fldui/fldvar.cxx +++ b/sw/source/ui/fldui/fldvar.cxx @@ -1250,7 +1250,7 @@ bool SwFldVarPage::FillItemSet(SfxItemSet* ) SfxTabPage* SwFldVarPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) { -return ( new SwFldVarPage( pParent, *rAttrSet ) ); +return VclPtr::Create( pParent, *rAttrSet ); } sal_uInt16 SwFldVarPage::GetGroup() diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx index 4f14a5e..f0ae9c4 100644 --- a/sw/source/ui/frmdlg/column.cxx +++ b/sw/source/ui/frmdlg/column.cxx @@ -659,7 +659,7 @@ void SwColumnPage::Reset(const SfxItemSet *rSet) // create TabPage SfxTabPage* SwColumnPage::Create(vcl::Window *pParent, const SfxItemSet *rSet) { -return new SwColumnPage(pParent, *rSet); +return VclPtr::Create(pParent, *rSet); } // stuff
[Libreoffice-commits] core.git: sw/source
sw/source/filter/ww8/docxattributeoutput.cxx |9 - sw/source/filter/ww8/docxattributeoutput.hxx |2 -- 2 files changed, 11 deletions(-) New commits: commit ff349e96ae552d852ee39ce08009079b76033fd3 Author: Caolán McNamara Date: Fri Apr 17 14:23:45 2015 +0100 incredibly dubious hunk of code from commit 0415e2696156b25226f21085a0716187f83c2f4b Author: PriyankaGaikwad Date: Thu Feb 27 17:42:52 2014 +0530 fdo#73219 File corruption: Table in header Description: File corrupt due to the end tagare missing after roundtrip in header4.xml Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx Reviewed on: https://gerrit.libreoffice.org/8378 Change-Id: Ib05a50b3b3beca6c744b93360f9341ddcaa1a22a Change-Id: I93ecadf7bfd2d19da33611e82ba95c4106bda2a5 diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index f65ba79..f5e9581 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -264,18 +264,9 @@ void DocxAttributeOutput::StartParagraph( ww8::WW8TableNodeInfo::Pointer_t pText { ww8::WW8TableNodeInfoInner::Pointer_t pInner( pTextNodeInfo->getInnerForDepth( nDepth ) ); -if (m_tableReference->m_pOldTablepInner && m_tableReference->m_pOldTablepInner->getTable() == pInner->getTable() && nCurrentDepth > 1 && nDepth != 1) -{ - m_tableReference->m_pOldTablepInner = pInner; - break; -} -else -{ StartTable( pInner ); StartTableRow( pInner ); StartTableCell( pInner ); -m_tableReference->m_pOldTablepInner = pInner; -} } m_tableReference->m_nTableDepth = nCurrentDepth; diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx index e3d2fbb..4da101b 100644 --- a/sw/source/filter/ww8/docxattributeoutput.hxx +++ b/sw/source/filter/ww8/docxattributeoutput.hxx @@ -130,8 +130,6 @@ struct TableReference /// Remember the current table depth. sal_uInt32 m_nTableDepth; -ww8::WW8TableNodeInfoInner::Pointer_t m_pOldTablepInner; - TableReference() : m_bTableCellOpen(false), m_bTableCellParaSdtOpen(false), ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/vclptr' - sw/inc sw/source
sw/inc/postithelper.hxx |4 sw/source/core/doc/DocumentDeviceManager.cxx |8 - sw/source/core/fields/postithelper.cxx |4 sw/source/core/layout/virtoutp.cxx |2 sw/source/core/view/viewsh.cxx |2 sw/source/core/view/vprint.cxx |2 sw/source/ui/chrdlg/chardlg.cxx |2 sw/source/ui/chrdlg/drpcps.cxx |2 sw/source/ui/chrdlg/numpara.cxx |2 sw/source/ui/chrdlg/swuiccoll.cxx|2 sw/source/ui/config/mailconfigpage.cxx |2 sw/source/ui/config/optcomp.cxx |2 sw/source/ui/config/optload.cxx |4 sw/source/ui/config/optpage.cxx | 18 +- sw/source/ui/dbui/addresslistdialog.cxx |8 - sw/source/ui/dbui/createaddresslistdialog.cxx| 10 - sw/source/ui/dbui/customizeaddresslistdialog.cxx |4 sw/source/ui/dbui/mailmergewizard.cxx| 16 +- sw/source/ui/dbui/mmaddressblockpage.cxx | 18 +- sw/source/ui/dbui/mmgreetingspage.cxx|4 sw/source/ui/dbui/mmoutputpage.cxx | 12 - sw/source/ui/dbui/mmoutputtypepage.cxx |2 sw/source/ui/dbui/selectdbtabledialog.cxx|2 sw/source/ui/dialog/ascfldlg.cxx |2 sw/source/ui/dialog/docstdlg.cxx |2 sw/source/ui/dialog/swdlgfact.cxx| 143 +++ sw/source/ui/dialog/uiregionsw.cxx |6 sw/source/ui/envelp/envfmt.cxx |2 sw/source/ui/envelp/envfmt.hxx |3 sw/source/ui/envelp/envlop1.cxx |2 sw/source/ui/envelp/envprt.cxx |2 sw/source/ui/envelp/envprt.hxx |3 sw/source/ui/envelp/label1.cxx |8 - sw/source/ui/envelp/labfmt.cxx |2 sw/source/ui/envelp/labfmt.hxx |3 sw/source/ui/envelp/labprt.cxx |2 sw/source/ui/envelp/labprt.hxx |3 sw/source/ui/envelp/swuilabimp.hxx | 12 - sw/source/uibase/inc/drpcps.hxx |3 sw/source/uibase/inc/envlop.hxx |3 sw/source/uibase/inc/numpara.hxx |4 sw/source/uibase/inc/optpage.hxx | 25 +--- sw/source/uibase/inc/swuiccoll.hxx |2 43 files changed, 177 insertions(+), 187 deletions(-) New commits: commit 5cf00154ca1e5013ceba59103ad706a3492ea70b Author: Noel Grandin Date: Fri Apr 17 15:54:21 2015 +0200 sw: convert new to ::Create. Change-Id: I3783ee5c3eca2ecb4490a16032edad7e6ebe3460 diff --git a/sw/inc/postithelper.hxx b/sw/inc/postithelper.hxx index cf1f7c0..e8fa575 100644 --- a/sw/inc/postithelper.hxx +++ b/sw/inc/postithelper.hxx @@ -114,7 +114,7 @@ public: virtual bool UseElement() = 0; virtual const SwFmtFld& GetFmtFld() const = 0; virtual const SfxBroadcaster* GetBroadCaster() const = 0; -virtual sw::sidebarwindows::SwSidebarWin* GetSidebarWindow( SwEditWin& rEditWin, +virtual VclPtr GetSidebarWindow( SwEditWin& rEditWin, WinBits nBits, SwPostItMgr& aMgr, SwPostItBits aBits) = 0; @@ -146,7 +146,7 @@ public: { return dynamic_cast (&mrFmtFld); } -virtual sw::sidebarwindows::SwSidebarWin* GetSidebarWindow( +virtual VclPtr GetSidebarWindow( SwEditWin& rEditWin, WinBits nBits, SwPostItMgr& aMgr, diff --git a/sw/source/core/doc/DocumentDeviceManager.cxx b/sw/source/core/doc/DocumentDeviceManager.cxx index b8b0438..59ebd29 100644 --- a/sw/source/core/doc/DocumentDeviceManager.cxx +++ b/sw/source/core/doc/DocumentDeviceManager.cxx @@ -212,7 +212,7 @@ void DocumentDeviceManager::setJobsetup(/*[in]*/ const JobSetup &rJobSetup ) SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC, 0 ); -SfxPrinter *p = new SfxPrinter( pSet, rJobSetup ); +VclPtr p = VclPtr::Create( pSet, rJobSetup ); if ( bCheckPageDescs ) setPrinter( p, true, true ); else @@ -261,9 +261,9 @@ DocumentDeviceManager::~DocumentDeviceManager() VirtualDevice& DocumentDeviceManager::CreateVirtualDevice_() const { #ifdef IOS -VirtualDevice* pNewVir = new VirtualDevice( 8 ); +VclPtr pNewVir = VclPtr::Create( 8 ); #else -VirtualDevice* pNewVir = new VirtualDevice( 1 ); +VclPtr pNewVir = VclPtr::Create( 1 ); #endif pNewVir->SetReferenceDevice( VirtualDevice::REFDEV_MODE_MSO1 ); @@ -297,7 +297,7 @@ SfxPrinter&
[Libreoffice-commits] core.git: sc/source
sc/source/core/tool/compiler.cxx | 28 ++-- 1 file changed, 18 insertions(+), 10 deletions(-) New commits: commit c9519a210523c732188a494c14ac212db43463e5 Author: Eike Rathke Date: Fri Apr 17 12:00:18 2015 +0200 TableRef: handle unresolved column specifiers Change-Id: I8b4fa10da0a39df941f92b8bb074b9031f81fb8e diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 055bcd2..63f2dd5 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -3710,6 +3710,9 @@ bool ScCompiler::NextNewToken( bool bInArray ) { if (IsTableRefColumn( aOrg )) return true; +// Do not attempt to resolve as any other name. +aUpper = aOrg; // for ocBad +break; // do; create ocBad token or set error. } mbRewind = false; @@ -4859,8 +4862,7 @@ bool ScCompiler::HandleTableRef() pDBData->GetArea(aDBRange); aDBRange.aEnd.SetTab(aDBRange.aStart.Tab()); ScRange aRange( aDBRange); -ScTokenArray* pNew = new ScTokenArray(); -bool bAddRange = true; +sal_uInt16 nError = 0; bool bForwardToClose = false; ScTableRefToken::Item eItem = pTR->GetItem(); switch (eItem) @@ -4874,7 +4876,7 @@ bool ScCompiler::HandleTableRef() if (pDBData->HasTotals()) aRange.aEnd.IncRow(-1); if (aRange.aEnd.Row() < aRange.aStart.Row()) -bAddRange = false; +nError = errNoRef; bForwardToClose = true; } break; @@ -4888,7 +4890,7 @@ bool ScCompiler::HandleTableRef() if (pDBData->HasHeader()) aRange.aEnd.SetRow( aRange.aStart.Row()); else -bAddRange = false; +nError = errNoRef; bForwardToClose = true; } break; @@ -4903,7 +4905,7 @@ bool ScCompiler::HandleTableRef() if (pDBData->HasTotals()) aRange.aEnd.IncRow(-1); if (aRange.aEnd.Row() < aRange.aStart.Row()) -bAddRange = false; +nError = errNoRef; bForwardToClose = true; } break; @@ -4912,7 +4914,7 @@ bool ScCompiler::HandleTableRef() if (pDBData->HasTotals()) aRange.aStart.SetRow( aRange.aEnd.Row()); else -bAddRange = false; +nError = errNoRef; bForwardToClose = true; } break; @@ -4921,7 +4923,7 @@ bool ScCompiler::HandleTableRef() if (pDBData->HasHeader()) aRange.aStart.IncRow(); if (aRange.aEnd.Row() < aRange.aStart.Row()) -bAddRange = false; +nError = errNoRef; bForwardToClose = true; } break; @@ -4933,7 +4935,7 @@ bool ScCompiler::HandleTableRef() aRange.aEnd.SetRow( aPos.Row()); } else -bAddRange = false; +nError = errNoRef; bForwardToClose = true; } break; @@ -4995,6 +4997,11 @@ bool ScCompiler::HandleTableRef() eState = sStop; } break; +case ocBad: +eState = sLast; +if (!nError) +nError = errNoName; +break; default: eState = sStop; } @@ -5005,7 +5012,8 @@ bool ScCompiler::HandleTableRef() } } while (eState != sStop); } -if (bAddRange) +ScTokenArray* pNew = new ScTokenArray(); +if (!nError) { if (bColumnRange) { @@ -5083,7 +5091,7 @@ bool ScCompiler::HandleTableRef() } else { -pTR->SetAreaRefRPN( pNew->Add( new FormulaErrorToken( errNoRef))); +pTR->SetAreaRefRPN( pNew->Add( new FormulaErrorToken( nError))); } while (nLevel-- > 0) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] mso-dumper.git: 14 commits - Makefile msodumper/docrecord.py msodumper/docstream.py msodumper/emfrecord.py msodumper/msometa.py msodumper/vsdstream.py test/doc test/vsd-test.py v
Makefile |1 + msodumper/docrecord.py |5 +++-- msodumper/docstream.py |5 ++--- msodumper/emfrecord.py | 13 + msodumper/msometa.py | 11 ++- msodumper/vsdstream.py |7 --- test/doc/test.py |4 ++-- test/vsd-test.py |7 +++ vsd-dump.py|3 +-- 9 files changed, 19 insertions(+), 37 deletions(-) New commits: commit adeaf7ba72f0cb5202fd7d521b389368a615613b Author: Miklos Vajna Date: Fri Apr 17 16:02:34 2015 +0200 vsdstream: unsed imports diff --git a/msodumper/vsdstream.py b/msodumper/vsdstream.py index 95fca0c..8b0a5eb 100644 --- a/msodumper/vsdstream.py +++ b/msodumper/vsdstream.py @@ -6,14 +6,7 @@ # import ole -import ctypes -import struct from docdirstream import DOCDirStream -import docrecord -import globals -import sys -import os -import bisect from msometa import SummaryInformationStream from msometa import DocumentSummaryInformationStream commit eb5c33cd921726dce603673e79001303cc11a09c Author: Miklos Vajna Date: Fri Apr 17 16:06:13 2015 +0200 vsd-dump: unused variable diff --git a/vsd-dump.py b/vsd-dump.py index cb18e8d..9f9b13a 100755 --- a/vsd-dump.py +++ b/vsd-dump.py @@ -31,9 +31,8 @@ class VSDDumper: def main(args): -exname, args = args[0], args[1:] params = globals.Params() -dumper = VSDDumper(args[0], params) +dumper = VSDDumper(args[1], params) dumper.dump() if __name__ == '__main__': commit cb4ba398da1d7cc7545ce21bda913d9fb38316ed Author: Miklos Vajna Date: Fri Apr 17 16:05:16 2015 +0200 vsd-test: GUID is now in msometa diff --git a/test/vsd-test.py b/test/vsd-test.py index b08f141..a5fac0c 100755 --- a/test/vsd-test.py +++ b/test/vsd-test.py @@ -16,7 +16,7 @@ sys.path.append(sys.path[0] + "/..") import msodumper.docdirstream import msodumper.globals -import msodumper.vsdstream +import msodumper.msometa import time @@ -47,7 +47,7 @@ class OLEStream(msodumper.docdirstream.DOCDirStream): print '' % RightSiblingID ChildID = self.readuInt32() print '' % ChildID -msodumper.vsdstream.GUID(self, "CLSID").dump() +msodumper.msometa.GUID(self, "CLSID").dump() StateBits = self.readuInt32() print '' % StateBits FILETIME(self, "CreationTime").dump() @@ -131,8 +131,7 @@ class OLEDumper: def main(args): -exname, args = args[0], args[1:] -dumper = OLEDumper(args[0]) +dumper = OLEDumper(args[1]) dumper.dump() if __name__ == '__main__': commit 10eb696fe4662559a9d08c33d362ebc14327490c Author: Miklos Vajna Date: Fri Apr 17 16:03:43 2015 +0200 doc-test: unused variables diff --git a/test/doc/test.py b/test/doc/test.py index 55d9819..9f64f9d 100755 --- a/test/doc/test.py +++ b/test/doc/test.py @@ -50,7 +50,7 @@ class Test(unittest.TestCase): """This test just makes sure that all files in the 'pass' directory are dumped without problems.""" -for dirname, dirnames, filenames in os.walk('pass'): +for dirname, dummy, filenames in os.walk('pass'): for filename in filenames: if filename.endswith(".doc"): self.dump(os.path.join(dirname, filename).replace('.doc', '')) @@ -116,7 +116,7 @@ class Test(unittest.TestCase): self.assertEqual('This is a comment.\\x0D', comments[0].findall('transformed')[0].attrib['value']) self.assertEqual('This is also commented.\\x0D', comments[1].findall('transformed')[0].attrib['value']) -commentStarts = self.root.findall('stream[@name="WordDocument"]/fib/fibRgFcLcbBlob/lcbPlcfAtnBkf/plcfBkf/aCP') +# commentStarts = self.root.findall('stream[@name="WordDocument"]/fib/fibRgFcLcbBlob/lcbPlcfAtnBkf/plcfBkf/aCP') commentEnds = self.root.findall('stream[@name="WordDocument"]/fib/fibRgFcLcbBlob/lcbPlcfAtnBkl/plcfBkl/aCP') # The first comment covers Hello\x05, the second covers This\x05. commit bb801ae3bbfcf5bf71df03d7d189395509c73e64 Author: Miklos Vajna Date: Fri Apr 17 16:00:36 2015 +0200 msometa: unsed imports diff --git a/msodumper/msometa.py b/msodumper/msometa.py index 5f245f9..ef9f64b 100644 --- a/msodumper/msometa.py +++ b/msodumper/msometa.py @@ -5,15 +5,8 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -import ole -import ctypes -import struct from docdirstream import DOCDirStream -import docrecord import globals -import sys -import os -import bisect PIDDSI = { commit 8e35000af592910dd3d45fada6886443b94171f1 Author: Miklos Vajna Date: Fri Apr 17 15:59:47 2015 +0200 msometa: unsed variables diff --git a/msodumper/msometa.py b/msodumper/msometa.py index 2afd8fa..5f245f9 100644 --- a/msodumper/msometa.py +++ b/msodumper/msometa.py @@ -269,7 +269,7 @@ class CodePageString(DOCDirStream): print '<%s type="CodePageString">' % self.name self.printAndSet("Size", self.readuInt32()) bytes = [] -for
[Libreoffice-commits] core.git: vcl/quartz
vcl/quartz/salbmp.cxx | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) New commits: commit d457c25c491267999b1f82f2b4f76f7ccbe9cf37 Author: Stephan Bergmann Date: Fri Apr 17 16:16:41 2015 +0200 Blind fix for ImplPixelFormat16 As pointed out by tml on IRC, its implementation looks completely bogus, and together with the previous 40a26be24bd64a6c7c8cc98228fd440c8b9323b5 "loplugin:implicitboolconversion gold" that gives rise to the suspicion that the class is effectively unused anyway. Change-Id: If5fa5cdd1dac51f10dba7c77ad9975ee61ccc8be diff --git a/vcl/quartz/salbmp.cxx b/vcl/quartz/salbmp.cxx index a0e5ca4..2bb7b29 100644 --- a/vcl/quartz/salbmp.cxx +++ b/vcl/quartz/salbmp.cxx @@ -334,12 +334,10 @@ namespace { class ImplPixelFormat { -protected: -sal_uInt8* pData; public: static ImplPixelFormat* GetFormat( sal_uInt16 nBits, const BitmapPalette& rPalette ); -virtual void StartLine( sal_uInt8* pLine ) { pData = pLine; } +virtual void StartLine( sal_uInt8* pLine ) = 0; virtual void SkipPixel( sal_uInt32 nPixel ) = 0; virtual ColorData ReadPixel() = 0; virtual void WritePixel( ColorData nColor ) = 0; @@ -349,7 +347,9 @@ public: class ImplPixelFormat32 : public ImplPixelFormat // currently ARGB-format for 32bit depth { +sal_uInt8* pData; public: +virtual void StartLine( sal_uInt8* pLine ) SAL_OVERRIDE { pData = pLine; } virtual void SkipPixel( sal_uInt32 nPixel ) SAL_OVERRIDE { pData += nPixel << 2; @@ -372,7 +372,9 @@ public: class ImplPixelFormat24 : public ImplPixelFormat // currently BGR-format for 24bit depth { +sal_uInt8* pData; public: +virtual void StartLine( sal_uInt8* pLine ) SAL_OVERRIDE { pData = pLine; } virtual void SkipPixel( sal_uInt32 nPixel ) SAL_OVERRIDE { pData += (nPixel << 1) + nPixel; @@ -394,13 +396,12 @@ public: class ImplPixelFormat16 : public ImplPixelFormat // currently R5G6B5-format for 16bit depth { -protected: -sal_uInt16* pData16; +sal_uInt16* pData; public: virtual void StartLine( sal_uInt8* pLine ) SAL_OVERRIDE { -pData16 = reinterpret_cast(pLine); +pData = reinterpret_cast(pLine); } virtual void SkipPixel( sal_uInt32 nPixel ) SAL_OVERRIDE { @@ -408,14 +409,14 @@ public: } virtual ColorData ReadPixel() SAL_OVERRIDE { -const ColorData c = RGB_COLORDATA( (*pData & 0x7c00) >> 7, (*pData & 0x03e0) >> 2 , (*pData & 0x001f) << 3 ); +const ColorData c = RGB_COLORDATA( (*pData & 0xf800) >> 8, (*pData & 0x07e0) >> 3 , (*pData & 0x001f) << 3 ); pData++; return c; } virtual void WritePixel( ColorData nColor ) SAL_OVERRIDE { -*pData++ = ((COLORDATA_RED( nColor ) & 0xf8 ) << 7 ) | -((COLORDATA_GREEN( nColor ) & 0xf8 ) << 2 ) | +*pData++ = ((COLORDATA_RED( nColor ) & 0xf8 ) << 8 ) | +((COLORDATA_GREEN( nColor ) & 0xfc ) << 3 ) | ((COLORDATA_BLUE( nColor ) & 0xf8 ) >> 3 ); } }; @@ -423,6 +424,7 @@ public: class ImplPixelFormat8 : public ImplPixelFormat { private: +sal_uInt8* pData; const BitmapPalette& mrPalette; public: @@ -430,6 +432,7 @@ public: : mrPalette( rPalette ) { } +virtual void StartLine( sal_uInt8* pLine ) SAL_OVERRIDE { pData = pLine; } virtual void SkipPixel( sal_uInt32 nPixel ) SAL_OVERRIDE { pData += nPixel; @@ -448,6 +451,7 @@ public: class ImplPixelFormat4 : public ImplPixelFormat { private: +sal_uInt8* pData; const BitmapPalette& mrPalette; sal_uInt32 mnX; sal_uInt32 mnShift; @@ -489,6 +493,7 @@ public: class ImplPixelFormat1 : public ImplPixelFormat { private: +sal_uInt8* pData; const BitmapPalette& mrPalette; sal_uInt32 mnX; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: chart2/source svx/source
chart2/source/view/diagram/VDiagram.cxx | 24 +--- svx/source/engine3d/dragmt3d.cxx|5 + svx/source/engine3d/e3dundo.cxx |4 svx/source/engine3d/obj3d.cxx |3 +++ svx/source/engine3d/scene3d.cxx |2 ++ svx/source/svdraw/svdundo.cxx |4 6 files changed, 39 insertions(+), 3 deletions(-) New commits: commit ba397fc65fa4a21742b62c5b3f796b3535263ef4 Author: Tor Lillqvist Date: Fri Apr 17 17:15:32 2015 +0300 Revert "WaE: unused variables" See 3ac1584549364c573d4d4e3baed9ad39ad6ce8e4. This reverts commit 7bcf9131032cbcdb162f33d03230e43d4f1db2aa. This reverts commit 063aec33f029f1fbdd1b1ee274e94a00f256465e. diff --git a/chart2/source/view/diagram/VDiagram.cxx b/chart2/source/view/diagram/VDiagram.cxx index ae8a165..9f5db99 100644 --- a/chart2/source/view/diagram/VDiagram.cxx +++ b/chart2/source/view/diagram/VDiagram.cxx @@ -209,6 +209,24 @@ void VDiagram::createShapes_2d() adjustPosAndSize_2d( m_aAvailablePosIncludingAxes, m_aAvailableSizeIncludingAxes ); } +E3dScene* lcl_getE3dScene( const uno::Reference< drawing::XShape >& xShape ) +{ +E3dScene* pRet=NULL; +uno::Reference< lang::XUnoTunnel > xUnoTunnel( xShape, uno::UNO_QUERY ); +uno::Reference< lang::XTypeProvider > xTypeProvider( xShape, uno::UNO_QUERY ); +if(xUnoTunnel.is()&&xTypeProvider.is()) +{ +SvxShape* pSvxShape = reinterpret_cast(xUnoTunnel->getSomething( SvxShape::getUnoTunnelId() )); +if(pSvxShape) +{ +SdrObject* pObj = pSvxShape->GetSdrObject(); +if( pObj && pObj->ISA(E3dScene) ) +pRet = static_cast(pObj); +} +} +return pRet; +} + void lcl_setLightSources( const uno::Reference< beans::XPropertySet > & xSource, const uno::Reference< beans::XPropertySet > & xDest ) @@ -419,8 +437,7 @@ void VDiagram::adjustAspectRatio3d( const awt::Size& rAvailableSize ) // To get the 3D aspect ratio's effect on the 2D scene size, the scene's 2D size needs to be adapted to // 3D content changes here. The tooling class remembers the current 3D transformation stack // and in its destructor, calculates a new 2D SnapRect for the scene and it's modified 3D geometry. - -// Unclear whether the above comment refers to an unused variable that was removed, or to the below code +E3DModifySceneSnapRectUpdater aUpdater(lcl_getE3dScene( m_xOuterGroupShape )); m_xAspectRatio3D->setPropertyValue( UNO_NAME_3D_TRANSFORM_MATRIX , uno::makeAny(BaseGFXHelper::B3DHomMatrixToHomogenMatrix( aResult )) ); @@ -585,7 +602,7 @@ void VDiagram::createShapes_3d() aEffectiveTranformation.shearXY(m_fYAnglePi,-m_fXAnglePi); //#i98497# 3D charts are rendered with wrong size - +E3DModifySceneSnapRectUpdater aUpdater(lcl_getE3dScene( m_xOuterGroupShape )); xDestProp->setPropertyValue( UNO_NAME_3D_TRANSFORM_MATRIX, uno::makeAny( BaseGFXHelper::B3DHomMatrixToHomogenMatrix( aEffectiveTranformation ) ) ); } @@ -642,6 +659,7 @@ void VDiagram::createShapes_3d() ::basegfx::B3DHomMatrix aM; aM.translate(GRID_TO_WALL_DISTANCE/fXScale, GRID_TO_WALL_DISTANCE/fYScale, GRID_TO_WALL_DISTANCE/fZScale); aM.scale( fXScale, fYScale, fZScale ); +E3DModifySceneSnapRectUpdater aUpdater(lcl_getE3dScene( m_xOuterGroupShape )); xShapeProp->setPropertyValue( UNO_NAME_3D_TRANSFORM_MATRIX , uno::makeAny(BaseGFXHelper::B3DHomMatrixToHomogenMatrix(aM)) ); } diff --git a/svx/source/engine3d/dragmt3d.cxx b/svx/source/engine3d/dragmt3d.cxx index e02a6a7..39dd69f 100644 --- a/svx/source/engine3d/dragmt3d.cxx +++ b/svx/source/engine3d/dragmt3d.cxx @@ -159,6 +159,7 @@ bool E3dDragMethod::EndSdrDrag(bool /*bCopy*/) for(nOb=0;nObSetTransform(rCandidate.maTransform); if( bUndo ) { @@ -186,6 +187,7 @@ void E3dDragMethod::CancelSdrDrag() { // Restore transformation E3dDragMethodUnit& rCandidate = maGrp[nOb]; +E3DModifySceneSnapRectUpdater aUpdater(rCandidate.mp3DObj); rCandidate.mp3DObj->SetTransform(rCandidate.maInitTransform); } } @@ -406,6 +408,7 @@ void E3dDragRotate::MoveSdrDrag(const Point& rPnt) if(mbMoveFull) { +E3DModifySceneSnapRectUpdater aUpdater(rCandidate.mp3DObj); rCandidate.mp3DObj->SetTransform(rCandidate.maTransform); } else @@ -555,6 +558,7 @@ void E3dDragMove::MoveSdrDrag(const Point& rPnt) if(mbMoveFull) { +E3DModifySceneSnapRectUpdater aUpdater(rCandidate.mp3DObj); rCan
two changes of suspicious code (sc, sw)
The updated loplugin:implicitboolconversion now also warns about implicit conversions from bool to unsigned char (which had been left out in the past because it is hard to distinguish plain unsigned char from bool-like typedefs like sal_Bool, when the typedef is used as a type argument of a template specialization, as in css::uno::Sequence). That flagged two places that I tried to fix as best I could, but wouldn't mind if others more familiar with the respective code would take a look, too: One is in sc: commit c007829a67456ef01b82b8368f7ed3e5a3026c95 Author: Stephan Bergmann Date: Fri Apr 17 14:24:35 2015 +0200 Clean up conversions from ScBreakType (aka sal_uInt8) to bool ...assuming these shall indeed all convert everything but BREAK_NONE to true? Change-Id: Ib1c863bfbf9be58aa7867aa69c8347f6358f6550 diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index c2b9637..7fa734f 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -8871,7 +8871,7 @@ void ScTableColumnObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pE else if ( pEntry->nWID == SC_WID_UNO_NEWPAGE ) { ScBreakType nBreak = rDoc.HasColBreak(nCol, nTab); -ScUnoHelpFunctions::SetBoolInAny( rAny, nBreak ); +ScUnoHelpFunctions::SetBoolInAny( rAny, nBreak != BREAK_NONE ); } else if ( pEntry->nWID == SC_WID_UNO_MANPAGE ) { @@ -9024,12 +9024,12 @@ void ScTableRowObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntr else if ( pEntry->nWID == SC_WID_UNO_NEWPAGE ) { ScBreakType nBreak = rDoc.HasRowBreak(nRow, nTab); -ScUnoHelpFunctions::SetBoolInAny( rAny, nBreak ); +ScUnoHelpFunctions::SetBoolInAny( rAny, nBreak != BREAK_NONE ); } else if ( pEntry->nWID == SC_WID_UNO_MANPAGE ) { ScBreakType nBreak = (rDoc.HasRowBreak(nRow, nTab) & BREAK_MANUAL); -ScUnoHelpFunctions::SetBoolInAny( rAny, nBreak ); +ScUnoHelpFunctions::SetBoolInAny( rAny, nBreak != BREAK_NONE ); } else ScCellRangeObj::GetOnePropertyValue(pEntry, rAny); diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 20ffa33..6bbc540 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -3543,7 +3543,7 @@ uno::Any SAL_CALL ScTableColumnsObj::getPropertyValue( const OUString& aProperty else if ( aNameString == SC_UNONAME_NEWPAGE ) { ScBreakType nBreak = rDoc.HasColBreak(nStartCol, nTab); -ScUnoHelpFunctions::SetBoolInAny( aAny, nBreak ); +ScUnoHelpFunctions::SetBoolInAny( aAny, nBreak != BREAK_NONE ); } else if ( aNameString == SC_UNONAME_MANPAGE ) { @@ -3820,7 +3820,7 @@ uno::Any SAL_CALL ScTableRowsObj::getPropertyValue( const OUString& aPropertyNam else if ( aNameString == SC_UNONAME_NEWPAGE ) { ScBreakType nBreak = rDoc.HasRowBreak(nStartRow, nTab); -ScUnoHelpFunctions::SetBoolInAny( aAny, nBreak ); +ScUnoHelpFunctions::SetBoolInAny( aAny, nBreak != BREAK_NONE ); } else if ( aNameString == SC_UNONAME_MANPAGE ) { And the other is in sw: commit 0b49aaf09becf8775411b7082b95e87086e8b5d7 Author: Stephan Bergmann Date: Fri Apr 17 11:46:38 2015 +0200 loplugin:implicitboolconversion gold? The code was like that ever since 84a3db80b4fd66c6854b3135b5f69b61fd828e62 "initial import" but looks very much like the intent was to make the conditional operator bind tighter than the less-than operator. Change-Id: I810aa5dc56f02e98111f4879db50c59a9b69b8d6 diff --git a/sw/source/core/edit/ednumber.cxx b/sw/source/core/edit/ednumber.cxx index c885aac..ee3b3c8 100644 --- a/sw/source/core/edit/ednumber.cxx +++ b/sw/source/core/edit/ednumber.cxx @@ -510,7 +510,7 @@ bool SwEditShell::MoveNumParas( bool bUpperLower, bool bUpperLeft ) bRet = GetDoc()->MoveParagraph( aCrsr, nOffset ); } } -else if( bUpperLeft ? nUpperLevel : nLowerLevel+1 < MAXLEVEL ) +else if( (bUpperLeft ? nUpperLevel : nLowerLevel+1) < MAXLEVEL ) { aCrsr.Move( fnMoveBackward, fnGoNode ); bRet = GetDoc()->NumUpDown( aCrsr, !bUpperLeft ); ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: Branch 'feature/vclptr' - basctl/source include/sfx2 include/svtools include/svx sc/source sd/source sfx2/source svx/source svx/workben sw/source
basctl/source/basicide/tbxctl.cxx | 2 basctl/source/basicide/tbxctl.hxx | 2 include/sfx2/tbxctrl.hxx | 4 - include/svtools/popupwindowcontroller.hxx | 3 - include/svx/ParaLineSpacingPopup.hxx | 2 include/svx/clipboardctl.hxx | 2 include/svx/fontworkgallery.hxx| 2 include/svx/grafctrl.hxx | 2 include/svx/layctrl.hxx| 4 - include/svx/lboxctrl.hxx | 4 - include/svx/linectrl.hxx | 2 include/svx/subtoolboxcontrol.hxx | 2 include/svx/tbcontrl.hxx | 6 +- include/svx/tbxalign.hxx | 2 include/svx/tbxcustomshapes.hxx| 2 sc/source/ui/cctrl/tbinsert.cxx| 2 sc/source/ui/inc/tbinsert.hxx | 2 sd/source/ui/app/tbxww.cxx | 2 sd/source/ui/controller/slidelayoutcontroller.cxx | 2 sd/source/ui/controller/slidelayoutcontroller.hxx | 2 sd/source/ui/inc/tbx_ww.hxx| 2 sfx2/source/toolbox/tbxitem.cxx| 4 - svx/source/customshapes/tbxcustomshapes.cxx| 2 svx/source/form/tbxform.cxx| 2 svx/source/inc/tbxform.hxx | 2 svx/source/mnuctrls/clipboardctl.cxx | 2 svx/source/sidebar/paragraph/ParaLineSpacingPopup.cxx | 2 svx/source/svdraw/sdrpaintwindow.cxx | 2 svx/source/svdraw/svdfmtf.cxx | 2 svx/source/svdraw/svdibrow.cxx | 4 - svx/source/svdraw/svdpntv.cxx | 2 svx/source/tbxctrls/SvxColorChildWindow.cxx| 3 - svx/source/tbxctrls/bulletsnumbering.cxx | 8 +-- svx/source/tbxctrls/colrctrl.cxx | 2 svx/source/tbxctrls/extrusioncontrols.cxx | 16 +++--- svx/source/tbxctrls/extrusioncontrols.hxx | 8 +-- svx/source/tbxctrls/fillctrl.cxx | 4 - svx/source/tbxctrls/fontworkgallery.cxx| 14 ++--- svx/source/tbxctrls/grafctrl.cxx | 6 +- svx/source/tbxctrls/layctrl.cxx| 18 +++ svx/source/tbxctrls/lboxctrl.cxx | 8 +-- svx/source/tbxctrls/linectrl.cxx | 10 ++-- svx/source/tbxctrls/subtoolboxcontrol.cxx | 2 svx/source/tbxctrls/tbcontrl.cxx | 25 +- svx/source/tbxctrls/tbunocontroller.cxx| 3 - svx/source/tbxctrls/tbunosearchcontrollers.cxx | 6 +- svx/source/tbxctrls/tbxalign.cxx | 2 svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx | 4 - svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.cxx | 2 svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.cxx | 2 svx/source/unodraw/UnoGraphicExporter.cxx | 6 +- svx/workben/msview/msview.cxx | 2 svx/workben/pixelctl.cxx | 2 sw/source/uibase/inc/tblctrl.hxx | 2 sw/source/uibase/inc/tbxanchr.hxx | 2 sw/source/uibase/inc/workctrl.hxx | 6 +- sw/source/uibase/ribbar/tblctrl.cxx| 2 sw/source/uibase/ribbar/tbxanchr.cxx | 2 sw/sour
[Libreoffice-commits] core.git: svx/source
svx/source/tbxctrls/tbcontrl.cxx | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) New commits: commit 4c24d41d9f44cbeafde6ffbdcdfdf15e20112357 Author: Noel Power Date: Fri Apr 17 16:02:03 2015 +0100 fdo#71797 strange font selection bug with font preview The dialog seems to be automatically in preview mode from the start (which seems wrong) That bogus mode of operation (which I failed to fix from the begining) is somewhat responsible for the behaviour we see. Adding here a further ugly hack to ensure we use GetText when not in drop down mode (this is when clicking on a cell or cycling through the font list with up/down keys) In dropdown mode sweeping with the mouse highlights fonts (and we preview the highlighted ones) Note: in this case the selected font and the highlighted font are different, we need to pick up the correct one. Change-Id: Id2ba96a57d2f8cfc9657bce8de3ac27588868eaf Signed-off-by: Noel Power diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 88a6b93..ea648c8 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -1040,8 +1040,17 @@ void SvxFontNameBox_Impl::UserDraw( const UserDrawEvent& rUDEvt ) // or select if ( rUDEvt.GetItemId() == rUDEvt.GetStyle() ) { +OUString fontName(GetText()); +if (IsInDropDown()) +{ +/* + * when in dropdown mode the selected item should be + * used and not the current selection + */ + fontName = GetEntry(rUDEvt.GetItemId()); +} Sequence< PropertyValue > aArgs( 1 ); -vcl::FontInfo aInfo( pFontList->Get( GetEntry( rUDEvt.GetItemId() ), +vcl::FontInfo aInfo( pFontList->Get( fontName, aCurFont.GetWeight(), aCurFont.GetItalic() ) ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/source
sc/source/ui/unoobj/cellsuno.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit c110559268461dd3b7b8e28d24e36fdbcc25bb17 Author: Stephan Bergmann Date: Fri Apr 17 17:05:29 2015 +0200 simplify code Change-Id: I07e0b1689225a78db92bd7338291a128d671c0ab diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index 7fa734f..ddcced2 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -9028,8 +9028,8 @@ void ScTableRowObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntr } else if ( pEntry->nWID == SC_WID_UNO_MANPAGE ) { -ScBreakType nBreak = (rDoc.HasRowBreak(nRow, nTab) & BREAK_MANUAL); -ScUnoHelpFunctions::SetBoolInAny( rAny, nBreak != BREAK_NONE ); +bool bBreak = (rDoc.HasRowBreak(nRow, nTab) & BREAK_MANUAL) != 0; +ScUnoHelpFunctions::SetBoolInAny( rAny, bBreak ); } else ScCellRangeObj::GetOnePropertyValue(pEntry, rAny); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/vclptr' - dbaccess/source include/svtools include/svx svtools/source svx/source
dbaccess/source/ui/browser/sbagrid.cxx |4 dbaccess/source/ui/inc/sbagrid.hxx |4 dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx |2 dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx |2 include/svtools/editbrowsebox.hxx |2 include/svx/fmgridcl.hxx|2 include/svx/fmgridif.hxx|2 include/svx/hdft.hxx|8 - svtools/source/brwbox/editbrowsebox.cxx |2 svx/source/dialog/_bmpmask.cxx | 12 +- svx/source/dialog/_contdlg.cxx |4 svx/source/dialog/charmap.cxx |2 svx/source/dialog/compressgraphicdialog.cxx |2 svx/source/dialog/ctredlin.cxx |6 - svx/source/dialog/dialcontrol.cxx |6 - svx/source/dialog/dlgctl3d.cxx |8 - svx/source/dialog/dlgctrl.cxx |2 svx/source/dialog/docrecovery.cxx |4 svx/source/dialog/frmsel.cxx|2 svx/source/dialog/hdft.cxx |4 svx/source/dialog/imapdlg.cxx |4 svx/source/dialog/optgrid.cxx |2 svx/source/dialog/rubydialog.cxx|2 svx/source/dialog/svxbmpnumvalueset.cxx |2 svx/source/engine3d/float3d.cxx |2 svx/source/fmcomp/fmgridcl.cxx |4 svx/source/fmcomp/fmgridif.cxx |4 svx/source/fmcomp/gridcell.cxx | 58 ++-- svx/source/fmcomp/gridctrl.cxx | 20 ++-- svx/source/form/datanavi.cxx| 14 +- svx/source/form/filtnav.cxx |4 svx/source/form/fmPropBrw.cxx |4 svx/source/form/fmexpl.cxx |4 svx/source/form/fmtextcontrolshell.cxx |8 + svx/source/form/tabwin.cxx |4 svx/source/gallery2/GalleryControl.cxx |8 + svx/source/gallery2/galbrws1.cxx|4 svx/source/gallery2/galbrws2.cxx| 18 +-- svx/source/inc/gridcell.hxx | 10 +- svx/source/sdr/overlay/overlaymanagerbuffered.cxx |4 svx/source/sidebar/EmptyPanel.cxx |2 svx/source/sidebar/area/AreaPropertyPanel.cxx |3 svx/source/sidebar/area/AreaPropertyPanel.hxx | 12 +- svx/source/sidebar/area/AreaTransparencyGradientControl.cxx | 28 ++--- svx/source/sidebar/graphic/GraphicPropertyPanel.cxx |3 svx/source/sidebar/graphic/GraphicPropertyPanel.hxx | 12 +- svx/source/sidebar/line/LinePropertyPanel.cxx |2 svx/source/sidebar/line/LinePropertyPanel.hxx | 12 +- svx/source/sidebar/line/LineWidthControl.cxx|8 - svx/source/sidebar/paragraph/ParaLineSpacingPopup.cxx |2 svx/source/sidebar/paragraph/ParaPropertyPanel.cxx |3 svx/source/sidebar/paragraph/ParaPropertyPanel.hxx | 12 +- svx/source/sidebar/possize/PosSizePropertyPanel.cxx |3 svx/source/sidebar/possize/PosSizePropertyPanel.hxx | 14 +- svx/source/sidebar/text/TextCharacterSpacingControl.cxx | 12 +- svx/source/sidebar/text/TextPropertyPanel.cxx |3 svx/source/sidebar/text/TextPropertyPanel.hxx | 13 +- svx/source/sidebar/text/TextUnderlineControl.cxx|4 svx/source/sidebar/tools/Popup.cxx |2 59 files changed, 207 insertions(+), 203 deletions(-) New commits: commit cb516fafbb2a6217d9c41030217cb024ff18272e Author: Noel Grandin Date: Fri Apr 17 16:55:41 2015 +0200 svx: convert new to ::Create. Change-Id: Idbcc64e883b79081c7a6399e1aed8a6b20035f69 diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx index 74e6691..fe2268b 100644 --- a/dbaccess/source/ui/browser/sbagrid.cxx +++ b/dbaccess/source/ui/browser/sbagrid.cxx @@ -549,7 +549,7 @@ SbaXGridPeer* SbaXGridPeer::getImplementation(const Reference< XInterface >& _rx return NULL; } -FmGridControl* SbaXGridPeer::imp_CreateControl(vcl::Window* pParent, WinBits nStyle) +VclPtr SbaXGridPeer::imp_CreateControl(vcl::Window* pParent, WinBits nStyle) { return new SbaGridControl( m_xContext, pParent, this, nStyle); } @@ -727,7 +727,7 @@ vo
[Libreoffice-commits] core.git: shell/source
shell/source/backends/kde4be/kde4backend.cxx |3 +++ shell/source/backends/kdebe/kdebackend.cxx |3 +++ 2 files changed, 6 insertions(+) New commits: commit 5eff55bfa868f768674407fbcdbb18c0b225d99c Author: Stephan Bergmann Date: Fri Apr 17 17:06:02 2015 +0200 Don't throw UnknownPropertyException for givenname/sn from KDE backends Open TODO to actually obtain values for them, instead of returning an empty css::beans::Optional representing "no value available." Change-Id: Iceb286e9873216f7bc36bd88b09ac03bd3a2c895 diff --git a/shell/source/backends/kde4be/kde4backend.cxx b/shell/source/backends/kde4be/kde4backend.cxx index 4670aff..05931bd 100644 --- a/shell/source/backends/kde4be/kde4backend.cxx +++ b/shell/source/backends/kde4be/kde4backend.cxx @@ -178,6 +178,9 @@ css::uno::Any Service::getPropertyValue(OUString const & PropertyName) enabled_ ? kde4access::getValue(PropertyName) : css::beans::Optional< css::uno::Any >()); +} else if (PropertyName == "givenname" || PropertyName == "sn") { +return css::uno::makeAny(css::beans::Optional< css::uno::Any >()); +//TODO: obtain values from KDE? } throw css::beans::UnknownPropertyException( PropertyName, static_cast< cppu::OWeakObject * >(this)); diff --git a/shell/source/backends/kdebe/kdebackend.cxx b/shell/source/backends/kdebe/kdebackend.cxx index 96b5a44..77a561d 100644 --- a/shell/source/backends/kdebe/kdebackend.cxx +++ b/shell/source/backends/kdebe/kdebackend.cxx @@ -178,6 +178,9 @@ css::uno::Any Service::getPropertyValue(OUString const & PropertyName) enabled_ ? kdeaccess::getValue(PropertyName) : css::beans::Optional< css::uno::Any >()); +} else if (PropertyName == "givenname" || PropertyName == "sn") { +return css::uno::makeAny(css::beans::Optional< css::uno::Any >()); +//TODO: obtain values from KDE? } throw css::beans::UnknownPropertyException( PropertyName, static_cast< cppu::OWeakObject * >(this)); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source
sw/source/filter/ww8/docxattributeoutput.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit c8b6751cb4fb0dc834015a1cdfe3adb8506a0f2b Author: Caolán McNamara Date: Fri Apr 17 15:57:33 2015 +0100 get the vertical span from the reliable getRowSpansOfRow unstead of the unreliable pTblBox Change-Id: I083560fdbcf83173c5f3c42267ca2d8e4e6d9a17 diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index f5e9581..09632bc 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -2839,7 +2839,8 @@ void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Point } // Vertical merges -long vSpan = pTblBox->getRowSpan( ); +ww8::RowSpansPtr xRowSpans = pTableTextNodeInfoInner->getRowSpansOfRow(); +sal_Int32 vSpan = (*xRowSpans)[nCell]; if ( vSpan > 1 ) { m_pSerializer->singleElementNS( XML_w, XML_vMerge, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/vclptr' - include/svtools svtools/source
include/svtools/brwbox.hxx|2 +- include/svtools/calendar.hxx |2 +- include/svtools/editbrowsebox.hxx |2 +- include/svtools/toolbarmenu.hxx |2 +- svtools/source/brwbox/brwbox1.cxx | 10 +- svtools/source/brwbox/brwbox2.cxx |2 +- svtools/source/brwbox/ebbcontrols.cxx |2 +- svtools/source/brwbox/editbrowsebox.cxx |6 +++--- svtools/source/contnr/DocumentInfoPreview.cxx |2 +- svtools/source/contnr/fileview.cxx|4 ++-- svtools/source/contnr/imivctl1.cxx| 11 ++- svtools/source/contnr/simptabl.cxx|2 +- svtools/source/contnr/svimpbox.cxx|6 +++--- svtools/source/contnr/treelistbox.cxx |4 ++-- svtools/source/control/calendar.cxx | 12 ++-- svtools/source/control/filectrl.cxx |4 ++-- svtools/source/control/roadmap.cxx|4 ++-- svtools/source/control/ruler.cxx |2 +- svtools/source/control/scrwin.cxx |6 +++--- svtools/source/control/tabbar.cxx | 12 ++-- svtools/source/control/toolbarmenu.cxx|4 ++-- svtools/source/control/valueset.cxx |6 +++--- svtools/source/dialogs/prnsetup.cxx |8 svtools/source/dialogs/roadmapwizard.cxx |2 +- svtools/source/dialogs/wizardmachine.cxx | 10 +- svtools/source/hatchwindow/hatchwindow.cxx|2 +- svtools/source/misc/ehdl.cxx |8 svtools/source/table/tablecontrol_impl.cxx|7 --- svtools/source/toolpanel/drawerlayouter.cxx |2 +- svtools/source/toolpanel/paneltabbar.cxx |6 +++--- svtools/source/toolpanel/tablayouter.cxx |2 +- svtools/source/toolpanel/toolpaneldeck.cxx|2 +- svtools/source/toolpanel/toolpaneldrawer.cxx |6 +++--- svtools/source/uno/treecontrolpeer.cxx|2 +- svtools/source/uno/unoiface.cxx | 16 svtools/source/uno/wizard/wizardshell.cxx |2 +- 36 files changed, 92 insertions(+), 90 deletions(-) New commits: commit 3f5733216541c5b1e9d86861812a7a857703740c Author: Noel Grandin Date: Fri Apr 17 17:16:46 2015 +0200 svtools: convert new to ::Create. Change-Id: I1f46485d23c57b2ca212ba1c349b07f22265bc89 diff --git a/include/svtools/brwbox.hxx b/include/svtools/brwbox.hxx index b7d9004..86cde1a 100644 --- a/include/svtools/brwbox.hxx +++ b/include/svtools/brwbox.hxx @@ -394,7 +394,7 @@ protected: voidDoHideCursor( const char *pWhoLog ); short GetCursorHideCount() const; -virtual BrowserHeader* CreateHeaderBar( BrowseBox* pParent ); +virtual VclPtr CreateHeaderBar( BrowseBox* pParent ); // HACK(virtual create is not called in Ctor) voidSetHeaderBar( BrowserHeader* ); diff --git a/include/svtools/calendar.hxx b/include/svtools/calendar.hxx index 189be3a..48173a3 100644 --- a/include/svtools/calendar.hxx +++ b/include/svtools/calendar.hxx @@ -423,7 +423,7 @@ public: voidSelect(); virtual boolShowDropDown( bool bShow ) SAL_OVERRIDE; -Calendar* CreateCalendar( vcl::Window* pParent ); +VclPtrCreateCalendar( vcl::Window* pParent ); Calendar* GetCalendar(); voidSetDefaultDate( const Date& rDate ) { maDefaultDate = rDate; } diff --git a/include/svtools/editbrowsebox.hxx b/include/svtools/editbrowsebox.hxx index af9ad5a..a62f2b4 100644 --- a/include/svtools/editbrowsebox.hxx +++ b/include/svtools/editbrowsebox.hxx @@ -505,7 +505,7 @@ namespace svt protected: BrowserHeader* GetHeaderBar() const {return pHeader;} -virtual BrowserHeader* CreateHeaderBar(BrowseBox* pParent) SAL_OVERRIDE; +virtual VclPtr CreateHeaderBar(BrowseBox* pParent) SAL_OVERRIDE; // if you want to have an own header ... virtual VclPtr imp_CreateHeaderBar(BrowseBox* pParent); diff --git a/include/svtools/toolbarmenu.hxx b/include/svtools/toolbarmenu.hxx index 598dec3..7c679ac 100644 --- a/include/svtools/toolbarmenu.hxx +++ b/include/svtools/toolbarmenu.hxx @@ -69,7 +69,7 @@ public: voidappendSeparator(); /** creates an empty ValueSet that is initialized and can be inserted with appendEntry. */ -ValueSet* createEmptyValueSetControl(); +VclPtr createEmptyValueSetControl(); voidcheckEntry( int nEntryId, bool bCheck = true ); diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx index 7153322..b13cc7c 100644 --- a/svtools/source/brwbox/brwbox1.cxx +++ b/svtools/source/brwbox/brwbox1.cxx @@ -128,7 +128,7 @@ BrowseBox::BrowseBox( vcl::Window* pParent, const ResId& rId, BrowserMode nMode :Control( pParent, rId ) ,DragSourceHelper( this ) ,DropTargetHelper( t
[Libreoffice-commits] core.git: sw/source
sw/source/core/layout/ftnfrm.cxx |5 + 1 file changed, 5 insertions(+) New commits: commit 02bd12876efb4d4269dba4bd8f0d18b43c7894c9 Author: Caolán McNamara Date: Fri Apr 17 16:24:10 2015 +0100 fix crash on export of ooo103108-1.odt .doc stop pDel->Cut from deleting the pLastFtnFrm that we still need Change-Id: If5dc507ea58c613a581c0528160adaa5ca5364f3 diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx index 6d21bf4..51f17f6 100644 --- a/sw/source/core/layout/ftnfrm.cxx +++ b/sw/source/core/layout/ftnfrm.cxx @@ -2288,7 +2288,12 @@ void SwFtnBossFrm::RearrangeFtns( const SwTwips nDeadLine, const bool bLock, } if( pDel ) { +bool bUnlockLastFtnFrmGuard = pLastFtnFrm && !pLastFtnFrm->IsColLocked(); +if (bUnlockLastFtnFrmGuard) +pLastFtnFrm->ColLock(); pDel->Cut(); +if (bUnlockLastFtnFrmGuard) +pLastFtnFrm->ColUnlock(); delete pDel; } if ( bMore ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
Re: Targetting Windows XP with Windows SDK 8.x
On 16.04.2015 10:09, Andras Timar wrote: > Hi, > > In the past few days I made some experiments with LibreOffice 4.4. > configure suggests that SDK version 7.1A should be used for targetting > Windows XP. configure also says that SDK version 7.1A is not known to > work with VS2013, and it is true. I could not build LibreOffice 4.4 > with VS2013 and SDK 7.1A, there were many compilation errors. that must be specific to the 4.4 branch? Win-x86_62-TDF on master builds with ´--with-windows-sdk=7.1A´ it's possible that the 4.4 branch does not actually fully support visual studio 2013. seems it's missing this commit - which should explain something: commit 5225cd46919a028add3772564fd0d63e99078820 Author: Christian Lohmaier AuthorDate: Wed Dec 10 15:21:30 2014 +0100 define _USING_V110_SDK71_ when building with VS2013 against 7.1A SDK perhaps looking through master changelog and searching for "2013" will turn up more things... > I found an article: > https://tedwvc.wordpress.com/2014/01/01/how-to-target-xp-with-vc2012-or-vc2013-and-continue-to-use-the-windows-8-x-sdk/ > > It says: > "Say we’ve decided to use Windows 8.x SDK while still allowing our app > to run on XP. Are there any options available? i.e. can you keep using > the v110/v120 toolsets instead of the v110_xp/v120_xp toolsets? Yes, > it turns out that Microsoft left a nice loophole in the code to do > exactly that. Notice the mysterious define in the block of code above > named _ATL_XP_TARGETING. Turns out this is an alternative way to > support XP targeting while _USING_V110_SDK71_ is NOT defined. So if > you really want to support XP while using Windows 8.x SDK, we simply > need to ensure our code is built with _ATL_XP_TARGETING defined. The > easiest way to do this is to add a /D_ATL_XP_TARGETING flag to our > C/C++ command line options in project properties." hmm... relying on some undocumented macro with unspecified effect that could change in next VS service pack sounds a bit dubious... probably there are other things in the headers that the macro won't affect? > I added -D_ATL_XP_TARGETING flag to > solenv/gbuild/platform/com_MSC_defs.mk instead of the last conditional > flag $(if $(findstring > 110_70,$(VCVER)_$(WINDOWS_SDK_VERSION)),-D_USING_V110_SDK71_), and I > built LibreOffice 4.4 with VS2013 and SDK 8.1. It started on Windows > XP. Then I reverted my patch, and made a full build again. > Surprisingly, the resulting build also started on Windows XP. > > So my question is: how is that possible? What config does result a > built which does not start on Windows XP then? i don't think the problem was starting on Windows XP - more likely that in some obscure cases some function is called that doesn't exist on XP. i don't remember reading anywhere what exactly in the 8.x SDK would make the resulting programs fail to run (or crash or whatever) on XP. > I have not tried this with master. What is the difference between > master and 4.4 in this regard? master is very clear about it - with 8.x SDK, sal library will use Vista-or-later functions instead of older ones that were deprecated in the 8.1 SDK, so soffice will not start. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: include/xmloff sc/inc sc/source xmloff/source
include/xmloff/xmltoken.hxx |1 + sc/inc/dpsave.hxx |1 + sc/source/core/data/dpsave.cxx | 13 + sc/source/filter/xml/XMLExportDataPilot.cxx | 12 +++- sc/source/filter/xml/xmldpimp.cxx | 11 +++ sc/source/filter/xml/xmlimprt.cxx |1 + sc/source/filter/xml/xmlimprt.hxx |1 + xmloff/source/core/xmltoken.cxx |1 + 8 files changed, 40 insertions(+), 1 deletion(-) New commits: commit c172b75b8ea5653246174399a530d238b1680ce0 Author: Markus Mohrhard Date: Fri Apr 17 09:26:34 2015 +0200 add attribute mandated by ODF Make sure that it does not confuse our importer by adding an attibute to ignore it when the new elements have been added. Change-Id: I15991be9dd993e2aeb18c440a14de3711f8001f4 diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx index 64a0826..4ad2936 100644 --- a/include/xmloff/xmltoken.hxx +++ b/include/xmloff/xmltoken.hxx @@ -994,6 +994,7 @@ namespace xmloff { namespace token { XML_IDEOGRAPH_ALPHA, XML_IGNORE_CASE, XML_IGNORE_EMPTY_ROWS, +XML_IGNORE_SELECTED_PAGE, // used for ODF compatibility XML_ILLUSTRATION_INDEX, XML_ILLUSTRATION_INDEX_ENTRY_TEMPLATE, XML_ILLUSTRATION_INDEX_SOURCE, diff --git a/sc/inc/dpsave.hxx b/sc/inc/dpsave.hxx index 20d5ffb..9973b99 100644 --- a/sc/inc/dpsave.hxx +++ b/sc/inc/dpsave.hxx @@ -203,6 +203,7 @@ public: void SetLayoutInfo(const ::com::sun::star::sheet::DataPilotFieldLayoutInfo* pNew); void SetCurrentPage( const OUString* pPage ); // NULL = no selection (all) +OUString GetCurrentPage() const; // only for ODF compatibility sal_uInt16 GetOrientation() const { return nOrientation; } diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx index 93e9839..fc86515 100644 --- a/sc/source/core/data/dpsave.cxx +++ b/sc/source/core/data/dpsave.cxx @@ -509,6 +509,19 @@ void ScDPSaveDimension::SetCurrentPage( const OUString* pPage ) } } +OUString ScDPSaveDimension::GetCurrentPage() const +{ +MemberList::const_iterator it = maMemberList.begin(), itEnd = maMemberList.end(); +for (; it != itEnd; ++it) +{ +const ScDPSaveMember* pMem = *it; +if (pMem->GetIsVisible()) +return pMem->GetName(); +} + +return OUString(); +} + ScDPSaveMember* ScDPSaveDimension::GetExistingMemberByName(const OUString& rName) { MemberHash::const_iterator res = maMemberHash.find (rName); diff --git a/sc/source/filter/xml/XMLExportDataPilot.cxx b/sc/source/filter/xml/XMLExportDataPilot.cxx index 09a3390..793bec5 100644 --- a/sc/source/filter/xml/XMLExportDataPilot.cxx +++ b/sc/source/filter/xml/XMLExportDataPilot.cxx @@ -690,8 +690,9 @@ void ScXMLExportDataPilot::WriteDimension(ScDPSaveDimension* pDim, const ScDPDim if (pDim->IsDataLayout()) rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_IS_DATA_LAYOUT_FIELD, XML_TRUE); OUString sValueStr; +sheet::DataPilotFieldOrientation eOrientation = (sheet::DataPilotFieldOrientation) pDim->GetOrientation(); ScXMLConverter::GetStringFromOrientation( sValueStr, -(sheet::DataPilotFieldOrientation) pDim->GetOrientation() ); + eOrientation); if( !sValueStr.isEmpty() ) rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_ORIENTATION, sValueStr ); if (pDim->GetUsedHierarchy() != 1) @@ -704,6 +705,15 @@ void ScXMLExportDataPilot::WriteDimension(ScDPSaveDimension* pDim, const ScDPDim (sheet::GeneralFunction) pDim->GetFunction() ); rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_FUNCTION, sValueStr); +if (eOrientation == sheet::DataPilotFieldOrientation_PAGE) +{ +if (rExport.getDefaultVersion() > SvtSaveOptions::ODFVER_012) +{ +rExport.AddAttribute(XML_NAMESPACE_LO_EXT, XML_IGNORE_SELECTED_PAGE, "true"); +} +rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_SELECTED_PAGE, pDim->GetCurrentPage()); +} + SvXMLElementExport aElemDPF(rExport, XML_NAMESPACE_TABLE, XML_DATA_PILOT_FIELD, true, true); WriteLevels(pDim); WriteFieldReference(pDim); diff --git a/sc/source/filter/xml/xmldpimp.cxx b/sc/source/filter/xml/xmldpimp.cxx index c080158..0ee00a0 100644 --- a/sc/source/filter/xml/xmldpimp.cxx +++ b/sc/source/filter/xml/xmldpimp.cxx @@ -1000,6 +1000,7 @@ ScXMLDataPilotFieldContext::ScXMLDataPilotFieldContext( ScXMLImport& rImport, { bool bHasName = false; bool bDataLayout = false; +bool bIgnoreSelectedPage = false; OUString aDisplayName; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; const SvXMLTokenMap& rAttrTokenMap = GetScImport().GetDataPilotFieldAttrTokenMap(); @@ -1046,6 +1047,11 @@ ScXMLDataPilotFieldContext::ScXMLDataPilotFieldContext( ScXMLImport& rImport, bSelectedPage = true;
[Libreoffice-commits] core.git: 2 commits - sw/qa sw/source writerfilter/source
sw/qa/extras/rtfexport/data/hyphauto.rtf |6 ++ sw/qa/extras/rtfexport/rtfexport.cxx |5 + sw/source/filter/ww8/rtfexport.cxx | 13 + writerfilter/source/rtftok/rtfdocumentimpl.cxx |3 +++ 4 files changed, 27 insertions(+) New commits: commit 7b3c07a78b8db73a966a0999153c6a914cbedae5 Author: Miklos Vajna Date: Fri Apr 17 17:13:51 2015 +0200 RTF filter: export \hyphauto Change-Id: Ide8cb5f45d3eb60c45d86d58a9ab12bbc9f4cf47 diff --git a/sw/qa/extras/rtfexport/data/hyphauto.rtf b/sw/qa/extras/rtfexport/data/hyphauto.rtf new file mode 100644 index 000..dd4767f --- /dev/null +++ b/sw/qa/extras/rtfexport/data/hyphauto.rtf @@ -0,0 +1,6 @@ +{\rtf1 +\hyphauto1 +\pard\plain +Hello. +\par +} diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx index 3ef2f13..dc1107a 100644 --- a/sw/qa/extras/rtfexport/rtfexport.cxx +++ b/sw/qa/extras/rtfexport/rtfexport.cxx @@ -867,6 +867,11 @@ DECLARE_RTFEXPORT_TEST(testSautoupd, "sautoupd.rtf") CPPUNIT_ASSERT_EQUAL(false, getProperty(xHeading2, "IsAutoUpdate")); } +DECLARE_RTFEXPORT_TEST(testHyphauto, "hyphauto.rtf") +{ +CPPUNIT_ASSERT_EQUAL(true, getProperty(getParagraph(1), "ParaIsHyphenation")); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index 60ca1f0..ab5e763 100644 --- a/sw/source/filter/ww8/rtfexport.cxx +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -36,6 +36,7 @@ #include #include #include +#include #include "ww8par.hxx" #include #include @@ -45,6 +46,7 @@ #include #endif #include +#include using namespace ::com::sun::star; @@ -502,6 +504,17 @@ void RtfExport::ExportDocument_Impl() WriteInfo(); // Default TabSize Strm().WriteCharPtr(m_pAttrOutput->m_aTabStop.makeStringAndClear().getStr()).WriteCharPtr(SAL_NEWLINE_STRING); + +// Automatic hyphenation: it's a global setting in Word, it's a paragraph setting in Writer. +// Use the setting from the default style. +SwTxtFmtColl* pTxtFmtColl = pDoc->getIDocumentStylePoolAccess().GetTxtCollFromPool(RES_POOLCOLL_STANDARD, /*bRegardLanguage=*/false); +const SfxPoolItem* pItem; +if (pTxtFmtColl && pTxtFmtColl->GetItemState(RES_PARATR_HYPHENZONE, false, &pItem) == SfxItemState::SET) +{ +Strm().WriteCharPtr(OOO_STRING_SVTOOLS_RTF_HYPHAUTO); +OutULong(static_cast(pItem)->IsHyphen()); +} + // Zoom SwViewShell* pViewShell(pDoc->getIDocumentLayoutAccess().GetCurrentViewShell()); if (pViewShell && pViewShell->GetViewOptions()->GetZoomType() == SvxZoomType::PERCENT) commit 830abf307aab9f9611db60b5c734fbafd3b3d8a3 Author: Miklos Vajna Date: Fri Apr 17 16:52:46 2015 +0200 RTF filter: import \hyphauto "Automatically Hyphenate Document Contents When Displayed" Change-Id: I832eed60511b332a3f936b8239fd0a56a84879f1 diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 4965e13..dd873fe 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -4887,6 +4887,9 @@ RTFError RTFDocumentImpl::dispatchToggle(RTFKeyword nKeyword, bool bParam, int n case RTF_FACINGP: m_aSettingsTableSprms.set(NS_ooxml::LN_CT_Settings_evenAndOddHeaders, pBoolValue); break; +case RTF_HYPHAUTO: +m_aSettingsTableSprms.set(NS_ooxml::LN_CT_Settings_autoHyphenation, pBoolValue); +break; default: { SAL_INFO("writerfilter", "TODO handle toggle '" << lcl_RtfToString(nKeyword) << "'"); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/vclptr' - include/sfx2 sc/source sd/source sfx2/source sw/inc sw/source
include/sfx2/dinfdlg.hxx |9 +--- include/sfx2/mgetempl.hxx|3 - include/sfx2/objsh.hxx |3 - include/sfx2/printer.hxx |4 - include/sfx2/securitypage.hxx|3 - sc/source/ui/docshell/docsh.cxx |2 sc/source/ui/inc/docsh.hxx |2 sd/source/ui/docshell/docshel4.cxx |2 sd/source/ui/inc/DrawDocShell.hxx|2 sfx2/source/appl/newhelp.cxx | 12 ++--- sfx2/source/appl/newhelp.hxx |8 +-- sfx2/source/appl/workwin.cxx |2 sfx2/source/control/templateabstractview.cxx |8 +-- sfx2/source/control/thumbnailview.cxx|2 sfx2/source/control/thumbnailviewitem.cxx|2 sfx2/source/dialog/backingcomp.cxx |4 - sfx2/source/dialog/dinfdlg.cxx | 58 +-- sfx2/source/dialog/dockwin.cxx |2 sfx2/source/dialog/documentfontsdialog.cxx |2 sfx2/source/dialog/infobar.cxx |6 +- sfx2/source/dialog/mgetempl.cxx |2 sfx2/source/dialog/navigat.cxx |2 sfx2/source/dialog/newstyle.cxx |2 sfx2/source/dialog/partwnd.cxx |2 sfx2/source/dialog/printopt.cxx |2 sfx2/source/dialog/recfloat.cxx |2 sfx2/source/dialog/securitypage.cxx |2 sfx2/source/dialog/splitwin.cxx |2 sfx2/source/dialog/tabdlg.cxx| 10 ++-- sfx2/source/dialog/taskpane.cxx |4 - sfx2/source/dialog/templateinfodlg.cxx |2 sfx2/source/dialog/templdlg.cxx |7 +-- sfx2/source/dialog/titledockwin.cxx |4 - sfx2/source/dialog/versdlg.cxx |4 - sfx2/source/doc/iframe.cxx |2 sfx2/source/doc/objcont.cxx |4 - sfx2/source/doc/plugin.cxx |2 sfx2/source/doc/printhelper.cxx |2 sfx2/source/sidebar/TitleBar.cxx |2 sfx2/source/view/frame2.cxx |2 sfx2/source/view/printer.cxx | 11 ++--- sfx2/source/view/viewfrm.cxx |2 sfx2/source/view/viewprn.cxx |6 +- sw/inc/docsh.hxx |2 sw/source/uibase/app/docsh2.cxx |2 45 files changed, 110 insertions(+), 110 deletions(-) New commits: commit d8ebd9044177e1269c8c81c4c0e3ff53d875247a Author: Noel Grandin Date: Fri Apr 17 17:53:05 2015 +0200 sfx2: convert new to ::Create. Change-Id: I53f95a65702c144ba4c4b0caac1e172015fec0fa diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx index 3cd5893..a89065d 100644 --- a/include/sfx2/dinfdlg.hxx +++ b/include/sfx2/dinfdlg.hxx @@ -215,7 +215,6 @@ private: voidImplCheckPasswordState(); protected: -SfxDocumentPage( vcl::Window* pParent, const SfxItemSet& ); virtual ~SfxDocumentPage(); virtual void dispose() SAL_OVERRIDE; @@ -223,6 +222,7 @@ protected: virtual voidReset( const SfxItemSet* ) SAL_OVERRIDE; public: +SfxDocumentPage( vcl::Window* pParent, const SfxItemSet& ); static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* ); voidEnableUseUserData(); @@ -240,7 +240,6 @@ private: SfxDocumentInfoItem* m_pInfoItem; protected: -SfxDocumentDescPage( vcl::Window* pParent, const SfxItemSet& ); virtual ~SfxDocumentDescPage(); virtual void dispose() SAL_OVERRIDE; @@ -248,6 +247,7 @@ protected: virtual voidReset( const SfxItemSet* ) SAL_OVERRIDE; public: +SfxDocumentDescPage( vcl::Window* pParent, const SfxItemSet& ); static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* ); }; @@ -520,7 +520,6 @@ private: using TabPage::DeactivatePage; protected: -SfxCustomPropertiesPage( vcl::Window* pParent, const SfxItemSet& ); virtual ~SfxCustomPropertiesPage(); virtual void dispose() SAL_OVERRIDE; @@ -529,6 +528,7 @@ protected: virtual int DeactivatePage( SfxItemSet* pSet = NULL ) SAL_OVERRIDE; public: +SfxCustomPropertiesPage( vcl::Window* pParent, const SfxItemSet& ); static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* ); }; @@ -644,13 +644,12 @@ private: DECL_LINK(UpdateHdl, void *); protected: -SfxCmisPropertiesPage( vcl::Window* pParent, const SfxItemSet& ); - virtual boolFillItemSet( SfxItemSet* ) SAL_OVERRIDE; virtual voidReset( const SfxItemSet* ) SAL_OVERRIDE; virtual int DeactivatePage( SfxItemSet* pSet = NULL ) SAL_OVERRIDE; public: +SfxCmisPropertiesPage( vcl::Window* pParent, const SfxItemSet& ); static SfxTabPage* Create( vcl::Window* pParent, const SfxItem
[Libreoffice-commits] core.git: sw/source
sw/source/filter/ww8/docxattributeoutput.cxx | 25 ++--- sw/source/filter/ww8/docxattributeoutput.hxx | 25 - 2 files changed, 38 insertions(+), 12 deletions(-) New commits: commit 67ef5f22aa3c8f060ab5caf5b816e9806c610654 Author: Caolán McNamara Date: Fri Apr 17 12:36:30 2015 +0100 SwTableLines::size is an unreliable way to count rows pathological old-school writer tables can have one line here for merged rows The table writer knows about these things, so use that, keep it up to date, and make that up to date cheaper to do Change-Id: I3433206a54c7cb096b699ac0b61653358e647115 diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 09632bc..c5404f4 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -694,9 +694,10 @@ void DocxAttributeOutput::FinishTableRowCell( ww8::WW8TableNodeInfoInner::Pointe // Where are we in the table sal_uInt32 nRow = pInner->getRow( ); -const SwTable *pTable = pInner->getTable( ); -const SwTableLines& rLines = pTable->GetTabLines( ); -sal_uInt16 nLinesCount = rLines.size( ); +InitTableHelper( pInner ); + +const size_t nLinesCount = m_xTableWrt->GetRows().size(); + // HACK // msoffice seems to have an internal limitation of 63 columns for tables // and refuses to load .docx with more, even though the spec seems to allow that; @@ -2824,7 +2825,7 @@ void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Point FSEND ); // Horizontal spans -const SwWriteTableRows& aRows = m_pTableWrt->GetRows( ); +const SwWriteTableRows& aRows = m_xTableWrt->GetRows( ); SwWriteTableRow *pRow = aRows[ nRow ]; const SwWriteTableCells *tableCells = &pRow->GetCells(); if (nCell < tableCells->size() ) @@ -2887,21 +2888,24 @@ void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Point void DocxAttributeOutput::InitTableHelper( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) { +const SwTable* pTable = pTableTextNodeInfoInner->getTable(); +if (m_xTableWrt && pTable == m_xTableWrt->getTable()) +return; + long nPageSize = 0; bool bRelBoxSize = false; // Create the SwWriteTable instance to use col spans (and maybe other infos) GetTablePageSize( pTableTextNodeInfoInner.get(), nPageSize, bRelBoxSize ); -const SwTable* pTable = pTableTextNodeInfoInner->getTable( ); const SwFrmFmt *pFmt = pTable->GetFrmFmt( ); const sal_uInt32 nTblSz = static_cast(pFmt->GetFrmSize( ).GetWidth( )); const SwHTMLTableLayout *pLayout = pTable->GetHTMLTableLayout(); if( pLayout && pLayout->IsExportable() ) -m_pTableWrt.reset(new SwWriteTable(pLayout)); +m_xTableWrt.reset(new DocxWriteTable(pTable, pLayout)); else -m_pTableWrt.reset(new SwWriteTable(pTable->GetTabLines(), nPageSize, nTblSz, false)); +m_xTableWrt.reset(new DocxWriteTable(pTable, pTable->GetTabLines(), nPageSize, nTblSz, false)); } void DocxAttributeOutput::StartTable( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) @@ -2933,7 +2937,7 @@ void DocxAttributeOutput::EndTable() m_tableReference->m_bTableCellOpen = true; // Cleans the table helper -m_pTableWrt.reset(0); +m_xTableWrt.reset(0); m_aTableStyleConf.clear(); } @@ -2980,8 +2984,7 @@ void DocxAttributeOutput::EndTableRow( ) void DocxAttributeOutput::StartTableCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner, sal_uInt32 nCell, sal_uInt32 nRow ) { -if ( !m_pTableWrt ) -InitTableHelper( pTableTextNodeInfoInner ); +InitTableHelper( pTableTextNodeInfoInner ); m_pSerializer->startElementNS( XML_w, XML_tc, FSEND ); @@ -3566,7 +3569,7 @@ void DocxAttributeOutput::TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer } } -const SwWriteTableRows& aRows = m_pTableWrt->GetRows( ); +const SwWriteTableRows& aRows = m_xTableWrt->GetRows( ); SwWriteTableRow *pRow = aRows[ pTableTextNodeInfoInner->getRow( ) ]; sal_uInt32 nCell = pTableTextNodeInfoInner->getCell(); const SwWriteTableCells *tableCells = &pRow->GetCells(); diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx index 4da101b..2b253d2 100644 --- a/sw/source/filter/ww8/docxattributeoutput.hxx +++ b/sw/source/filter/ww8/docxattributeoutput.hxx @@ -138,6 +138,29 @@ struct TableReference } }; +class DocxWriteTable : public SwWriteTable +{ +public: +DocxWriteTable(const SwTable* pTable, const SwTableLines& rLines, long nWidth, sal_uInt32 nBWidth, + bool bRel, sal_uInt16 nMaxDepth = USHRT_MAX, + sal_uInt16 nInLeftSub=0, sal_uInt16 nInRightSub=0,
[Bug 50763] HTML Import doesnt parse inline base64 images correctly
https://bugs.documentfoundation.org/show_bug.cgi?id=50763 Beluga changed: What|Removed |Added CC||leon.arund...@yahoo.com --- Comment #12 from Beluga --- *** Bug 90574 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are on the CC list for the bug. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
FastAttributeList and docx export problems
Hi, Before 9ae701509add0f0192b02fab787c6acbc64be349 FastAttributeList used map to store attribute="value" pairs in XML elements. I guess I did not realize when changing map to list that it will cause problems because somebody writes the same attribute twice. One problem is described in https://bugs.documentfoundation.org/show_bug.cgi?id=85769 for which I did https://gerrit.libreoffice.org/#/c/15367/ but no idea if that fix is OK. Caolan tried to avoid assert with 969c1d5e44ed11e08f64334ed65ce01d2fa54acb (but I now get "Assertion `aColorString.equalsL(pExistingValue, rtl_str_getLength(pExistingValue))' failed." for docx/fdo72640-3.docx) The question is: should we return to using map in Writer or try to fix these problems one by one as they come? Feel free to approve https://gerrit.libreoffice.org/#/c/15367/ :-) Thanks, Matus ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - oox/source
oox/source/export/chartexport.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit b748d80a408e822c367e9b87fe2c7f50322c2219 Author: Caolán McNamara Date: Wed Apr 15 10:30:34 2015 +0100 fix crash on export of fdo60365-2.ods to xlsx Change-Id: I1a281b096e4d1831bcf67ca03180afff043fbcfd (cherry picked from commit 135907f2061550624ee1859745d94eee01849070) Reviewed-on: https://gerrit.libreoffice.org/15321 Reviewed-by: Markus Mohrhard Tested-by: Markus Mohrhard diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 0929096..cdcd680 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -1941,7 +1941,7 @@ void ChartExport::exportSeriesCategory( const Reference< chart2::data::XDataSequ pFS->startElement( FSNS( XML_c, XML_cat ), FSEND ); -OUString aCellRange = xValueSeq->getSourceRangeRepresentation(); +OUString aCellRange = xValueSeq.is() ? xValueSeq->getSourceRangeRepresentation() : OUString(); aCellRange = parseFormula( aCellRange ); // TODO: need to handle XML_multiLvlStrRef according to aCellRange pFS->startElement( FSNS( XML_c, XML_strRef ), @@ -1984,7 +1984,7 @@ void ChartExport::exportSeriesValues( const Reference< chart2::data::XDataSequen pFS->startElement( FSNS( XML_c, nValueType ), FSEND ); -OUString aCellRange = xValueSeq->getSourceRangeRepresentation(); +OUString aCellRange = xValueSeq.is() ? xValueSeq->getSourceRangeRepresentation() : OUString(); aCellRange = parseFormula( aCellRange ); // TODO: need to handle XML_multiLvlStrRef according to aCellRange pFS->startElement( FSNS( XML_c, XML_numRef ), ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - xmloff/source
xmloff/source/text/txtprmap.cxx | 32 1 file changed, 32 insertions(+) New commits: commit c31adf195669875a778f911796acdbada428c3d2 Author: Miklos Vajna Date: Tue Feb 3 18:20:43 2015 +0100 xmloff: accept character borders in the extension namespace (partially cherry-pick of commit f1f6b6db730ae67a427c7974b59a5e19ab571984) Conflicts: sw/qa/extras/odfexport/odfexport.cxx Change-Id: Ia112cf626126149ea9cf09c5d6ff812d5d5ffec5 Reviewed-on: https://gerrit.libreoffice.org/15352 Reviewed-by: Markus Mohrhard Tested-by: Markus Mohrhard diff --git a/xmloff/source/text/txtprmap.cxx b/xmloff/source/text/txtprmap.cxx index 5b596cd..da7dc5d 100644 --- a/xmloff/source/text/txtprmap.cxx +++ b/xmloff/source/text/txtprmap.cxx @@ -263,20 +263,36 @@ XMLPropertyMapEntry aXMLParaPropMap[] = MT_EV( "CharRightBorder", STYLE, BORDER_LINE_WIDTH_RIGHT, XML_TYPE_BORDER_WIDTH, CTF_CHARRIGHTBORDERWIDTH, SvtSaveOptions::ODFVER_012_EXT_COMPAT ), MT_EV( "CharTopBorder", STYLE, BORDER_LINE_WIDTH_TOP, XML_TYPE_BORDER_WIDTH, CTF_CHARTOPBORDERWIDTH, SvtSaveOptions::ODFVER_012_EXT_COMPAT ), MT_EV( "CharBottomBorder", STYLE, BORDER_LINE_WIDTH_BOTTOM, XML_TYPE_BORDER_WIDTH, CTF_CHARBOTTOMBORDERWIDTH, SvtSaveOptions::ODFVER_012_EXT_COMPAT ), +MAP_EXT_I( "CharLeftBorder", XML_NAMESPACE_LO_EXT, XML_BORDER_LINE_WIDTH, XML_TYPE_BORDER_WIDTH|XML_TYPE_PROP_TEXT, CTF_CHARALLBORDERWIDTH ), +MAP_EXT_I( "CharLeftBorder", XML_NAMESPACE_LO_EXT, XML_BORDER_LINE_WIDTH_LEFT, XML_TYPE_BORDER_WIDTH|XML_TYPE_PROP_TEXT, CTF_CHARLEFTBORDERWIDTH ), +MAP_EXT_I( "CharRightBorder", XML_NAMESPACE_LO_EXT, XML_BORDER_LINE_WIDTH_RIGHT, XML_TYPE_BORDER_WIDTH|XML_TYPE_PROP_TEXT, CTF_CHARRIGHTBORDERWIDTH ), +MAP_EXT_I( "CharTopBorder", XML_NAMESPACE_LO_EXT, XML_BORDER_LINE_WIDTH_TOP, XML_TYPE_BORDER_WIDTH|XML_TYPE_PROP_TEXT, CTF_CHARTOPBORDERWIDTH ), +MAP_EXT_I( "CharBottomBorder", XML_NAMESPACE_LO_EXT, XML_BORDER_LINE_WIDTH_BOTTOM, XML_TYPE_BORDER_WIDTH|XML_TYPE_PROP_TEXT, CTF_CHARBOTTOMBORDERWIDTH ), MT_EV( "CharLeftBorderDistance", FO, PADDING, XML_TYPE_MEASURE, CTF_CHARALLBORDERDISTANCE, SvtSaveOptions::ODFVER_012_EXT_COMPAT ), MT_EV( "CharLeftBorderDistance", FO, PADDING_LEFT, XML_TYPE_MEASURE, CTF_CHARLEFTBORDERDISTANCE, SvtSaveOptions::ODFVER_012_EXT_COMPAT ), MT_EV( "CharRightBorderDistance", FO, PADDING_RIGHT, XML_TYPE_MEASURE, CTF_CHARRIGHTBORDERDISTANCE, SvtSaveOptions::ODFVER_012_EXT_COMPAT ), MT_EV( "CharTopBorderDistance", FO, PADDING_TOP, XML_TYPE_MEASURE, CTF_CHARTOPBORDERDISTANCE, SvtSaveOptions::ODFVER_012_EXT_COMPAT ), MT_EV( "CharBottomBorderDistance",FO, PADDING_BOTTOM, XML_TYPE_MEASURE, CTF_CHARBOTTOMBORDERDISTANCE, SvtSaveOptions::ODFVER_012_EXT_COMPAT ), +MAP_EXT_I( "CharLeftBorderDistance", XML_NAMESPACE_LO_EXT, XML_PADDING, XML_TYPE_MEASURE|XML_TYPE_PROP_TEXT, CTF_CHARALLBORDERDISTANCE ), +MAP_EXT_I( "CharLeftBorderDistance", XML_NAMESPACE_LO_EXT, XML_PADDING_LEFT, XML_TYPE_MEASURE|XML_TYPE_PROP_TEXT, CTF_CHARLEFTBORDERDISTANCE ), +MAP_EXT_I( "CharRightBorderDistance", XML_NAMESPACE_LO_EXT, XML_PADDING_RIGHT, XML_TYPE_MEASURE|XML_TYPE_PROP_TEXT, CTF_CHARRIGHTBORDERDISTANCE ), +MAP_EXT_I( "CharTopBorderDistance", XML_NAMESPACE_LO_EXT, XML_PADDING_TOP, XML_TYPE_MEASURE|XML_TYPE_PROP_TEXT, CTF_CHARTOPBORDERDISTANCE ), +MAP_EXT_I( "CharBottomBorderDistance",XML_NAMESPACE_LO_EXT, XML_PADDING_BOTTOM, XML_TYPE_MEASURE|XML_TYPE_PROP_TEXT, CTF_CHARBOTTOMBORDERDISTANCE ), MT_EV( "CharLeftBorder", FO, BORDER, XML_TYPE_BORDER, CTF_CHARALLBORDER, SvtSaveOptions::ODFVER_012_EXT_COMPAT ), MT_EV( "CharLeftBorder", FO, BORDER_LEFT, XML_TYPE_BORDER, CTF_CHARLEFTBORDER, SvtSaveOptions::ODFVER_012_EXT_COMPAT ), MT_EV( "CharRightBorder", FO, BORDER_RIGHT, XML_TYPE_BORDER, CTF_CHARRIGHTBORDER, SvtSaveOptions::ODFVER_012_EXT_COMPAT ), MT_EV( "CharTopBorder", FO, BORDER_TOP, XML_TYPE_BORDER, CTF_CHARTOPBORDER, SvtSaveOptions::ODFVER_012_EXT_COMPAT ), MT_EV( "CharBottomBorder", FO, BORDER_BOTTOM, XML_TYPE_BORDER, CTF_CHARBOTTOMBORDER, SvtSaveOptions::ODFVER_012_EXT_COMPAT ), +MAP_EXT_I( "CharLeftBorder", XML_NAMESPACE_LO_EXT, XML_BORDER, XML_TYPE_BORDER|XML_TYPE_PROP_TEXT, CTF_CHARALLBORDER ), +MAP_EXT_I( "CharLeftBorder", XML_NAMESPACE_LO_EXT, XML_BORDER_LEFT, XML_TYPE_BORDER|XML_TYPE_PROP_TEXT, CTF_CHARLEFTBORDER ), +MAP_EXT_I( "CharRightBorder", XML_NAMESPACE_LO_EXT, XML_BORDER_RIGHT, XML_TYPE_BORDER|XML_TYPE_PROP_TEXT, CTF_CHARRIGHTBORDER ), +MAP_EXT_I( "CharTopBorder", XML_NAMESPACE_LO_EXT, XML_BORDER_TOP, XML_TYPE_BORDER|XML_TYPE_PROP_TEXT, CTF_CHARTOPBORDER ), +MAP_EXT_I( "CharBottomBorder", XML_NAMESPACE_LO_EXT, XML_BORDER_BOTTOM, XML_TYPE_BORDER|XML_TYPE_PROP_TEXT, CTF_CHARBOTTOMBORDER ), // RES_CHRATR_SHADOW MT_EV( "CharShadowFormat", STYLE, SHADOW, XML_TYPE_TEXT_SHADOW, 0, SvtSaveOptions::ODFVER_
[Libreoffice-commits] core.git: sw/qa sw/source
sw/qa/extras/ooxmlexport/data/tdf90681.odt |binary sw/qa/extras/ooxmlexport/ooxmlexport5.cxx|9 + sw/source/filter/ww8/docxattributeoutput.cxx | 15 ++- sw/source/filter/ww8/docxattributeoutput.hxx |2 ++ 4 files changed, 25 insertions(+), 1 deletion(-) New commits: commit 9657455d985ecce30c4e9d3d799212e7cc8aa57a Author: Caolán McNamara Date: Fri Apr 17 15:31:19 2015 +0100 Resolves: tdf#90681 table model can have truly empty cells old school complex tables can create a table model where a cell exists in the table but there are no paragraphs in it. | A | C | | B |*D*| i.e. normally for the above there are 4 nodes which get exported, even though C and D are merged. But it can be the case that there are only three nodes, and *D* is missing be conservative for now and only do this for the obviously broken no cell start but cell end case and incrementally build up the test-cases Change-Id: I5703595f61688a66b7fac7f3905ace0c207c9875 diff --git a/sw/qa/extras/ooxmlexport/data/tdf90681.odt b/sw/qa/extras/ooxmlexport/data/tdf90681.odt new file mode 100644 index 000..009e006 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf90681.odt differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx index f04e8b9..bece25f 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx @@ -228,6 +228,15 @@ DECLARE_OOXMLEXPORT_TEST(testFloatingTable, "fdo77887.docx") } +DECLARE_OOXMLEXPORT_TEST(testOldComplexMerge, "tdf90681.odt") +{ +xmlDocPtr pXmlDoc = parseExport("word/document.xml"); + +if (!pXmlDoc) + return; + +assertXPath(pXmlDoc, "//w:vMerge[4]", "val", "continue"); +} DECLARE_OOXMLEXPORT_TEST(testTablePreferredWidth, "tablePreferredWidth.docx") { diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index c5404f4..e29339c 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -705,11 +705,21 @@ void DocxAttributeOutput::FinishTableRowCell( ww8::WW8TableNodeInfoInner::Pointe // and merge the contents of the remaining ones into it (since we don't close the cell // here, following ones will not be opened) bool limitWorkaround = ( pInner->getCell() >= 62 && !pInner->isEndOfLine()); +const bool bEndCell = pInner->isEndOfCell() && !limitWorkaround; +const bool bStartCell = bEndCell && !m_nCellsOpen; -if ( pInner->isEndOfCell() && !limitWorkaround ) +if ( bEndCell ) { if ( bForceEmptyParagraph ) +{ +if (bStartCell) +{ +const sal_uInt32 nCol = pInner->getCell(); +StartTableCell(pInner, nCol+1, nRow); +} + m_pSerializer->singleElementNS( XML_w, XML_p, FSEND ); +} EndTableCell(); } @@ -2986,6 +2996,7 @@ void DocxAttributeOutput::StartTableCell( ww8::WW8TableNodeInfoInner::Pointer_t { InitTableHelper( pTableTextNodeInfoInner ); +++m_nCellsOpen; m_pSerializer->startElementNS( XML_w, XML_tc, FSEND ); // Write the cell properties here @@ -3007,6 +3018,7 @@ void DocxAttributeOutput::EndTableCell( ) EndParaSdtBlock(); m_pSerializer->endElementNS( XML_w, XML_tc ); +--m_nCellsOpen; m_bBtLr = false; m_tableReference->m_bTableCellOpen = false; @@ -8302,6 +8314,7 @@ DocxAttributeOutput::DocxAttributeOutput( DocxExport &rExport, FSHelperPtr pSeri , m_nRunSdtPrToken(0) , m_nStateOfFlyFrame( FLY_NOT_PROCESSED ) , m_bParagraphSdtHasId(false) +, m_nCellsOpen(0) { } diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx index 2b253d2..ff49541 100644 --- a/sw/source/filter/ww8/docxattributeoutput.hxx +++ b/sw/source/filter/ww8/docxattributeoutput.hxx @@ -945,6 +945,8 @@ private: OUString m_aRunSdtPrAlias; /// Currently paragraph SDT has a child element. bool m_bParagraphSdtHasId; +/// Checking for balanced table cells start/ends +sal_Int32 m_nCellsOpen; std::map m_aTableStyleConf; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Bug 90517] Push WinBits constants down into subclasses
https://bugs.documentfoundation.org/show_bug.cgi?id=90517 Robinson Tryon (qubit) changed: What|Removed |Added Status|UNCONFIRMED |NEEDINFO CC||qu...@runcibility.com Ever confirmed|0 |1 --- Comment #1 from Robinson Tryon (qubit) --- (In reply to Noel Grandin from comment #0) > So I started looking at converting the WinBits WB_* defines in Noel: What (if any) triage needs to happen here? Can we set this directly to NEW? Status -> NEEDINFO -- You are receiving this mail because: You are on the CC list for the bug. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: Branch 'feature/vclptr' - include/sfx2 include/svx sfx2/source svtools/source svx/source
include/sfx2/taskpane.hxx |1 + include/svx/frmsel.hxx |1 + include/svx/sidebar/PopupContainer.hxx |1 + sfx2/source/dialog/taskpane.cxx |4 svtools/source/toolpanel/paneltabbar.cxx|2 +- svx/source/dialog/frmsel.cxx|5 + svx/source/sidebar/tools/PopupContainer.cxx |6 -- 7 files changed, 17 insertions(+), 3 deletions(-) New commits: commit a92cea7e6c07f4f122addd324f6f25616443f3ed Author: Michael Meeks Date: Fri Apr 17 21:23:04 2015 +0100 Windows compilation fixes. Change-Id: Id04ff9302893654ae1f62db9f5005517c90e5db2 diff --git a/include/sfx2/taskpane.hxx b/include/sfx2/taskpane.hxx index 9768716..2155696 100644 --- a/include/sfx2/taskpane.hxx +++ b/include/sfx2/taskpane.hxx @@ -93,6 +93,7 @@ namespace sfx2 vcl::Window& i_rParentWindow, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rDocumentFrame ); +virtual ~ModuleTaskPane(); /** determines whether a given module has any registered tool panels */ diff --git a/include/svx/frmsel.hxx b/include/svx/frmsel.hxx index 61b3615..391bff1 100644 --- a/include/svx/frmsel.hxx +++ b/include/svx/frmsel.hxx @@ -84,6 +84,7 @@ class SVX_DLLPUBLIC FrameSelector : public Control { public: FrameSelector(vcl::Window* pParent); +virtual ~FrameSelector(); /** Initializes the control, enables/disables frame borders according to flags. */ voidInitialize( FrameSelFlags nFlags ); diff --git a/include/svx/sidebar/PopupContainer.hxx b/include/svx/sidebar/PopupContainer.hxx index ff3c408..cf920a7 100644 --- a/include/svx/sidebar/PopupContainer.hxx +++ b/include/svx/sidebar/PopupContainer.hxx @@ -34,6 +34,7 @@ class SVX_DLLPUBLIC PopupContainer { public: PopupContainer (vcl::Window* pParent); +virtual ~PopupContainer (); virtual bool Notify (NotifyEvent& rNEvt) SAL_OVERRIDE; }; diff --git a/sfx2/source/dialog/taskpane.cxx b/sfx2/source/dialog/taskpane.cxx index e782af1..a032f15 100644 --- a/sfx2/source/dialog/taskpane.cxx +++ b/sfx2/source/dialog/taskpane.cxx @@ -709,6 +709,10 @@ namespace sfx2 { } +ModuleTaskPane::~ModuleTaskPane() +{ +disposeOnce(); +} bool ModuleTaskPane::ModuleHasToolPanels( const Reference< XFrame >& i_rDocumentFrame ) { diff --git a/svtools/source/toolpanel/paneltabbar.cxx b/svtools/source/toolpanel/paneltabbar.cxx index 8f3ef5b..22fa770 100644 --- a/svtools/source/toolpanel/paneltabbar.cxx +++ b/svtools/source/toolpanel/paneltabbar.cxx @@ -515,7 +515,7 @@ namespace svt // this mode requires the NWF framework to be able to render those items onto a virtual // device. For some frameworks (some GTK themes, in particular), this is known to fail. // So, be on the safe side for the moment. -m_pRenderer.reset( new NWFTabItemRenderer( m_aRenderDevice ) ); +m_pRenderer.reset( new NWFTabItemRenderer( *m_aRenderDevice.get() ) ); else #endif if ( m_aRenderDevice->IsNativeControlSupported( CTRL_TOOLBAR, PART_BUTTON ) ) diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx index 8e937fc..5897a87 100644 --- a/svx/source/dialog/frmsel.cxx +++ b/svx/source/dialog/frmsel.cxx @@ -791,6 +791,11 @@ FrameSelector::FrameSelector(vcl::Window* pParent) EnableRTL( false ); // #107808# don't mirror the mouse handling } +FrameSelector::~FrameSelector() +{ +disposeOnce(); +} + extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvxFrameSelector(vcl::Window *pParent, VclBuilder::stringmap &) { return new FrameSelector(pParent); diff --git a/svx/source/sidebar/tools/PopupContainer.cxx b/svx/source/sidebar/tools/PopupContainer.cxx index f869c16..efb478d 100644 --- a/svx/source/sidebar/tools/PopupContainer.cxx +++ b/svx/source/sidebar/tools/PopupContainer.cxx @@ -27,8 +27,10 @@ PopupContainer::PopupContainer (vcl::Window* pParent) { } - - +PopupContainer::~PopupContainer() +{ +disposeOnce(); +} bool PopupContainer::Notify (NotifyEvent& rEvent) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/vclptr' - reportdesign/source
reportdesign/source/ui/dlg/AddField.cxx| 10 +- reportdesign/source/ui/dlg/CondFormat.cxx |4 ++-- reportdesign/source/ui/dlg/Condition.cxx |4 ++-- reportdesign/source/ui/dlg/Formula.cxx |2 +- reportdesign/source/ui/dlg/GroupsSorting.cxx |4 ++-- reportdesign/source/ui/dlg/Navigator.cxx |2 +- reportdesign/source/ui/report/DesignView.cxx | 12 ++-- reportdesign/source/ui/report/ReportController.cxx |4 ++-- reportdesign/source/ui/report/ReportWindow.cxx |4 ++-- reportdesign/source/ui/report/ScrollHelper.cxx |8 reportdesign/source/ui/report/SectionWindow.cxx|8 reportdesign/source/ui/report/StartMarker.cxx |6 +++--- reportdesign/source/ui/report/ViewsWindow.cxx |2 +- 13 files changed, 35 insertions(+), 35 deletions(-) New commits: commit 40313fc3a21c9c2f6c62070ddc8d1512cc58b3c2 Author: Michael Meeks Date: Fri Apr 17 21:49:00 2015 +0100 reportdesign: convert new to ::Create. Change-Id: Iee14abd27f9f51ef5e054015a2b033f48cadc54b diff --git a/reportdesign/source/ui/dlg/AddField.cxx b/reportdesign/source/ui/dlg/AddField.cxx index eda091e..5735e95 100644 --- a/reportdesign/source/ui/dlg/AddField.cxx +++ b/reportdesign/source/ui/dlg/AddField.cxx @@ -158,11 +158,11 @@ OAddFieldWindow::OAddFieldWindow(vcl::Window* pParent ,::comphelper::OPropertyChangeListener(m_aMutex) ,::comphelper::OContainerListener(m_aMutex) ,m_xRowSet(_xRowSet) -,m_aActions(new ToolBox(this,ModuleRes(RID_TB_SORTING))) -,m_pListBox(new OAddFieldWindowListBox( this )) -,m_aFixedLine(new FixedLine(this, ModuleRes(ADDFIELD_FL_HELP_SEPARATOR) )) -,m_aHelpText(new FixedText(this, ModuleRes(ADDFIELD_HELP_FIELD) )) -,m_aInsertButton(new PushButton(this, WB_TABSTOP|WB_CENTER)) + ,m_aActions(VclPtr::Create(this,ModuleRes(RID_TB_SORTING))) +,m_pListBox(VclPtr::Create( this )) +,m_aFixedLine(VclPtr::Create(this, ModuleRes(ADDFIELD_FL_HELP_SEPARATOR) )) +,m_aHelpText(VclPtr::Create(this, ModuleRes(ADDFIELD_HELP_FIELD) )) +,m_aInsertButton(VclPtr::Create(this, WB_TABSTOP|WB_CENTER)) ,m_nCommandType(0) ,m_bEscapeProcessing(false) ,m_pChangeListener(NULL) diff --git a/reportdesign/source/ui/dlg/CondFormat.cxx b/reportdesign/source/ui/dlg/CondFormat.cxx index 7c59a31..24e2bce 100644 --- a/reportdesign/source/ui/dlg/CondFormat.cxx +++ b/reportdesign/source/ui/dlg/CondFormat.cxx @@ -192,7 +192,7 @@ namespace rptui ::comphelper::copyProperties(m_xCopy.get(),xCond.get()); m_xCopy->insertByIndex( _nNewCondIndex, makeAny( xCond ) ); -Condition *pCon( new Condition( m_pConditionPlayground, *this, m_rController ) ); +VclPtrInstance pCon( m_pConditionPlayground, *this, m_rController ); pCon->setCondition( xCond ); pCon->reorderWithinParent(_nNewCondIndex); m_aConditions.insert( m_aConditions.begin() + _nNewCondIndex, pCon ); @@ -351,7 +351,7 @@ namespace rptui sal_Int32 nCount = m_xCopy->getCount(); for ( sal_Int32 i = 0; i < nCount ; ++i ) { -Condition *pCon( new Condition( m_pConditionPlayground, *this, m_rController ) ); +VclPtrInstance pCon( m_pConditionPlayground, *this, m_rController ); Reference< XFormatCondition > xCond( m_xCopy->getByIndex(i), UNO_QUERY ); pCon->reorderWithinParent(i); pCon->setCondition( xCond ); diff --git a/reportdesign/source/ui/dlg/Condition.cxx b/reportdesign/source/ui/dlg/Condition.cxx index dacc9ce..1ef8d1e 100644 --- a/reportdesign/source/ui/dlg/Condition.cxx +++ b/reportdesign/source/ui/dlg/Condition.cxx @@ -116,7 +116,7 @@ OColorPopup::OColorPopup(vcl::Window* _pParent,Condition* _pCondition) :FloatingWindow(_pParent, WinBits( WB_BORDER | WB_STDFLOATWIN | WB_3DLOOK|WB_DIALOGCONTROL )) ,m_pCondition(_pCondition) ,m_nSlotId(0) -,m_aColorSet( new ValueSet(this, WinBits( WB_ITEMBORDER | WB_NAMEFIELD | WB_3DLOOK | WB_NO_DIRECTSELECT)) ) +,m_aColorSet( VclPtr::Create(this, WinBits( WB_ITEMBORDER | WB_NAMEFIELD | WB_3DLOOK | WB_NO_DIRECTSELECT)) ) { m_aColorSet->SetHelpId( HID_RPT_POPUP_COLOR_CTRL ); SetHelpId( HID_RPT_POPUP_COLOR ); @@ -338,7 +338,7 @@ IMPL_LINK( Condition, DropdownClick, ToolBox*, /*pToolBar*/ ) { sal_uInt16 nId( m_pActions->GetCurItemId() ); if ( !m_pColorFloat ) -m_pColorFloat = new OColorPopup(m_pActions,this); +m_pColorFloat = VclPtr::Create(m_pActions,this); sal_uInt16 nTextId = 0; if (nId == m_nFontColorId) diff --git a/reportdesign/source/ui/dlg/Formula.cxx b/reportdesign/source/ui/dlg/Formula.cxx index be924e6..0854653 100644 --- a/reportdesign/sou
[Libreoffice-commits] core.git: Branch 'feature/vclptr' - framework/source
framework/source/classes/fwktabwindow.cxx |4 ++-- framework/source/helper/vclstatusindicator.cxx |2 +- framework/source/layoutmanager/layoutmanager.cxx|2 +- framework/source/uielement/addonstoolbarwrapper.cxx |2 +- framework/source/uielement/comboboxtoolbarcontroller.cxx|2 +- framework/source/uielement/dropdownboxtoolbarcontroller.cxx |2 +- framework/source/uielement/edittoolbarcontroller.cxx|2 +- framework/source/uielement/fontsizemenucontroller.cxx |2 +- framework/source/uielement/spinfieldtoolbarcontroller.cxx |2 +- framework/source/uielement/statusbarwrapper.cxx |2 +- framework/source/uielement/toolbarwrapper.cxx |2 +- 11 files changed, 12 insertions(+), 12 deletions(-) New commits: commit 62532bf14eb9185f32ea8831c38d8896c6ae29ad Author: Michael Meeks Date: Fri Apr 17 21:55:53 2015 +0100 framework: convert new to ::Create. Change-Id: I436ae2e58b3f79e7a0418d25532f275f5c16154f diff --git a/framework/source/classes/fwktabwindow.cxx b/framework/source/classes/fwktabwindow.cxx index 03062b8..da2c187 100644 --- a/framework/source/classes/fwktabwindow.cxx +++ b/framework/source/classes/fwktabwindow.cxx @@ -180,7 +180,7 @@ void FwkTabPage::Resize() // class FwkTabWindow - FwkTabWindow::FwkTabWindow( vcl::Window* pParent ) : Window(pParent) -, m_aTabCtrl(new FwkTabControl(this)) +, m_aTabCtrl(VclPtr::Create(this)) { m_xWinProvider = awt::ContainerWindowProvider::create( ::comphelper::getProcessComponentContext() ); @@ -265,7 +265,7 @@ IMPL_LINK_NOARG(FwkTabWindow, ActivatePageHdl) TabEntry* pEntry = FindEntry( nId ); if ( pEntry ) { -pTabPage = new FwkTabPage( m_aTabCtrl.get(), pEntry->m_sPageURL, pEntry->m_xEventHdl, m_xWinProvider ); +pTabPage = VclPtr::Create( m_aTabCtrl.get(), pEntry->m_sPageURL, pEntry->m_xEventHdl, m_xWinProvider ); pEntry->m_pPage = pTabPage; m_aTabCtrl->SetTabPage( nId, pTabPage ); pTabPage->Show(); diff --git a/framework/source/helper/vclstatusindicator.cxx b/framework/source/helper/vclstatusindicator.cxx index 963decb..18f0829 100644 --- a/framework/source/helper/vclstatusindicator.cxx +++ b/framework/source/helper/vclstatusindicator.cxx @@ -48,7 +48,7 @@ void SAL_CALL VCLStatusIndicator::start(const OUString& sText , vcl::Window* pParentWindow = VCLUnoHelper::GetWindow(m_xParentWindow); if (!m_pStatusBar) -m_pStatusBar = new StatusBar(pParentWindow, WB_3DLOOK|WB_BORDER); +m_pStatusBar = VclPtr::Create(pParentWindow, WB_3DLOOK|WB_BORDER); VCLStatusIndicator::impl_recalcLayout(m_pStatusBar, pParentWindow); diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index e8b5d51..4360d5b 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -902,7 +902,7 @@ void LayoutManager::implts_createProgressBar() vcl::Window* pWindow = VCLUnoHelper::GetWindow( xContainerWindow ); if ( pWindow ) { -StatusBar* pStatusBar = new StatusBar( pWindow, WinBits( WB_LEFT | WB_3DLOOK ) ); +VclPtrInstance pStatusBar( pWindow, WinBits( WB_LEFT | WB_3DLOOK ) ); Reference< awt::XWindow > xStatusBarWindow2( VCLUnoHelper::GetInterface( pStatusBar )); pWrapper->setStatusBar( xStatusBarWindow2, true ); } diff --git a/framework/source/uielement/addonstoolbarwrapper.cxx b/framework/source/uielement/addonstoolbarwrapper.cxx index 77987fa..35506a2 100644 --- a/framework/source/uielement/addonstoolbarwrapper.cxx +++ b/framework/source/uielement/addonstoolbarwrapper.cxx @@ -114,7 +114,7 @@ void SAL_CALL AddonsToolBarWrapper::initialize( const Sequence< Any >& aArgument { sal_uLong nStyles = WB_LINESPACING | WB_BORDER | WB_SCROLL | WB_MOVEABLE | WB_3DLOOK | WB_DOCKABLE | WB_SIZEABLE | WB_CLOSEABLE; -pToolBar = new ToolBox( pWindow, nStyles ); +pToolBar = VclPtr::Create( pWindow, nStyles ); pToolBarManager = new AddonsToolBarManager( m_xContext, xFrame, m_aResourceURL, pToolBar ); m_xToolBarManager = Reference< XComponent >( static_cast< OWeakObject *>( pToolBarManager ), UNO_QUERY ); } diff --git a/framework/source/uielement/comboboxtoolbarcontroller.cxx b/framework/source/uielement/comboboxtoolbarcontroller.cxx index adb08e3..15fb15c 100644 --- a/framework/source/uielement/comboboxtoolbarcontroller.cxx +++ b/framework/source/uielement/comboboxtoolbarcontroller.cxx @@ -149,7 +149,7 @@ ComboboxToolbarController::ComboboxToolbarController( ComplexToolbarController( rxContex
[Libreoffice-commits] core.git: Branch 'feature/vclptr' - canvas/source
canvas/source/directx/dx_devicehelper.cxx |6 +- canvas/source/directx/dx_devicehelper.hxx |3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) New commits: commit e1019ecb0c2bd79aeda8fa3e969daf3cb3952792 Author: Michael Meeks Date: Fri Apr 17 21:59:29 2015 +0100 Windows compilation fix in DX canvas. Change-Id: I835b0d073885a452fc1031892ad2e59d8670cfac diff --git a/canvas/source/directx/dx_devicehelper.cxx b/canvas/source/directx/dx_devicehelper.cxx index cc82471..759bb0b 100644 --- a/canvas/source/directx/dx_devicehelper.cxx +++ b/canvas/source/directx/dx_devicehelper.cxx @@ -52,6 +52,10 @@ namespace dxcanvas { } +DeviceHelper::~DeviceHelper() +{ +} + void DeviceHelper::init( HDC hdc, OutputDevice* pOutDev, rendering::XGraphicDevice& rDevice ) { @@ -191,7 +195,7 @@ namespace dxcanvas uno::Any DeviceHelper::getDeviceHandle() const { -return uno::makeAny( reinterpret_cast< sal_Int64 >(mpOutDev) ); +return uno::makeAny( reinterpret_cast< sal_Int64 >(mpOutDev.get()) ); } uno::Any DeviceHelper::getSurfaceHandle() const diff --git a/canvas/source/directx/dx_devicehelper.hxx b/canvas/source/directx/dx_devicehelper.hxx index da6091f..cdf1e94 100644 --- a/canvas/source/directx/dx_devicehelper.hxx +++ b/canvas/source/directx/dx_devicehelper.hxx @@ -28,7 +28,7 @@ #include "dx_bitmap.hxx" #include -#include +#include #include class OutputDevice; @@ -40,6 +40,7 @@ namespace dxcanvas { public: DeviceHelper(); +~DeviceHelper(); /** Init the device helper ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/vclptr' - chart2/source
chart2/source/controller/dialogs/DataBrowser.cxx| 14 ++-- chart2/source/controller/dialogs/dlg_ChartType.cxx |3 +- chart2/source/controller/dialogs/dlg_CreationWizard.cxx |8 +++--- chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx |2 - chart2/source/controller/dialogs/dlg_DataEditor.cxx |2 - chart2/source/controller/dialogs/dlg_DataSource.cxx |6 ++--- chart2/source/controller/dialogs/dlg_View3D.cxx |6 ++--- chart2/source/controller/dialogs/tp_ChartType.cxx |4 +-- chart2/source/controller/main/ChartController.cxx |2 - chart2/source/controller/main/ChartWindow.cxx |2 - chart2/source/controller/main/ElementSelector.cxx |2 - chart2/source/view/main/DrawModelWrapper.cxx|2 - 12 files changed, 27 insertions(+), 26 deletions(-) New commits: commit 5ea025e63751c259956ae84b8edf8d4fe33663c2 Author: Michael Meeks Date: Fri Apr 17 22:01:46 2015 +0100 chart2: convert new to ::Create. Change-Id: I14887bab5ced6e5915a8ecbc277017cec37a82ca diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx index 937dd47..23fb47c 100644 --- a/chart2/source/controller/dialogs/DataBrowser.cxx +++ b/chart2/source/controller/dialogs/DataBrowser.cxx @@ -200,9 +200,9 @@ private: }; SeriesHeader::SeriesHeader( vcl::Window * pParent, vcl::Window *pColorParent ) : -m_spSymbol( new FixedImage( pParent, WB_NOBORDER )), -m_spSeriesName( new SeriesHeaderEdit( pParent )), -m_spColorBar( new FixedText( pColorParent, WB_NOBORDER )), +m_spSymbol( VclPtr::Create( pParent, WB_NOBORDER )), +m_spSeriesName( VclPtr::Create( pParent )), +m_spColorBar( VclPtr::Create( pColorParent, WB_NOBORDER )), m_pDevice( pParent ), m_nStartCol( 0 ), m_nEndCol( 0 ), @@ -453,8 +453,8 @@ DataBrowser::DataBrowser( vcl::Window* pParent, WinBits nStyle, bool bLiveUpdate m_bIsDirty( false ), m_bLiveUpdate( bLiveUpdate ), m_bDataValid( true ), -m_aNumberEditField( new FormattedField( & EditBrowseBox::GetDataWindow(), WB_NOBORDER ) ), -m_aTextEditField( new Edit( & EditBrowseBox::GetDataWindow(), WB_NOBORDER ) ), +m_aNumberEditField( VclPtr::Create( & EditBrowseBox::GetDataWindow(), WB_NOBORDER ) ), +m_aTextEditField( VclPtr::Create( & EditBrowseBox::GetDataWindow(), WB_NOBORDER ) ), m_rNumberEditController( new ::svt::FormattedFieldCellController( m_aNumberEditField.get() )), m_rTextEditController( new ::svt::EditCellController( m_aTextEditField.get() )) { @@ -766,9 +766,9 @@ void DataBrowser::ShowWarningBox() bool DataBrowser::ShowQueryBox() { -QueryBox* pQueryBox = new QueryBox(this, WB_YES_NO, SCH_RESSTR(STR_DATA_EDITOR_INCORRECT_INPUT)); +ScopedVclPtrInstance pQueryBox(this, WB_YES_NO, SCH_RESSTR(STR_DATA_EDITOR_INCORRECT_INPUT)); -return ( pQueryBox->Execute() == RET_YES ); +return pQueryBox->Execute() == RET_YES; } bool DataBrowser::IsDataValid() diff --git a/chart2/source/controller/dialogs/dlg_ChartType.cxx b/chart2/source/controller/dialogs/dlg_ChartType.cxx index 57a0580..073d194 100644 --- a/chart2/source/controller/dialogs/dlg_ChartType.cxx +++ b/chart2/source/controller/dialogs/dlg_ChartType.cxx @@ -42,7 +42,8 @@ ChartTypeDialog::ChartTypeDialog( vcl::Window* pParent , m_xChartModel(xChartModel) , m_xCC( xContext ) { -m_pChartTypeTabPage = new ChartTypeTabPage( +m_pChartTypeTabPage = VclPtr::Create( + get_content_area(), uno::Reference::query(m_xChartModel), m_xCC, diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx index 8259a16..4584112 100644 --- a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx +++ b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx @@ -117,7 +117,7 @@ svt::OWizardPage* CreationWizard::createPage(WizardState nState) case STATE_CHARTTYPE: { m_aTimerTriggeredControllerLock.startTimer(); -ChartTypeTabPage* pChartTypeTabPage = new ChartTypeTabPage(this,m_xChartModel,m_xCC,bDoLiveUpdate); +VclPtrInstance pChartTypeTabPage(this,m_xChartModel,m_xCC,bDoLiveUpdate); pRet = pChartTypeTabPage; m_pTemplateProvider = pChartTypeTabPage; if (m_pDialogModel) @@ -127,18 +127,18 @@ svt::OWizardPage* CreationWizard::createPage(WizardState nState) case STATE_SIMPLE_RANGE: { m_aTimerTriggeredControllerLock.startTimer(); -pRet = new RangeChooserTabPage(this, *m_pDialogModel, m_pTemplateProvider, this); +pRet = VclPtr::Create(this, *m_pDialogModel, m_pTemplateProvider, this); } break; case STATE_DATA_SERIES: { m_aTimerTriggeredControllerLock.startTimer(); -pRet
[Libreoffice-commits] core.git: cui/source
cui/source/tabpages/tparea.cxx | 46 - 1 file changed, 28 insertions(+), 18 deletions(-) New commits: commit 171fb61c6526daf83d6948a543a1614215590946 Author: Michael Stahl Date: Fri Apr 17 21:20:47 2015 +0200 tdf#82784: cui: Area tab page: do not override imported bitmaps Check that we don't clobber a custom bitmap in the dialog. The (non-obvious) trick is that the name of these is non-empty, so we can check that to filter out pool default items that Draw likes to put into item sets (?), as well as just plain weird items that Draw likes to put into item sets, while avoiding relying on the surprisingly implemented ImpGraphic::operator==(). (regression from 38d0047da7f964c862360b48d88cc869ad376b6b) Change-Id: I0b94e49ef3a9a32c188c3b117a57f780f55e1584 diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx index 5d4abf6..ed8c5cf 100644 --- a/cui/source/tabpages/tparea.cxx +++ b/cui/source/tabpages/tparea.cxx @@ -1450,28 +1450,35 @@ void SvxAreaTabPage::Reset( const SfxItemSet* rAttrs ) m_pLbHatchBckgrdColor->SelectEntry( rColorItem.GetColorValue() ); } -if (SfxItemState::DONTCARE != rAttrs->GetItemState(XATTR_FILLGRADIENT)) +SfxItemState const eGradState(rAttrs->GetItemState(XATTR_FILLGRADIENT)); +XFillGradientItem const* pGradientItem(nullptr); +if (SfxItemState::DONTCARE != eGradState) { -XFillGradientItem const& rGradientItem( -static_cast( -rAttrs->Get(XATTR_FILLGRADIENT)) ); -OUString const aString( rGradientItem.GetName() ); -XGradient const aGradient( rGradientItem.GetGradientValue() ); - +pGradientItem = &static_cast( +rAttrs->Get(XATTR_FILLGRADIENT)); +OUString const aString( pGradientItem->GetName() ); +XGradient const aGradient( pGradientItem->GetGradientValue() ); m_pLbGradient->SelectEntryByList(pGradientList, aString, aGradient); } -if (!m_pLbGradient->GetSelectEntryCount()) +if (!m_pLbGradient->GetSelectEntryCount() +&& (SfxItemState::DEFAULT == eGradState +|| (pGradientItem && pGradientItem->GetName().isEmpty( { // avoid relying on pool default - cannot export that m_pLbGradient->SelectEntryPos(0); // anything better than nothing isMissingGradient = true; } -if (SfxItemState::DONTCARE != rAttrs->GetItemState(XATTR_FILLHATCH)) +SfxItemState const eHatchState(rAttrs->GetItemState(XATTR_FILLHATCH)); +XFillHatchItem const* pHatch(nullptr); +if (SfxItemState::DONTCARE != eHatchState) { -m_pLbHatching->SelectEntry( static_cast( -rAttrs->Get(XATTR_FILLHATCH)).GetName() ); +pHatch = &static_cast( +rAttrs->Get(XATTR_FILLHATCH)); +m_pLbHatching->SelectEntry(pHatch->GetName()); } -if (!m_pLbHatching->GetSelectEntryCount()) +if (!m_pLbHatching->GetSelectEntryCount() +&& (SfxItemState::DEFAULT == eHatchState +|| (pHatch && pHatch->GetName().isEmpty( { // avoid relying on pool default - cannot export that m_pLbHatching->SelectEntryPos(0); // anything better than nothing isMissingHatching = true; @@ -1482,14 +1489,17 @@ void SvxAreaTabPage::Reset( const SfxItemSet* rAttrs ) rAttrs->Get(XATTR_FILLBACKGROUND)).GetValue() ); } -if (SfxItemState::DONTCARE != rAttrs->GetItemState(XATTR_FILLBITMAP)) +SfxItemState const eBitmapState(rAttrs->GetItemState(XATTR_FILLBITMAP)); +XFillBitmapItem const* pBitmapItem(nullptr); +if (SfxItemState::DONTCARE != eBitmapState) { -XFillBitmapItem const& rBitmapItem( -static_cast( -rAttrs->Get(XATTR_FILLBITMAP))); -m_pLbBitmap->SelectEntry(rBitmapItem.GetName()); +pBitmapItem = &static_cast( +rAttrs->Get(XATTR_FILLBITMAP)); +m_pLbBitmap->SelectEntry(pBitmapItem->GetName()); } -if (!m_pLbBitmap->GetSelectEntryCount()) +if (!m_pLbBitmap->GetSelectEntryCount() +&& (SfxItemState::DEFAULT == eBitmapState +|| (pBitmapItem && pBitmapItem->GetName().isEmpty( { // avoid relying on pool default - cannot export that m_pLbBitmap->SelectEntryPos(0); // anything better than nothing isMissingBitmap = true; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - chart2/source xmloff/source
chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx | 11 ++ xmloff/source/chart/PropertyMaps.cxx|4 --- 2 files changed, 11 insertions(+), 4 deletions(-) New commits: commit 7bff8c4b69a21a0b78b87c975f8e3aa772d6c2bd Author: Markus Mohrhard Date: Sat Apr 18 00:30:01 2015 +0200 don't pretend to have a bitmap url if we are not using bitmaps Fix hack for #i78615# Change-Id: I7571f3039e0af91560e24c6d00a7ae456f8ba300 diff --git a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx index 149d055..94ba536 100644 --- a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx @@ -50,6 +50,7 @@ #include #include #include +#include #include #include #include @@ -639,6 +640,16 @@ beans::PropertyState SAL_CALL DataSeriesPointWrapper::getPropertyState( const OU throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception) { beans::PropertyState aState( beans::PropertyState_DIRECT_VALUE ); +if (rPropertyName == "SymbolBitmapURL") +{ +uno::Any aAny = WrappedPropertySet::getPropertyValue("SymbolType"); +sal_Int32 nVal = com::sun::star::chart::ChartSymbolType::NONE; +if (aAny >>= nVal) +{ +if (nVal != com::sun::star::chart::ChartSymbolType::BITMAPURL) +return beans::PropertyState::PropertyState_DEFAULT_VALUE; +} +} if( m_eType == DATA_SERIES ) aState = WrappedPropertySet::getPropertyState( rPropertyName ); commit de4dd423b257d83ca32a9b1ccd007fbe7e7eb91e Author: Markus Mohrhard Date: Fri Apr 17 20:53:49 2015 +0200 these two attributes are not part of ODF and unnecessary Change-Id: I8eda0998f0bb9503cf7d6e89ace2fb1872273880 diff --git a/xmloff/source/chart/PropertyMaps.cxx b/xmloff/source/chart/PropertyMaps.cxx index 9b330d4..41577bb 100644 --- a/xmloff/source/chart/PropertyMaps.cxx +++ b/xmloff/source/chart/PropertyMaps.cxx @@ -309,10 +309,6 @@ void XMLChartExportPropertyMapper::handleElementItem( if( !sTempURL.isEmpty() ) { mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, sTempURL ); -mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, - XML_SIMPLE ); -mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_ACTUATE, - XML_ONLOAD ); } { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 5 commits - formula/source include/formula sc/inc sc/source
formula/source/core/api/FormulaCompiler.cxx | 60 +++-- include/formula/FormulaCompiler.hxx | 14 +-- sc/inc/compiler.hxx | 10 +- sc/source/core/tool/compiler.cxx| 124 4 files changed, 153 insertions(+), 55 deletions(-) New commits: commit 6f0ac5ddf1eedc153e3e46836f885ff59e57fd1a Author: Eike Rathke Date: Sat Apr 18 00:44:06 2015 +0200 TableRef: set 3D flag if table is on different sheet Change-Id: I1a25d60b78dc89534e45fa23f99c18bd0ee6 diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 64b566c..023e5dc 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -5120,6 +5120,8 @@ bool ScCompiler::HandleTableRef() { aRefData.SetRowRel( true); } +if (aRange.aStart.Tab() != aPos.Tab()) +aRefData.SetFlag3D( true); aRefData.SetAddress( aRange.aStart, aPos); pTR->SetAreaRefRPN( pNew->AddSingleReference( aRefData )); } @@ -5134,6 +5136,8 @@ bool ScCompiler::HandleTableRef() aRefData.Ref1.SetRowRel( true); aRefData.Ref2.SetRowRel( true); } +if (aRange.aStart.Tab() != aPos.Tab()) +aRefData.Ref1.SetFlag3D( true); aRefData.SetRange( aRange, aPos); pTR->SetAreaRefRPN( pNew->AddDoubleReference( aRefData )); } commit 8c2173d95c8fd626c5399144d5820a791147bdbf Author: Eike Rathke Date: Sat Apr 18 00:27:28 2015 +0200 TableRef: transform to reference if not supported, i.e. for ODFF Change-Id: I64f751455fbba901bb41f91daaf64ee4878a19b4 diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index 64121e6..c8e4678 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -1868,6 +1868,44 @@ const FormulaToken* FormulaCompiler::CreateStringFromToken( OUStringBuffer& rBuf case svIndex: CreateStringFromIndex( rBuffer, t ); +if (t->GetOpCode() == ocTableRef && bAllowArrAdvance && mxSymbols->getSymbol( ocTableRefOpen).isEmpty()) +{ +// Suppress all TableRef related tokens, the resulting +// range was written by CreateStringFromIndex(). +const FormulaToken* p = pArr->PeekNext(); +if (p->GetOpCode() == ocTableRefOpen) +{ +p = pArr->Next(); +int nLevel = 0; +do +{ +// Switch cases correspond with those in +// ScCompiler::HandleTableRef() +switch (p->GetOpCode()) +{ +case ocTableRefOpen: +++nLevel; +break; +case ocTableRefClose: +--nLevel; +break; +case ocTableRefItemAll: +case ocTableRefItemHeaders: +case ocTableRefItemData: +case ocTableRefItemTotals: +case ocTableRefItemThisRow: +case ocSep: +case ocPush: +case ocRange: +case ocSpaces: +break; +default: +nLevel = 0; +bNext = false; +} +} while (nLevel && (p = pArr->Next())); +} +} break; case svExternal: { diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 2e1ee10..64b566c 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -4527,13 +4527,52 @@ void ScCompiler::CreateStringFromIndex( OUStringBuffer& rBuffer, const FormulaTo } break; case ocDBArea: -case ocTableRef: { const ScDBData* pDBData = pDoc->GetDBCollection()->getNamedDBs().findByIndex(_pTokenP->GetIndex()); if (pDBData) aBuffer.append(pDBData->GetName()); } break; +case ocTableRef: +{ +if (mxSymbols->getSymbol( ocTableRefOpen).isEmpty()) +{ +// Writ
Re: New Defects reported by Coverity Scan for LibreOffice
Hi Caolán, On Thursday, 2015-04-16 09:29:51 +0100, Caolán McNamara wrote: > > /sc/source/core/tool/compiler.cxx: 5037 in ScCompiler::HandleTableRef()() > > >>> CID 1294407: Incorrect expression (COPY_PASTE_ERROR) > > >>> "aStart" in "aColRange.aEnd.Row() != aDBRange.aStart.Row()" looks > > >>> like a copy-paste error. > > 5037 if (aColRange.aStart.Row() != > > aDBRange.aStart.Row() || aColRange.aEnd.Row() != aDBRange.aStart.Row()) > > 5038 aRange = ScRange( > > ScAddress::INITIALIZE_INVALID); > > caolanm->erack: should it be > > ... || aColRange.aEnd.Row() != aDBRange.aEnd.Row() No, this is a false positive, both aColRange rows must be equal to the aDBRange start row, the headers row. Eike -- LibreOffice Calc developer. Number formatter stricken i18n transpositionizer. GPG key "ID" 0x65632D3A - 2265 D7F3 A7B0 95CC 3918 630B 6A6C D5B7 6563 2D3A Better use 64-bit 0x6A6CD5B765632D3A here is why: https://evil32.com/ Care about Free Software, support the FSFE https://fsfe.org/support/?erack pgp4jkLTjw_aR.pgp Description: PGP signature ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: icon-themes/breeze
icon-themes/breeze/cmd/lc_inserthyperlink.png |binary icon-themes/breeze/cmd/sc_inserthyperlink.png |binary icon-themes/breeze/svx/res/cropmarkers.png|binary icon-themes/breeze/svx/res/markers.png|binary 4 files changed New commits: commit 211c12b9c64facd1c12f637a5229bd6a6feb032a Author: andreas_k Date: Sat Apr 18 02:01:22 2015 +0200 Breeze: update markers and cropmarkers icons Change-Id: Ic1fdd15e90f16037b79bb78fed6fa3a5a914498d Reviewed-on: https://gerrit.libreoffice.org/15374 Reviewed-by: Adolfo Jayme Barrientos Tested-by: Adolfo Jayme Barrientos diff --git a/icon-themes/breeze/cmd/lc_inserthyperlink.png b/icon-themes/breeze/cmd/lc_inserthyperlink.png index 9ea5f24..975bd2d 100644 Binary files a/icon-themes/breeze/cmd/lc_inserthyperlink.png and b/icon-themes/breeze/cmd/lc_inserthyperlink.png differ diff --git a/icon-themes/breeze/cmd/sc_inserthyperlink.png b/icon-themes/breeze/cmd/sc_inserthyperlink.png index 09529ee..73218b4 100644 Binary files a/icon-themes/breeze/cmd/sc_inserthyperlink.png and b/icon-themes/breeze/cmd/sc_inserthyperlink.png differ diff --git a/icon-themes/breeze/svx/res/cropmarkers.png b/icon-themes/breeze/svx/res/cropmarkers.png index a9c49d3..9289217 100644 Binary files a/icon-themes/breeze/svx/res/cropmarkers.png and b/icon-themes/breeze/svx/res/cropmarkers.png differ diff --git a/icon-themes/breeze/svx/res/markers.png b/icon-themes/breeze/svx/res/markers.png index 3b8adaf..cdc830b 100644 Binary files a/icon-themes/breeze/svx/res/markers.png and b/icon-themes/breeze/svx/res/markers.png differ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
LibreOffice Gerrit News for core on 2015-04-18
Moin! * Open changes on master for project core changed in the last 25 hours: First time contributors doing great things! + tdf#90494:Change gradient angle diagonally by choosing option in https://gerrit.libreoffice.org/15180 from Heena Gupta about module cui + odt2mediawiki.xsl: reduce css code in cells in https://gerrit.libreoffice.org/15373 from Robert Antoni Buj i Gelonch about module swext + Resolves tdf#83365 Other: Access across spreadsheet returns Err:504 in https://gerrit.libreoffice.org/15363 from Henry Castro about module sc + odt2mediawiki.xsl: table width & align in https://gerrit.libreoffice.org/15368 from Robert Antoni Buj i Gelonch about module swext + tdf#60573 Conditional formatting does not allow scrolling in https://gerrit.libreoffice.org/14258 from Henry Castro about module sc + mediawiki: use NL vbe, add missing space in https://gerrit.libreoffice.org/15365 from Robert Antoni Buj i Gelonch about module swext + tdf#90672: PPTX table cell border color is not exported. in https://gerrit.libreoffice.org/15364 from Yogesh Bharate about module oox, sd + tdf#90190 PPTX table cell border width is not exported. in https://gerrit.libreoffice.org/15350 from Yogesh Bharate about module include, oox, sd + Avoid redefine of TRANSPARENT on solaris after including stream.h in https://gerrit.libreoffice.org/15361 from Richard PALO about module include + remove /usr/sfw/lib rpath for solaris in vcl can be patched back in by an in https://gerrit.libreoffice.org/15360 from Richard PALO about module vcl + Applies CharAttribute to selected text and tests undo in https://gerrit.libreoffice.org/15158 from Austin Chen about module .git-hooks, build, sc, svx, sw + tdf#90223:PPTX table cell left and right margin is not exported. in https://gerrit.libreoffice.org/15015 from Yogesh Bharate about module oox, sd End of freshness + add unit test for tdf#88137, tdf#89254 in https://gerrit.libreoffice.org/15376 from Markus Mohrhard about module sc + preserve whitespaces here, tdf#88137, tdf#89254 in https://gerrit.libreoffice.org/15375 from Markus Mohrhard about module sc + tdf#78606: unittest for docx section header export bug in https://gerrit.libreoffice.org/15370 from Eilidh McAdam about module sw + tdf#78606: Write DOCX header even if section is first paragraph in https://gerrit.libreoffice.org/15369 from Eilidh McAdam about module sw + tdf#85769 Avoid writing font name attribute twice by ignoring empty value in https://gerrit.libreoffice.org/15367 from Matúš Kukan about module sw + stop double code in ScInterpreter::ScSum and ScInterpreter::IterateParame in https://gerrit.libreoffice.org/15362 from Winfried Donkers about module sc * Merged changes on master for project core changed in the last 25 hours: + Breeze: update markers and cropmarkers icons in https://gerrit.libreoffice.org/15374 from Andreas Kainz + convert SCRIPTTYPE_ constants to scoped enum in https://gerrit.libreoffice.org/15344 from Noel Grandin * Abandoned changes on master for project core changed in the last 25 hours: + WIP: make all SwUnoCrsrs ref-counted in https://gerrit.libreoffice.org/15336 from Björn Michaelsen * Open changes needing tweaks, but being untouched for more than a week: + tdf#89790 - DOCX: saving LO version number in correct tag in app.xml in https://gerrit.libreoffice.org/15151 from Ioan Radu + Fix typo code Persistant in https://gerrit.libreoffice.org/14030 from Andrea Gelmini + tdf#90222: replace ScaList in scaddins with a std container in https://gerrit.libreoffice.org/15012 from Pieter Adriaensen + replace ScaList in scaddins with a std container tdf#90222 in https://gerrit.libreoffice.org/15177 from Pieter Adriaensen + fdo#82335. in https://gerrit.libreoffice.org/11555 from Sudarshan Rao + tdf#64575 Photo Album: Better Image Layout in https://gerrit.libreoffice.org/14912 from Enes Ateş + WIP fdo#72987 Use firebird backup format for .odb no need for rebuild ind in https://gerrit.libreoffice.org/14968 from Popa Adrian Marius + Upgrade firebird to 2.5.3 , a few patches are already applied upstream in https://gerrit.libreoffice.org/15026 from Popa Adrian Marius + Removed unnecessary variables which occupy space in https://gerrit.libreoffice.org/14951 from Karthick Prasad + Fixed all postfix operator++ and operator-- in https://gerrit.libreoffice.org/14975 from Ahmad Samir + tdf#39468 Translate German Comments - sc/source/core/data/ in https://gerrit.libreoffice.org/14866 from Christian M. Heller + tdf#49893: final fix for blank rectangle problem in https://gerrit.libreoffice.org/14584 from Vasily Melenchuk + xmloff: convert xof.component to use constructor syntax in https://gerrit.libreoffice.org/14820 from Chris Sherlock + xmloff: use constructor syntax in xo.component in https://gerrit.libreoffice.org/14803 from Chris Sherlock + sd: use constructor syntax for rest of sd.component i