[Libreoffice-commits] .: vcl/generic vcl/inc
vcl/generic/print/bitmap_gfx.cxx | 28 vcl/generic/print/common_gfx.cxx |7 --- vcl/generic/print/text_gfx.cxx | 17 - vcl/inc/generic/printergfx.hxx | 13 + 4 files changed, 1 insertion(+), 64 deletions(-) New commits: commit 5708f2bfa70db0479ddbf9b454329cd81e0f509d Author: Chr. Rossmanith chr.rossman...@gmx.de Date: Wed Apr 25 13:53:37 2012 +0530 Removed unused methods from psp::PrinterGfx diff --git a/vcl/generic/print/bitmap_gfx.cxx b/vcl/generic/print/bitmap_gfx.cxx index 3b19b51..cfabe70 100644 --- a/vcl/generic/print/bitmap_gfx.cxx +++ b/vcl/generic/print/bitmap_gfx.cxx @@ -467,34 +467,6 @@ PrinterGfx::DrawBitmap (const Rectangle rDest, const Rectangle rSrc, PSGRestore (); } -/* XXX does not work XXX */ -void -PrinterGfx::DrawBitmap (const Rectangle rDest, const Rectangle rSrc, -const PrinterBmp /*rBitmap*/, const PrinterBmp /*rTransBitmap*/) -{ -double fScaleX = (double)rDest.GetWidth() / (double)rSrc.GetWidth(); -double fScaleY = (double)rDest.GetHeight() / (double)rSrc.GetHeight(); - -PSGSave (); -PSTranslate (rDest.BottomLeft()); -PSScale (fScaleX, fScaleY); -PSGRestore (); -} - -/* XXX does not work XXX */ -void -PrinterGfx::DrawMask (const Rectangle rDest, const Rectangle rSrc, -const PrinterBmp /*rBitmap*/, PrinterColor /*rMaskColor*/) -{ -double fScaleX = (double)rDest.GetWidth() / (double)rSrc.GetWidth(); -double fScaleY = (double)rDest.GetHeight() / (double)rSrc.GetHeight(); - -PSGSave (); -PSTranslate (rDest.BottomLeft()); -PSScale (fScaleX, fScaleY); -PSGRestore (); -} - /* * * Implementation: PS Level 1 diff --git a/vcl/generic/print/common_gfx.cxx b/vcl/generic/print/common_gfx.cxx index 662e696..d11ba20 100644 --- a/vcl/generic/print/common_gfx.cxx +++ b/vcl/generic/print/common_gfx.cxx @@ -104,13 +104,6 @@ PrinterGfx::Init (const JobData rData) return sal_True; } -void -PrinterGfx::GetResolution (sal_Int32 rDpiX, sal_Int32 rDpiY) const -{ -rDpiX = mnDpi; -rDpiY = mnDpi; -} - sal_uInt16 PrinterGfx::GetBitCount () { diff --git a/vcl/generic/print/text_gfx.cxx b/vcl/generic/print/text_gfx.cxx index 237bb1b..f7d9acb 100644 --- a/vcl/generic/print/text_gfx.cxx +++ b/vcl/generic/print/text_gfx.cxx @@ -697,23 +697,6 @@ const ::std::list KernPair PrinterGfx::getKernPairs( bool bVertical ) const } /* - * advanced glyph handling - */ - -sal_Bool -PrinterGfx::GetGlyphBoundRect (sal_Unicode /*c*/, Rectangle /*rOutRect*/) -{ -return 0; -} - -sal_uInt32 -PrinterGfx::GetGlyphOutline (sal_Unicode /*c*/, - sal_uInt16 **/*ppPolySizes*/, Point **/*ppPoints*/, sal_uInt8 **/*ppFlags*/) -{ -return 0; -} - -/* * spool the converted truetype fonts to the page header after the page body is * complete * for Type1 fonts spool additional reencoding vectors that are necessary to access the diff --git a/vcl/inc/generic/printergfx.hxx b/vcl/inc/generic/printergfx.hxx index 57347f3..9308ee3 100644 --- a/vcl/inc/generic/printergfx.hxx +++ b/vcl/inc/generic/printergfx.hxx @@ -334,8 +334,7 @@ public: sal_BoolInit (const JobData rData); voidClear(); -// query depth and size -voidGetResolution (sal_Int32 rDpiX, sal_Int32 rDpiY) const; +// query depth sal_uInt16 GetBitCount (); // clip region @@ -379,11 +378,6 @@ public: // image drawing voidDrawBitmap (const Rectangle rDest, const Rectangle rSrc, const PrinterBmp rBitmap); -voidDrawBitmap (const Rectangle rDest, const Rectangle rSrc, -const PrinterBmp rBitmap, -const PrinterBmp rTransBitmap); -voidDrawMask (const Rectangle rDest, const Rectangle rSrc, -const PrinterBmp rBitmap, PrinterColor rMaskColor); // font and text handling sal_uInt16 SetFont ( @@ -417,11 +411,6 @@ public: sal_Int32 GetCharWidth (sal_uInt16 nFrom, sal_uInt16 nTo, long *pWidthArray); const ::std::list KernPair getKernPairs( bool bVertical = false ) const; -// advanced font handling -sal_BoolGetGlyphBoundRect (sal_Unicode c, Rectangle rOutRect); -sal_uInt32 GetGlyphOutline (sal_Unicode c, - sal_uInt16 **ppPolySizes, Point **ppPoints, - sal_uInt8 **ppFlags); // for CTL voidDrawGlyphs( const Point rPoint, ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: formula/inc formula/source unusedcode.easy
formula/inc/formula/tokenarray.hxx |1 - formula/source/core/api/token.cxx |5 - unusedcode.easy|1 - 3 files changed, 7 deletions(-) New commits: commit d142091d4c98672c49f57be23f90e5ec8445e754 Author: Javier Silva Sanahuja jsilv...@uoc.edu Date: Mon Apr 23 11:42:50 2012 +0530 Unused code removal diff --git a/formula/inc/formula/tokenarray.hxx b/formula/inc/formula/tokenarray.hxx index 8b217a2..c5aee7d 100644 --- a/formula/inc/formula/tokenarray.hxx +++ b/formula/inc/formula/tokenarray.hxx @@ -210,7 +210,6 @@ public: /** Xcl import may play dirty tricks with OpCode!=ocExternal. Others don't use! */ FormulaToken* AddExternal( const String rStr, OpCode eOp = ocExternal ); -FormulaToken* AddBad( const sal_Unicode* pStr ); /// ocBad with String FormulaToken* AddBad( const String rStr ); /// ocBad with String FormulaToken* AddStringXML( const String rStr );/// ocStringXML with String, temporary during import diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx index 3a4f632..f426a31 100644 --- a/formula/source/core/api/token.cxx +++ b/formula/source/core/api/token.cxx @@ -770,11 +770,6 @@ FormulaToken* FormulaTokenArray::AddExternal( const String rStr, return Add( new FormulaExternalToken( eOp, rStr ) ); } -FormulaToken* FormulaTokenArray::AddBad( const sal_Unicode* pStr ) -{ -return AddBad( String( pStr ) ); -} - FormulaToken* FormulaTokenArray::AddBad( const String rStr ) { return Add( new FormulaStringOpToken( ocBad, rStr ) ); diff --git a/unusedcode.easy b/unusedcode.easy index b09221f..daf8d4c 100755 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -707,7 +707,6 @@ drawinglayer::attribute::SdrTextAttribute::isWrongSpell() const drawinglayer::primitive2d::PolyPolygonStrokePrimitive2D::PolyPolygonStrokePrimitive2D(basegfx::B2DPolyPolygon const, drawinglayer::attribute::LineAttribute const) formula::EditBox::EditBox(Window*, long) formula::FormulaListBox::FormulaListBox(Window*, long) -formula::FormulaTokenArray::AddBad(unsigned short const*) formula::FormulaTokenIterator::First() jfw_plugin::VendorBase::createInstance() jfw_plugin::VendorBase::getJavaExePaths(int*) ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: 3 commits - sc/inc sc/source unusedcode.easy vcl/inc vcl/source
sc/inc/dbdata.hxx |1 sc/source/core/tool/dbdata.cxx |5 unusedcode.easy |7 -- vcl/inc/salgdi.hxx |4 --- vcl/inc/vcl/outdev.hxx |4 --- vcl/source/gdi/outmap.cxx | 42 vcl/source/gdi/salgdilayout.cxx | 34 7 files changed, 97 deletions(-) New commits: commit d31aae4c9eea4f4aecea2a051518536b47aa8ab6 Author: Monica Ramirez Arceda mon...@probeta.net Date: Mon Apr 23 11:30:01 2012 +0530 Remove unused vcl methods. diff --git a/unusedcode.easy b/unusedcode.easy index b2ca35e..b09221f 100755 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -27,10 +27,6 @@ Matrix3d::Inverse() const Matrix3d::Matrix3d() PopupMenu::SetSelectedEntry(unsigned short) PropBrwMgr::GetChildWindowId() -SalGraphics::DrawBitmap(SalTwoRect const*, SalBitmap const, unsigned int, OutputDevice const*) -SalGraphics::drawAlphaBitmap(SalTwoRect const, SalBitmap const, SalBitmap const) -SalGraphics::drawPolyLine(basegfx::B2DPolygon const, double, basegfx::B2DVector const, basegfx::B2DLineJoin) -SalGraphics::drawPolyPolygon(basegfx::B2DPolyPolygon const, double) SanExtensionImpl::setCertExtn(com::sun::star::uno::Sequencesigned char, com::sun::star::uno::Sequencesigned char, unsigned char) SanExtensionImpl::setCertExtn(unsigned char*, unsigned int, unsigned char*, unsigned int, unsigned char) ScAddInAsyncs::Insert(ScAddInAsync* const, unsigned short) diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx index e351ed3..6c99e46 100644 --- a/vcl/inc/salgdi.hxx +++ b/vcl/inc/salgdi.hxx @@ -405,10 +405,6 @@ public: const OutputDevice *pOutDev ); voidDrawBitmap( const SalTwoRect* pPosAry, const SalBitmap rSalBitmap, -SalColor nTransparentColor, -const OutputDevice *pOutDev ); -voidDrawBitmap( const SalTwoRect* pPosAry, -const SalBitmap rSalBitmap, const SalBitmap rTransparentBitmap, const OutputDevice *pOutDev ); diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx index 2197905..d750264 100644 --- a/vcl/source/gdi/salgdilayout.cxx +++ b/vcl/source/gdi/salgdilayout.cxx @@ -91,14 +91,6 @@ SalGraphics::~SalGraphics() // -bool SalGraphics::drawAlphaBitmap( const SalTwoRect, -const SalBitmap, const SalBitmap ) -{ -return false; -} - -// - void SalGraphics::mirror( long x, const OutputDevice *pOutDev, bool bBack ) const { long w; @@ -411,14 +403,6 @@ voidSalGraphics::DrawRect( long nX, long nY, long nWidth, long nHeight, cons mirror( nX, nWidth, pOutDev ); drawRect( nX, nY, nWidth, nHeight ); } -bool SalGraphics::drawPolyLine( -const basegfx::B2DPolygon /*rPolyPolygon*/, -double /*fTransparency*/, -const basegfx::B2DVector /*rLineWidths*/, -basegfx::B2DLineJoin /*eLineJoin*/) -{ -return false; -} void SalGraphics::DrawPolyLine( sal_uLong nPoints, const SalPoint* pPtAry, const OutputDevice *pOutDev ) { @@ -483,11 +467,6 @@ bool SalGraphics::DrawPolyPolygon( const ::basegfx::B2DPolyPolygon i_rPolyPolyg return bRet; } -bool SalGraphics::drawPolyPolygon( const ::basegfx::B2DPolyPolygon, double /*fTransparency*/) -{ -return false; -} - sal_Bool SalGraphics::DrawPolyLineBezier( sal_uLong nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry, const OutputDevice* pOutDev ) { sal_Bool bResult = sal_False; @@ -600,19 +579,6 @@ voidSalGraphics::DrawBitmap( const SalTwoRect* pPosAry, else drawBitmap( pPosAry, rSalBitmap ); } -voidSalGraphics::DrawBitmap( const SalTwoRect* pPosAry, -const SalBitmap rSalBitmap, -SalColor nTransparentColor, const OutputDevice *pOutDev ) -{ -if( (m_nLayout SAL_LAYOUT_BIDI_RTL) || (pOutDev pOutDev-IsRTLEnabled()) ) -{ -SalTwoRect pPosAry2 = *pPosAry; -mirror( pPosAry2.mnDestX, pPosAry2.mnDestWidth, pOutDev ); -drawBitmap( pPosAry2, rSalBitmap, nTransparentColor ); -} -else -drawBitmap( pPosAry, rSalBitmap, nTransparentColor ); -} void SalGraphics::DrawBitmap( const SalTwoRect* pPosAry, const SalBitmap rSalBitmap, const SalBitmap rTransparentBitmap, const OutputDevice *pOutDev ) commit 2910933f2609b19d9c6c4b793288e1b2d9991080 Author: Santiago Martinez smvar...@gmail.com Date: Mon Apr 23 11:27:07 2012 +0530 Remove unused code in vcl diff --git
[Libreoffice-commits] .: editeng/source
editeng/source/items/frmitems.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 1489254311e75a379a129bceeab49643ebea04e0 Author: Dezsi Szabolcs dezsisz...@hotmail.com Date: Fri Apr 20 14:10:56 2012 +0530 fdo#47436: Fixed crash while opening odt file. diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index efdcadb..d4b876b 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -1951,7 +1951,8 @@ bool SvxBoxItem::PutValue( const uno::Any rVal, sal_uInt8 nMemberId ) for (int n(0); n != SAL_N_ELEMENTS(aBorders); ++n) { editeng::SvxBorderLine* pLine = const_cast editeng::SvxBorderLine* ( GetLine( aBorders[n] ) ); -pLine-SetStyle( eBorderStyle ); +if( pLine ) +pLine-SetStyle( eBorderStyle ); } return sal_True; } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: svx/source
svx/source/sdr/contact/viewobjectcontactofgraphic.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit 03a651507e34ee423674d2a537f2bb4b509af6d6 Author: Muthu Subramanian sumu...@suse.com Date: Thu Apr 12 16:05:23 2012 +0530 n#717947: Fixed pdf export (of images). diff --git a/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx b/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx index 75581d6..c43d4cf 100644 --- a/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx @@ -130,7 +130,7 @@ namespace sdr } else { -if(rObjectContact.isOutputToPrinter()) +if(rObjectContact.isOutputToPrinter() || rObjectContact.isOutputToPDFFile()) { // #i76395# preview mechanism is only active if // swapin is called from inside paint preparation, so mbInsidePaint @@ -182,7 +182,7 @@ namespace sdr { ObjectContact rObjectContact = GetObjectContact(); -if(rObjectContact.isOutputToPrinter()) +if(rObjectContact.isOutputToPrinter() || rObjectContact.isOutputToPDFFile()) { // #i76395# preview mechanism is only active if // swapin is called from inside paint preparation, so mbInsidePaint @@ -195,7 +195,7 @@ namespace sdr rGrafObj.mbInsidePaint = true; rGrafObj.ForceSwapIn(); rGrafObj.mbInsidePaint = false; -} +} bRetval = true; } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: oox/source svx/inc svx/source
oox/source/drawingml/customshapeproperties.cxx|1 + oox/source/token/properties.txt |1 + svx/inc/svx/EnhancedCustomShape2d.hxx |1 + svx/inc/svx/svdoashp.hxx |1 + svx/source/customshapes/EnhancedCustomShape2d.cxx |5 + svx/source/customshapes/EnhancedCustomShapeEngine.cxx | 10 -- svx/source/svdraw/svdoashp.cxx| 11 +++ 7 files changed, 28 insertions(+), 2 deletions(-) New commits: commit 1c44b263d789b4c20e9178c6432300e301df94d6 Author: Muthu Subramanian sumu...@suse.com Date: Mon Apr 9 18:24:11 2012 +0530 fdo43752: PPTX import fix affected odp imports. Related bugs: n#719989, n#719997 diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx index 071f37a..90c0027 100644 --- a/oox/source/drawingml/customshapeproperties.cxx +++ b/oox/source/drawingml/customshapeproperties.cxx @@ -158,6 +158,7 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase /* rFi aPropertyMap[ PROP_MirroredX ] = Any( mbMirroredX ); aPropertyMap[ PROP_MirroredY ] = Any( mbMirroredY ); aPropertyMap[ PROP_TextPreRotateAngle ] = Any( mnTextRotateAngle ); +aPropertyMap[ PROP_IsPostRotateAngle ] = true; // For OpenXML Imports Sequence PropertyValue aSeq = aPropertyMap.makePropertyValueSequence(); aPropSet.setProperty( PROP_CustomShapeGeometry, aSeq ); diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt index 7ad1a4c..a86df72 100644 --- a/oox/source/token/properties.txt +++ b/oox/source/token/properties.txt @@ -244,6 +244,7 @@ IsLoaded IsNumbering IsOutlineSymbolsSet IsPlaceholderDependent +IsPostRotateAngle IsSharedFormula IsStartOfNewPage IsTextWrapped diff --git a/svx/inc/svx/EnhancedCustomShape2d.hxx b/svx/inc/svx/EnhancedCustomShape2d.hxx index 415385c..0d9da95 100644 --- a/svx/inc/svx/EnhancedCustomShape2d.hxx +++ b/svx/inc/svx/EnhancedCustomShape2d.hxx @@ -182,6 +182,7 @@ class EnhancedCustomShape2d : public SfxItemSet sal_BoolIsFlipVert() { return bFlipV; }; sal_BoolIsFlipHorz() { return bFlipH; }; sal_Int32 GetRotateAngle() { return nRotateAngle; }; +SVX_DLLPUBLIC bool IsPostRotate() const; SVX_DLLPUBLIC SdrObject*CreateLineGeometry(); SVX_DLLPUBLIC SdrObject*CreateObject( sal_Bool bLineGeometryNeededOnly ); diff --git a/svx/inc/svx/svdoashp.hxx b/svx/inc/svx/svdoashp.hxx index 013e150..0f54019 100644 --- a/svx/inc/svx/svdoashp.hxx +++ b/svx/inc/svx/svdoashp.hxx @@ -145,6 +145,7 @@ public: sal_Bool IsMirroredX() const; sal_Bool IsMirroredY() const; +bool IsPostRotate() const; void SetMirroredX( const sal_Bool bMirroredX ); void SetMirroredY( const sal_Bool bMirroredY ); diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index 3087526..39a7709 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -2332,6 +2332,11 @@ void EnhancedCustomShape2d::ApplyGluePoints( SdrObject* pObj ) } } +bool EnhancedCustomShape2d::IsPostRotate() const +{ +return pCustomShapeObj-ISA( SdrObjCustomShape ) ? ((SdrObjCustomShape*)pCustomShapeObj)-IsPostRotate() : false; +} + SdrObject* EnhancedCustomShape2d::CreateLineGeometry() { return CreateObject( sal_True ); diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx index 3be2cd4..cfb8c41 100644 --- a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx @@ -276,6 +276,7 @@ REF( com::sun::star::drawing::XShape ) SAL_CALL EnhancedCustomShapeEngine::rende EnhancedCustomShape2d aCustomShape2d( pSdrObjCustomShape ); sal_Int32 nRotateAngle = aCustomShape2d.GetRotateAngle(); +bool bPostRotateAngle = aCustomShape2d.IsPostRotate(); sal_Bool bFlipV = aCustomShape2d.IsFlipVert(); sal_Bool bFlipH = aCustomShape2d.IsFlipHorz(); @@ -315,6 +316,11 @@ REF( com::sun::star::drawing::XShape ) SAL_CALL EnhancedCustomShapeEngine::rende } pRenderedShape-Shear( pSdrObjCustomShape-GetSnapRect().Center(), nShearWink, nTan, sal_False); } +if( !bPostRotateAngle nRotateAngle ) +{ +double a = nRotateAngle * F_PI18000; +pRenderedShape-NbcRotate( pSdrObjCustomShape-GetSnapRect().Center(), nRotateAngle, sin( a ), cos( a ) ); +} if ( bFlipV ) { Point aLeft( aRect.Left(), ( aRect.Top() + aRect.Bottom() ) 1 ); @@ -327,8 +333,8 @@ REF
[Libreoffice-commits] .: 2 commits - svx/inc svx/source
svx/inc/svx/sdr/attribute/sdrfilltextattribute.hxx |3 - svx/inc/svx/tbcontrl.hxx | 39 - svx/source/sdr/attribute/sdrfilltextattribute.cxx |7 --- svx/source/tbxctrls/tbcontrl.cxx |1 4 files changed, 50 deletions(-) New commits: commit 11f5d3db58dcce64a964d1e4d26eb81e2bb709f1 Author: Winfried Donkers w.donk...@dci-electronics.nl Date: Thu Apr 5 14:34:22 2012 +0530 Unused code removal. diff --git a/svx/inc/svx/tbcontrl.hxx b/svx/inc/svx/tbcontrl.hxx index 7cc2479..fcf3e5d 100644 --- a/svx/inc/svx/tbcontrl.hxx +++ b/svx/inc/svx/tbcontrl.hxx @@ -48,14 +48,6 @@ Additional information from DocShell: SvxFontListItem (SID_ATTR_CHAR_FONTLIST) -SvxFontHeightToolBoxControl ---- -Item type: SvxFontHeightItem -Execute-Id: SID_ATTR_CHAR_FONTHEIGHT -- SvxFontHeightItem -Additional information -from DocShell: SvxFontListItem (SID_ATTR_CHAR_FONTLIST) - SvxFontColorToolBoxControl -- Item type: SvxFontColorItem @@ -173,7 +165,6 @@ class SvxLineItem; class SvxBoxInfoItem; class SvxFontItem; -class SvxFontHeightItem; class SfxStyleControllerItem_Impl; class SfxStyleSheetBasePool; class SfxTemplateItem; @@ -256,35 +247,6 @@ public: // -// class SvxFontHeightToolBoxControl - -// - -/* -class SvxFontSizeItem; -class SvxFontItem; -class SvxFontSizeBox_Impl; - -class SVX_DLLPUBLIC SvxFontHeightToolBoxControl : public SfxToolBoxControl -{ -SvxFontSizeBox_Impl* pBox; // ItemWindow fur quick-access -::com::sun::star::awt::FontDescriptor aCurrentFont; // Kopie des aktuellen Fonts - -public: -SFX_DECL_TOOLBOX_CONTROL(); -SvxFontHeightToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox rTbx ); -~SvxFontHeightToolBoxControl(); - -// new controller API -// XStatusListener -virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent Event ) -throw ( ::com::sun::star::uno::RuntimeException ); - -virtual Window* CreateItemWindow( Window *pParent ); -}; -*/ - - -// // class SvxFontColorToolBoxControl -- // @@ -334,7 +296,6 @@ public: virtual SfxPopupWindowType GetPopupWindowType() const; virtual SfxPopupWindow* CreatePopupWindow(); virtual voidSelect( sal_Bool bMod1 = sal_False ); - }; diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index f9f25a8..b504d68 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -68,7 +68,6 @@ #include com/sun/star/lang/XServiceInfo.hpp #include com/sun/star/beans/XPropertySet.hpp #include com/sun/star/frame/status/ItemStatus.hpp -#include com/sun/star/frame/status/FontHeight.hpp #include svx/dialogs.hrc #include svx/svxitems.hrc commit 62f5df61ff89269e177dd2b8a9d939f49cdbea2d Author: Santiago Martinez smvar...@gmail.com Date: Thu Apr 5 14:33:20 2012 +0530 Unused code removal. diff --git a/svx/inc/svx/sdr/attribute/sdrfilltextattribute.hxx b/svx/inc/svx/sdr/attribute/sdrfilltextattribute.hxx index 30fad2d..3dfeea9 100644 --- a/svx/inc/svx/sdr/attribute/sdrfilltextattribute.hxx +++ b/svx/inc/svx/sdr/attribute/sdrfilltextattribute.hxx @@ -56,9 +56,6 @@ namespace drawinglayer SdrFillTextAttribute(const SdrFillTextAttribute rCandidate); SdrFillTextAttribute operator=(const SdrFillTextAttribute rCandidate); -// checks if the incarnation is default constructed -bool isDefault() const; - // compare operator bool operator==(const SdrFillTextAttribute rCandidate) const; diff --git a/svx/source/sdr/attribute/sdrfilltextattribute.cxx b/svx/source/sdr/attribute/sdrfilltextattribute.cxx index 3ab55bd..f36cf7f 100644 --- a/svx/source/sdr/attribute/sdrfilltextattribute.cxx +++ b/svx/source/sdr/attribute/sdrfilltextattribute.cxx @@ -68,13 +68,6 @@ namespace drawinglayer return *this; } -bool SdrFillTextAttribute::isDefault() const -{ -return(getFill().isDefault() - getFillFloatTransGradient().isDefault() - getText().isDefault()); -} - bool SdrFillTextAttribute::operator==(const SdrFillTextAttribute rCandidate) const { return(getFill() == rCandidate.getFill() ___ Libreoffice-commits mailing list
[Libreoffice-commits] .: oox/source
oox/source/drawingml/fillproperties.cxx |4 ++-- oox/source/drawingml/graphicshapecontext.cxx | 21 - oox/source/drawingml/shape.cxx | 15 +-- oox/source/token/properties.txt |3 +++ 4 files changed, 38 insertions(+), 5 deletions(-) New commits: commit 8866e1986d354f0eb7eb26d78e6b6a22c6fda632 Author: Muthu Subramanian sumu...@suse.com Date: Mon Apr 2 17:33:32 2012 +0530 n747499: PPTX embedded media playback. Currently plays the embedded audio files. The image for the audio file seems to be rendered bad, currently. diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx index 07df75d..4a94c01 100644 --- a/oox/source/drawingml/fillproperties.cxx +++ b/oox/source/drawingml/fillproperties.cxx @@ -440,9 +440,9 @@ void GraphicProperties::pushToPropMap( PropertyMap rPropMap, const GraphicHelpe if( nContrast != 0 ) rPropMap[ PROP_AdjustContrast ] = nContrast; -// TODO: Audio content, yet to be implemented +// Media content if( !maAudio.msEmbed.isEmpty() ) -rPropMap[ PROP_Sound ] = maAudio.msEmbed; +rPropMap[ PROP_MediaURL ] = maAudio.msEmbed; } // diff --git a/oox/source/drawingml/graphicshapecontext.cxx b/oox/source/drawingml/graphicshapecontext.cxx index f01854c..2230a3b 100644 --- a/oox/source/drawingml/graphicshapecontext.cxx +++ b/oox/source/drawingml/graphicshapecontext.cxx @@ -26,6 +26,7 @@ * / +#include com/sun/star/io/XTempFile.hpp #include oox/drawingml/graphicshapecontext.hxx #include osl/diagnose.h @@ -42,6 +43,9 @@ #include oox/vml/vmlshapecontainer.hxx #include oox/drawingml/fillproperties.hxx #include oox/drawingml/transform2dcontext.hxx +#include oox/helper/binaryinputstream.hxx +#include oox/helper/binaryoutputstream.hxx +#include comphelper/processfactory.hxx using ::rtl::OUString; using namespace ::com::sun::star; @@ -77,7 +81,22 @@ Reference XFastContextHandler GraphicShapeContext::createFastChildContext( sa xRet.set( new BlipFillContext( *this, xAttribs, mpShapePtr-getGraphicProperties().maBlipProps ) ); break; case XML_wavAudioFile: -getEmbeddedWAVAudioFile( getRelations(), xAttribs, mpShapePtr-getGraphicProperties().maAudio ); +{ +getEmbeddedWAVAudioFile( getRelations(), xAttribs, mpShapePtr-getGraphicProperties().maAudio ); +if( !mpShapePtr-getGraphicProperties().maAudio.msEmbed.isEmpty() ) +{ +Reference XMultiServiceFactory xFactory = comphelper::getProcessServiceFactory(); +Reference XInputStream xInStrm( getFilter().openInputStream( mpShapePtr-getGraphicProperties().maAudio.msEmbed ), UNO_SET_THROW ); +Reference XTempFile xTempFile( xFactory-createInstance( CREATE_OUSTRING( com.sun.star.io.TempFile ) ), UNO_QUERY_THROW ); +Reference XOutputStream xOutStrm( xTempFile-getOutputStream(), UNO_SET_THROW ); +BinaryXOutputStream aOutStrm( xOutStrm, false ); +BinaryXInputStream aInStrm( xInStrm, false ); +aInStrm.copyToStream( aOutStrm ); + +xTempFile-setRemoveFile( false ); +mpShapePtr-getGraphicProperties().maAudio.msEmbed = xTempFile-getUri(); +} +} break; } diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index d9f30f7..01ee819 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -330,11 +330,22 @@ Reference XShape Shape::createAndInsert( sal_Bool bClearText, basegfx::B2DHomMatrix aParentTransformation ) { +bool bIsEmbMedia = false; OSL_TRACE(Shape::createAndInsert id: %s, rtl::OUStringToOString(msId, RTL_TEXTENCODING_UTF8 ).getStr()); awt::Rectangle aShapeRectHmm( maPosition.X / 360, maPosition.Y / 360, maSize.Width / 360, maSize.Height / 360 ); -OUString aServiceName = finalizeServiceName( rFilterBase, rServiceName, aShapeRectHmm ); +OUString aServiceName; +if( rServiceName == OUString(RTL_CONSTASCII_USTRINGPARAM(com.sun.star.drawing.GraphicObjectShape) ) +mpGraphicPropertiesPtr !mpGraphicPropertiesPtr-maAudio.msEmbed.isEmpty() ) +{ +aServiceName = finalizeServiceName( rFilterBase, OUString( RTL_CONSTASCII_USTRINGPARAM( com.sun.star.presentation.MediaShape ) ), aShapeRectHmm ); +bIsEmbMedia = true; +} +else +{ +aServiceName = finalizeServiceName( rFilterBase, rServiceName, aShapeRectHmm ); +} sal_Bool bIsCustomShape = aServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( com.sun.star.drawing.CustomShape ) ) || aServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM
[Libreoffice-commits] .: vcl/source
vcl/source/gdi/outdev2.cxx | 68 ++--- 1 file changed, 34 insertions(+), 34 deletions(-) New commits: commit 27d9df17c13b22aed7d9194d9dfcf7980b632b3c Author: Muthu Subramanian sumu...@suse.com Date: Thu Mar 29 16:08:56 2012 +0530 n714787: Duplicate code removal. diff --git a/vcl/source/gdi/outdev2.cxx b/vcl/source/gdi/outdev2.cxx index b8c144e..d0f727e 100644 --- a/vcl/source/gdi/outdev2.cxx +++ b/vcl/source/gdi/outdev2.cxx @@ -1582,6 +1582,36 @@ namespace (int)nDstAlpha*nDestColor*nSourceAlpha/255 ) / (int)nResAlpha : 0; return sal_uInt8( c ); } + +inline BitmapColor lcl_AlphaBlend( int nX, int nY, + const longnMapX, + const longnMapY, + BitmapReadAccess* pP, + BitmapReadAccess* pA, + BitmapReadAccess* pB, + BitmapWriteAccess*pAlphaW, + sal_uInt8nResAlpha ) +{ +BitmapColor aDstCol,aSrcCol; +aSrcCol = pP-GetColor( nMapY, nMapX ); +aDstCol = pB-GetColor( nY, nX ); + +// vcl stores transparency, not alpha - invert it +const sal_uInt8 nSrcAlpha = 255 - pA-GetPixel( nMapY, nMapX ).GetBlueOrIndex(); +const sal_uInt8 nDstAlpha = 255 - pAlphaW-GetPixel( nY, nX ).GetBlueOrIndex(); + +// Perform porter-duff compositing 'over' operation +// +// Co = Cs + Cd*(1-As) +// Ad = As + Ad*(1-As) +nResAlpha = (int)nSrcAlpha + (int)nDstAlpha - (int)nDstAlpha*nSrcAlpha/255; + +aDstCol.SetRed( lcl_calcColor( aSrcCol.GetRed(), nSrcAlpha, nDstAlpha, nResAlpha, aDstCol.GetRed() ) ); +aDstCol.SetBlue( lcl_calcColor( aSrcCol.GetBlue(), nSrcAlpha, nDstAlpha, nResAlpha, aDstCol.GetBlue() ) ); +aDstCol.SetGreen( lcl_calcColor( aSrcCol.GetGreen(), nSrcAlpha, nDstAlpha, nResAlpha, aDstCol.GetGreen() ) ); + +return aDstCol; +} } // @@ -1597,9 +1627,10 @@ Bitmap OutputDevice::ImplBlendWithAlpha( Bitmap aBmp, const long* pMapX, const long* pMapY ) { -BitmapColor aDstCol,aSrcCol; +BitmapColor aDstCol; Bitmap res; int nX, nY; +sal_uInt8 nResAlpha; OSL_ENSURE(mpAlphaVDev, ImplBlendWithAlpha(): call me only with valid alpha VDev! ); @@ -1632,22 +1663,7 @@ Bitmap OutputDevice::ImplBlendWithAlpha( Bitmap aBmp, const long nMapX = pMapX[ nX ]; const sal_uLong nD = nVCLDitherLut[ nModY | ( nOutX 0x0FL ) ]; -aSrcCol = pP-GetColor( nMapY, nMapX ); -aDstCol = pB-GetColor( nY, nX ); - -// vcl stores transparency, not alpha - invert it -const sal_uInt8 nSrcAlpha = 255 - pA-GetPixel( nMapY, nMapX ).GetBlueOrIndex(); -const sal_uInt8 nDstAlpha = 255 - pAlphaW-GetPixel( nY, nX ).GetBlueOrIndex(); - -// Perform porter-duff compositing 'over' operation -// -// Co = Cs + Cd*(1-As) -// Ad = As + Ad*(1-As) -const sal_uInt8 nResAlpha = (int)nSrcAlpha + (int)nDstAlpha - (int)nDstAlpha*nSrcAlpha/255; - -aDstCol.SetRed( lcl_calcColor( aSrcCol.GetRed(), nSrcAlpha, nDstAlpha, nResAlpha, aDstCol.GetRed() ) ); -aDstCol.SetBlue( lcl_calcColor( aSrcCol.GetBlue(), nSrcAlpha, nDstAlpha, nResAlpha, aDstCol.GetBlue() ) ); -aDstCol.SetGreen( lcl_calcColor( aSrcCol.GetGreen(), nSrcAlpha, nDstAlpha, nResAlpha, aDstCol.GetGreen() ) ); +aDstCol = lcl_AlphaBlend( nX, nY, nMapX, nMapY, pP, pA, pB, pAlphaW, nResAlpha ); aIndex.SetIndex( (sal_uInt8) ( nVCLRLut[ ( nVCLLut[ aDstCol.GetRed() ] + nD ) 16UL ] + nVCLGLut[ ( nVCLLut[ aDstCol.GetGreen() ] + nD ) 16UL ] + @@ -1678,23 +1694,7 @@ Bitmap OutputDevice::ImplBlendWithAlpha( Bitmap aBmp, for( nX = 0; nX nDstWidth; nX++ ) { const long nMapX = pMapX[ nX ]; - -aSrcCol = pP-GetColor( nMapY, nMapX ); -aDstCol = pB-GetColor( nY, nX ); - -// vcl stores transparency, not alpha - invert it -const sal_uInt8 nSrcAlpha = 255 - pA-GetPixel( nMapY, nMapX ).GetBlueOrIndex(); -const sal_uInt8 nDstAlpha = 255 - pAlphaW-GetPixel( nY, nX ).GetBlueOrIndex(); - -// Perform porter-duff compositing 'over' operation
[Libreoffice-commits] .: connectivity/inc connectivity/source sc/source unusedcode.easy vbahelper/inc vbahelper/source
connectivity/inc/connectivity/dbcharset.hxx |1 connectivity/source/commontools/dbcharset.cxx |6 - sc/source/ui/vba/excelvbahelper.cxx | 22 -- sc/source/ui/vba/excelvbahelper.hxx |1 unusedcode.easy | 10 vbahelper/inc/vbahelper/vbahelper.hxx | 11 - vbahelper/source/vbahelper/vbahelper.cxx | 31 -- 7 files changed, 82 deletions(-) New commits: commit fdd3427a584a3f14ecb0d00557417434db04df99 Author: Santiago Martinez smvar...@gmail.com Date: Thu Mar 8 11:14:41 2012 +0530 Removed unused code. diff --git a/connectivity/inc/connectivity/dbcharset.hxx b/connectivity/inc/connectivity/dbcharset.hxx index 60c96fb..cb13fcd 100644 --- a/connectivity/inc/connectivity/dbcharset.hxx +++ b/connectivity/inc/connectivity/dbcharset.hxx @@ -116,7 +116,6 @@ namespace dbtools ::rtl::OUString getIanaName() const { return m_aIanaName; } protected: -CharsetIteratorDerefHelper(); CharsetIteratorDerefHelper( const rtl_TextEncoding _eEncoding, const ::rtl::OUString _rIanaName ); }; diff --git a/connectivity/source/commontools/dbcharset.cxx b/connectivity/source/commontools/dbcharset.cxx index 87b78c4..45729df 100644 --- a/connectivity/source/commontools/dbcharset.cxx +++ b/connectivity/source/commontools/dbcharset.cxx @@ -154,12 +154,6 @@ namespace dbtools { } -//- -CharsetIteratorDerefHelper::CharsetIteratorDerefHelper() -:m_eEncoding(RTL_TEXTENCODING_DONTKNOW) -{ -} - //= //= OCharsetMap::CharsetIterator //= diff --git a/sc/source/ui/vba/excelvbahelper.cxx b/sc/source/ui/vba/excelvbahelper.cxx index 7ee13b2..3d80796 100644 --- a/sc/source/ui/vba/excelvbahelper.cxx +++ b/sc/source/ui/vba/excelvbahelper.cxx @@ -139,19 +139,6 @@ void implSetZoom( const uno::Reference frame::XModel xModel, sal_Int16 nZoom pViewSh-GetViewData()-SetZoom( aFract, aFract, nTabs ); pViewSh-RefreshZoom(); } -bool isInPrintPreview( SfxViewFrame* pView ) -{ -sal_uInt16 nViewNo = SID_VIEWSHELL1 - SID_VIEWSHELL0; -if ( pView-GetObjectShell()-GetFactory().GetViewFactoryCount() -nViewNo !pView-GetObjectShell()-IsInPlaceActive() ) -{ -SfxViewFactory rViewFactory = -pView-GetObjectShell()-GetFactory().GetViewFactory(nViewNo); -if ( pView-GetCurViewId() == rViewFactory.GetOrdinal() ) -return true; -} -return false; -} const ::rtl::OUString REPLACE_CELLS_WARNING( RTL_CONSTASCII_USTRINGPARAM( ReplaceCellsWarning)); @@ -321,15 +308,6 @@ getCurrentBestViewShell( const uno::Reference uno::XComponentContext xConte return getBestViewShell( xModel ); } -SfxViewFrame* -getViewFrame( const uno::Reference frame::XModel xModel ) -{ -ScTabViewShell* pViewShell = getBestViewShell( xModel ); -if ( pViewShell ) -return pViewShell-GetViewFrame(); -return NULL; -} - sal_Bool IsR1C1ReferFormat( ScDocument* pDoc, const rtl::OUString sRangeStr ) { ScRangeList aCellRanges; diff --git a/sc/source/ui/vba/excelvbahelper.hxx b/sc/source/ui/vba/excelvbahelper.hxx index 85031ad..53f44c9 100644 --- a/sc/source/ui/vba/excelvbahelper.hxx +++ b/sc/source/ui/vba/excelvbahelper.hxx @@ -59,7 +59,6 @@ bool implnCopyRange( const css::uno::Reference css::frame::XModel xModel, con ScTabViewShell* getBestViewShell( const css::uno::Reference css::frame::XModel xModel ) ; ScDocShell* getDocShell( const css::uno::Reference css::frame::XModel xModel ) ; ScTabViewShell* getCurrentBestViewShell( const css::uno::Reference css::uno::XComponentContext xContext ); -SfxViewFrame* getViewFrame( const css::uno::Reference css::frame::XModel xModel ); sal_Bool IsR1C1ReferFormat( ScDocument* pDoc, const ::rtl::OUString sRangeStr ); formula::FormulaGrammar::Grammar GetFormulaGrammar( ScDocument* pDoc, const ScAddress sAddress, const css::uno::Any aFormula ); diff --git a/unusedcode.easy b/unusedcode.easy index 80eff11..58a4e92 100755 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -875,7 +875,6 @@ cppcanvas::internal::(anonymous namespace)::TransparencyGroupAction::Transparenc cppcanvas::internal::ImplSprite::ImplSprite(com::sun::star::uno::Referencecom::sun::star::rendering::XSpriteCanvas const, com::sun::star::uno::Referencecom::sun::star::rendering::XAnimatedSprite const, boost::shared_ptrcppcanvas::internal::ImplSpriteCanvas::TransformationArbiter const) cppcanvas::internal::ImplText::ImplText(boost::shared_ptrcppcanvas::Canvas const, rtl::OUString const) dbaui::getKeyColumns(com::sun::star::uno::Referencecom::sun::star::container::XIndexAccess const, int)
[Libreoffice-commits] .: oox/inc oox/source
oox/inc/oox/drawingml/fillproperties.hxx |4 +++- oox/source/drawingml/fillproperties.cxx |4 oox/source/drawingml/graphicshapecontext.cxx |3 +++ 3 files changed, 10 insertions(+), 1 deletion(-) New commits: commit d082cb2060bbfab7d630b63423b90e449b36150f Author: Muthu Subramanian sumu...@suse.com Date: Mon Mar 5 19:09:45 2012 +0530 n747499: Wav/Audio files import - stub. diff --git a/oox/inc/oox/drawingml/fillproperties.hxx b/oox/inc/oox/drawingml/fillproperties.hxx index 9f7c154..b528eae 100644 --- a/oox/inc/oox/drawingml/fillproperties.hxx +++ b/oox/inc/oox/drawingml/fillproperties.hxx @@ -34,6 +34,7 @@ #include com/sun/star/geometry/IntegerRectangle2D.hpp #include oox/drawingml/color.hxx #include oox/helper/helper.hxx +#include oox/drawingml/embeddedwavaudiofile.hxx namespace oox { class GraphicHelper; @@ -135,7 +136,8 @@ struct FillProperties struct GraphicProperties { -BlipFillProperties maBlipProps;/// Properties for the graphic. +BlipFillProperties maBlipProps;/// Properties for the graphic. +EmbeddedWAVAudioFilemaAudio;/// Audio file details /** Overwrites all members that are explicitly set in rSourceProps. */ voidassignUsed( const GraphicProperties rSourceProps ); diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx index ad6cf4b..0a49985 100644 --- a/oox/source/drawingml/fillproperties.cxx +++ b/oox/source/drawingml/fillproperties.cxx @@ -444,6 +444,10 @@ void GraphicProperties::pushToPropMap( PropertyMap rPropMap, const GraphicHelpe sal_Int16 nContrast = getLimitedValue sal_Int16, sal_Int32 ( maBlipProps.moContrast.get( 0 ) / PER_PERCENT, -100, 100 ); if( nContrast != 0 ) rPropMap[ PROP_AdjustContrast ] = nContrast; + +// TODO: Audio content, yet to be implemented +if( !maAudio.msEmbed.isEmpty() ) +rPropMap[ PROP_Sound ] = maAudio.msEmbed; } // diff --git a/oox/source/drawingml/graphicshapecontext.cxx b/oox/source/drawingml/graphicshapecontext.cxx index 016fbf3..f01854c 100644 --- a/oox/source/drawingml/graphicshapecontext.cxx +++ b/oox/source/drawingml/graphicshapecontext.cxx @@ -76,6 +76,9 @@ Reference XFastContextHandler GraphicShapeContext::createFastChildContext( sa case XML_blipFill: xRet.set( new BlipFillContext( *this, xAttribs, mpShapePtr-getGraphicProperties().maBlipProps ) ); break; +case XML_wavAudioFile: +getEmbeddedWAVAudioFile( getRelations(), xAttribs, mpShapePtr-getGraphicProperties().maAudio ); +break; } if ((getNamespace( aElementToken ) == NMSP_vml) mpShapePtr) ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: oox/source
oox/source/drawingml/shape.cxx |4 +++- oox/source/ppt/pptshape.cxx|2 +- 2 files changed, 4 insertions(+), 2 deletions(-) New commits: commit 77901e53ecd99aed59e5c8697461ab4d241388a4 Author: Muthu Subramanian sumu...@suse.com Date: Fri Mar 2 18:01:45 2012 +0530 n657904: Styling information isn't applied to grpSp. diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index a6e86c3..5e3aa73 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -299,8 +299,10 @@ void Shape::addChildren( aChildTransformation.get(2, 2)); std::vector ShapePtr ::iterator aIter( rMaster.maChildren.begin() ); -while( aIter != rMaster.maChildren.end() ) +while( aIter != rMaster.maChildren.end() ) { +(*aIter)-setMasterTextListStyle( mpMasterTextListStyle ); (*aIter++)-addShape( rFilterBase, pTheme, rxShapes, aChildTransformation, NULL, pShapeMap ); +} } Reference XShape Shape::createAndInsert( diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx index 0bd2ce4..a72a10c 100644 --- a/oox/source/ppt/pptshape.cxx +++ b/oox/source/ppt/pptshape.cxx @@ -310,7 +310,7 @@ void PPTShape::addShape( { if ( !aMasterTextListStyle.get() ) { -bool isOther = !getTextBody().get(); +bool isOther = !getTextBody().get() !sServiceName.equalsAscii(com.sun.star.drawing.GroupShape); TextListStylePtr aSlideStyle = isOther ? rSlidePersist.getOtherTextStyle() : rSlidePersist.getDefaultTextStyle(); // Combine from MasterSlide details as well. if( rSlidePersist.getMasterPersist().get() ) ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: connectivity/source
connectivity/source/parse/sqliterator.cxx | 132 ++ connectivity/source/parse/sqlnode.cxx | 106 +++- 2 files changed, 117 insertions(+), 121 deletions(-) New commits: commit d1e5860bc001f092477421cb871636f3b0071e28 Author: Philipp Weissenbacher p.weissenbac...@gmail.com Date: Thu Mar 1 14:53:10 2012 +0530 Translate German comments. diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx index ae31689..6a3b157 100644 --- a/connectivity/source/parse/sqliterator.cxx +++ b/connectivity/source/parse/sqliterator.cxx @@ -72,8 +72,8 @@ namespace connectivity Reference XNameAccess m_xTableContainer; Reference XNameAccess m_xQueryContainer; -::boost::shared_ptr OSQLTablesm_pTables; /// all tables which participate in the SQL statement -::boost::shared_ptr OSQLTablesm_pSubTables; /// all tables from sub queries not the tables from the select tables +::boost::shared_ptr OSQLTablesm_pTables; // all tables which participate in the SQL statement +::boost::shared_ptr OSQLTablesm_pSubTables; // all tables from sub queries not the tables from the select tables ::boost::shared_ptr QueryNameSet m_pForbiddenQueryNames; sal_uInt32 m_nIncludeMask; @@ -216,14 +216,14 @@ void OSQLParseTreeIterator::setParseTree(const OSQLParseNode * pNewParseTree) return; } -// falls m_pParseTree aber keine Connection, dann Fehler +// If m_pParseTree, but no connection then return if ( !m_pImpl-m_xTableContainer.is() ) return; m_aErrors = SQLException(); -// Statement-Typ ermitteln ... +// Determine statement type ... if (SQL_ISRULE(m_pParseTree,select_statement) || SQL_ISRULE(m_pParseTree,union_statement) ) { m_eStatementType = SQL_STATEMENT_SELECT; @@ -456,7 +456,7 @@ void OSQLParseTreeIterator::traverseOneTableName( OSQLTables _rTables,const OSQ ::rtl::OUString aSchema,aTableName,aComposedName; ::rtl::OUString aTableRange(rTableRange); -// Tabellenname abholen +// Get table name OSQLParseNode::getTableComponents(pTableName,aCatalog,aSchema,aTableName,m_pImpl-m_xDatabaseMetaData); // create the composed name like DOMAIN.USER.TABLE1 @@ -479,16 +479,16 @@ void OSQLParseTreeIterator::traverseOneTableName( OSQLTables _rTables,const OSQ //- void OSQLParseTreeIterator::impl_fillJoinConditions(const OSQLParseNode* i_pJoinCondition) { -if (i_pJoinCondition-count() == 3// Ausdruck is geklammert +if (i_pJoinCondition-count() == 3// Expression with brackets SQL_ISPUNCTUATION(i_pJoinCondition-getChild(0),() SQL_ISPUNCTUATION(i_pJoinCondition-getChild(2),))) { impl_fillJoinConditions(i_pJoinCondition-getChild(1)); } -else if (SQL_ISRULEOR2(i_pJoinCondition,search_condition,boolean_term) // AND/OR-Verknuepfung: +else if (SQL_ISRULEOR2(i_pJoinCondition,search_condition,boolean_term) // AND/OR logic operation: i_pJoinCondition-count() == 3) { -// nur AND Verkn�pfung zulassen +// Only allow AND logic operation if ( SQL_ISTOKEN(i_pJoinCondition-getChild(1),AND) ) { impl_fillJoinConditions(i_pJoinCondition-getChild(0)); @@ -498,7 +498,7 @@ void OSQLParseTreeIterator::impl_fillJoinConditions(const OSQLParseNode* i_pJoin else if (SQL_ISRULE(i_pJoinCondition,comparison_predicate)) { // only the comparison of columns is allowed -OSL_ENSURE(i_pJoinCondition-count() == 3,OQueryDesignView::InsertJoinConnection: Fehler im Parse Tree); +OSL_ENSURE(i_pJoinCondition-count() == 3,OQueryDesignView::InsertJoinConnection: error in the parse tree); if (SQL_ISRULE(i_pJoinCondition-getChild(0),column_ref) SQL_ISRULE(i_pJoinCondition-getChild(2),column_ref) i_pJoinCondition-getChild(1)-getNodeType() == SQL_NODE_EQUAL) @@ -540,7 +540,7 @@ void OSQLParseTreeIterator::getQualified_join( OSQLTables _rTables, const OSQLP else { const OSQLParseNode* pColumnCommalist = pJoin_spec-getChild(2); -// Alle Columns in der column_commalist ... +// All columns in the column_commalist ... for (sal_uInt32 i = 0; i pColumnCommalist-count(); i++) { const OSQLParseNode * pCol = pColumnCommalist-getChild(i); @@ -631,7 +631,7 @@ void OSQLParseTreeIterator::getSelect_statement(OSQLTables _rTables,const OSQLP const OSQLParseNode* pTableName = NULL; ::rtl::OUString aTableRange; for (sal_uInt32 i = 0; i pTableRefCommalist-count(); i++) -{ // from clause durchlaufen +{ // Process FROM clause
[Libreoffice-commits] .: sc/source
sc/source/ui/dbgui/tpsort.cxx | 45 ++ sc/source/ui/inc/tpsort.hxx | 30 +--- 2 files changed, 34 insertions(+), 41 deletions(-) New commits: commit 2bb8328d0a3b2d4a076c1896f0c45cff1cc4677b Author: Albert Thuswaldner albert.thuswald...@gmail.com Date: Tue Feb 28 19:14:26 2012 +0530 German Comments translations. diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx index 6609563..aecb208 100644 --- a/sc/source/ui/dbgui/tpsort.cxx +++ b/sc/source/ui/dbgui/tpsort.cxx @@ -61,26 +61,26 @@ using namespace com::sun::star; // --- /* - * Da sich Einstellungen auf der zweiten TabPage (Optionen) auf - * die erste TabPage auswirken, muss es die Moeglichkeit geben, - * dies der jeweils anderen Seite mitzuteilen. + * Since the settings on the second Tab Page (Options) effects + * the first Tab Page, there must be a way for it to communicate with the + * other Page. * - * Im Moment wird dieses Problem ueber zwei Datenmember des TabDialoges - * geloest. Wird eine Seite Aktiviert/Deaktiviert, so gleicht sie diese - * Datenmember mit dem eigenen Zustand ab (-Activate()/Deactivate()). + * At the moment this problem is solved through using two data members of the + * Tab Pages. If a page is enabled / disabled, it compares this data member + * with its own state (- Activate() / Deactivate()). * - * Die Klasse SfxTabPage bietet mittlerweile ein Verfahren an: + * In the meantime the class SfxTabPage offers the following method: * * virtual sal_Bool HasExchangeSupport() const; - return sal_True; * virtual void ActivatePage(const SfxItemSet ); * virtual int DeactivatePage(SfxItemSet * = 0); * - * muss noch geaendert werden! + * This still needs to be changed! */ // // -// Sortierkriterien-Tabpage: +// Sort Criteria Tab page ScTabPageSortFields::ScTabPageSortFields( Window* pParent, const SfxItemSet rArgSet ) @@ -183,7 +183,7 @@ void ScTabPageSortFields::Reset( const SfxItemSet /* rArgSet */ ) if ( aLbSort1.GetEntryCount() == 0 ) FillFieldLists(); -// Selektieren der ListBoxen: +// ListBox selection: if ( rSortData.bDoSort[0] ) { @@ -200,7 +200,7 @@ void ScTabPageSortFields::Reset( const SfxItemSet /* rArgSet */ ) } else { -aSortLbArr[i]-SelectEntryPos( 0 ); // keiner selektieren +aSortLbArr[i]-SelectEntryPos( 0 ); // Select none aDirBtnArr[i][0]-Check(); // Up } } @@ -261,7 +261,7 @@ sal_Bool ScTabPageSortFields::FillItemSet( SfxItemSet rArgSet ) OSL_ENSURE((nSort1Pos = SC_MAXFIELDS) (nSort2Pos = SC_MAXFIELDS) (nSort3Pos = SC_MAXFIELDS), -Array-Range Fehler! ); +Array range error! ); if ( nSort1Pos == LISTBOX_ENTRY_NOTFOUND ) nSort1Pos = 0; if ( nSort2Pos == LISTBOX_ENTRY_NOTFOUND ) nSort2Pos = 0; @@ -273,10 +273,9 @@ sal_Bool ScTabPageSortFields::FillItemSet( SfxItemSet rArgSet ) theSortData.bDoSort[1] = (nSort2Pos 0); theSortData.bDoSort[2] = (nSort3Pos 0); -// wenn auf Optionen-Seite OK gewaehlt wurde und -// dabei die Sortierrichtung umgestellt wurde, so -// wird das erste Feld der jeweiligen Richtung als -// Sortierkriterium gewaehlt (steht in nFieldArr[0]): +// If the OK was selected on the Options page while the sort +// direction was changed, then the first field (i.e. nFieldArr[0]) +// of the respective direction is chosen as the sorting criterion: if ( bSortByRows != pDlg-GetByRows() ) { theSortData.nField[0] = @@ -295,7 +294,7 @@ sal_Bool ScTabPageSortFields::FillItemSet( SfxItemSet rArgSet ) theSortData.bAscending[0] = aBtnUp1.IsChecked(); theSortData.bAscending[1] = aBtnUp2.IsChecked(); theSortData.bAscending[2] = aBtnUp3.IsChecked(); -// bHasHeader ist in ScTabPageSortOptions::FillItemSet, wo es hingehoert +// bHasHeader is in ScTabPageSortOptions::FillItemSet, where it belongs } else { @@ -311,8 +310,7 @@ sal_Bool ScTabPageSortFields::FillItemSet( SfxItemSet rArgSet ) // --- -// fuer Datenaustausch ohne Dialog-Umweg: (! noch zu tun !) - +// for data exchange without dialogue detour: (still TODO!) void ScTabPageSortFields::ActivatePage() { if ( pDlg ) @@ -518,7 +516,7 @@ IMPL_LINK( ScTabPageSortFields, SelectHdl, ListBox *, pLb ) } // -// Sortieroptionen-Tabpage:
[Libreoffice-commits] .: svx/source
svx/source/customshapes/EnhancedCustomShape2d.cxx |2 ++ svx/source/svdraw/svdoashp.cxx|2 +- 2 files changed, 3 insertions(+), 1 deletion(-) New commits: commit 44b98b588c51c976c38b08844f7e09d236518e32 Author: Muthu Subramanian sumu...@suse.com Date: Mon Feb 27 18:03:21 2012 +0530 n742593: Adding checks before using textbox sizes. diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index 3e5f340..3087526 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -1193,6 +1193,8 @@ Rectangle EnhancedCustomShape2d::GetTextRect() const } Rectangle aRect( aTopLeft, aBottomRight ); OSL_TRACE(EnhancedCustomShape2d::GetTextRect: %d x %d, aRect.GetWidth(), aRect.GetHeight()); +if( aRect.GetWidth() = 1 || aRect.GetHeight() = 1 ) +return aLogicRect; aRect.Move( aLogicRect.Left(), aLogicRect.Top() ); aRect.Justify(); return aRect; diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index aac2cf8..2cd4a04 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -556,7 +556,7 @@ sal_Bool SdrObjCustomShape::GetTextBounds( Rectangle rTextBound ) const if ( xCustomShapeEngine.is() ) { awt::Rectangle aR( xCustomShapeEngine-getTextBounds() ); -if ( aR.Width || aR.Height ) +if ( aR.Width 1 aR.Height 1 ) { rTextBound = Rectangle( Point( aR.X, aR.Y ), Size( aR.Width, aR.Height ) ); bRet = sal_True; ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/aqua vcl/source
vcl/aqua/source/app/salinst.cxx |6 +++--- vcl/aqua/source/app/salsys.cxx |4 ++-- vcl/aqua/source/dtrans/HtmlFmtFlt.cxx |4 ++-- vcl/aqua/source/dtrans/PictToBmpFlt.cxx |4 ++-- vcl/source/gdi/pdfwriter_impl.cxx |5 ++--- vcl/source/gdi/print3.cxx |2 +- 6 files changed, 12 insertions(+), 13 deletions(-) New commits: commit 5d1acca5a9d40d6197e12fd959c3644bcc60f799 Author: Chr. Rossmanith chrrossman...@gmx.de Date: Mon Feb 27 18:49:17 2012 +0530 Replace getLength() with isEmpty() where appropriate diff --git a/vcl/aqua/source/app/salinst.cxx b/vcl/aqua/source/app/salinst.cxx index 7a01b0b..794dd84 100644 --- a/vcl/aqua/source/app/salinst.cxx +++ b/vcl/aqua/source/app/salinst.cxx @@ -997,7 +997,7 @@ rtl::OUString AquaSalInstance::GetDefaultPrinter() // #i113170# may not be the main thread if called from UNO API SalData::ensureThreadAutoreleasePool(); -if( ! maDefaultPrinter.getLength() ) +if( maDefaultPrinter.isEmpty() ) { NSPrintInfo* pPI = [NSPrintInfo sharedPrintInfo]; DBG_ASSERT( pPI, no print info ); @@ -1138,10 +1138,10 @@ void AquaSalInstance::AddToRecentDocumentList(const rtl::OUString rFileUrl, con { // Convert file URL for external use (see above) rtl::OUString externalUrl = translateToExternalUrl(rFileUrl); -if( 0 == externalUrl.getLength() ) +if( externalUrl.isEmpty() ) externalUrl = rFileUrl; -if( externalUrl.getLength() !isDangerousUrl( externalUrl ) ) +if( !externalUrl.isEmpty() !isDangerousUrl( externalUrl ) ) { NSString* pString = CreateNSString( externalUrl ); NSURL* pURL = [NSURL URLWithString: pString]; diff --git a/vcl/aqua/source/app/salsys.cxx b/vcl/aqua/source/app/salsys.cxx index 8a371d6..7c6f683 100644 --- a/vcl/aqua/source/app/salsys.cxx +++ b/vcl/aqua/source/app/salsys.cxx @@ -109,7 +109,7 @@ rtl::OUString AquaSalSystem::GetDisplayScreenName( unsigned int nScreen ) static NSString* getStandardString( int nButtonId ) { rtl::OUString aText( Button::GetStandardText( nButtonId ) ); -if( ! aText.getLength() ) // this is for bad cases, we might be missing the vcl resource +if( aText.isEmpty() ) // this is for bad cases, we might be missing the vcl resource { switch( nButtonId ) { @@ -121,7 +121,7 @@ static NSString* getStandardString( int nButtonId ) case BUTTON_NO :aText = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( No ) );break; } } -return aText.getLength() ? CreateNSString( aText) : nil; +return aText.isEmpty() ? nil : CreateNSString( aText); } int AquaSalSystem::ShowNativeMessageBox( const rtl::OUString rTitle, diff --git a/vcl/aqua/source/dtrans/HtmlFmtFlt.cxx b/vcl/aqua/source/dtrans/HtmlFmtFlt.cxx index 0bd461d..275f5a1 100644 --- a/vcl/aqua/source/dtrans/HtmlFmtFlt.cxx +++ b/vcl/aqua/source/dtrans/HtmlFmtFlt.cxx @@ -65,9 +65,9 @@ const std::string TAG_END_BODY = std::string(/BODY); Sequencesal_Int8 SAL_CALL TextHtmlToHTMLFormat(Sequencesal_Int8 aTextHtml) { -OSL_ASSERT(aTextHtml.getLength() 0); +OSL_ASSERT(!aTextHtml.isEmpty()); -if (!(aTextHtml.getLength() 0)) +if (aTextHtml.isEmpty()) return Sequencesal_Int8(); // fill the buffer with dummy values to calc the exact length diff --git a/vcl/aqua/source/dtrans/PictToBmpFlt.cxx b/vcl/aqua/source/dtrans/PictToBmpFlt.cxx index 3eb4fb8..4b3d371 100644 --- a/vcl/aqua/source/dtrans/PictToBmpFlt.cxx +++ b/vcl/aqua/source/dtrans/PictToBmpFlt.cxx @@ -161,7 +161,7 @@ bool ImageToBMP( com::sun::star::uno::Sequencesal_Int8 aPict, { aBmp.realloc( [pOut length] ); [pOut getBytes: aBmp.getArray() length: aBmp.getLength()]; -bResult = (aBmp.getLength() != 0); +bResult = (!aBmp.isEmpty()); } } } @@ -190,7 +190,7 @@ bool BMPToImage( com::sun::star::uno::Sequencesal_Int8 aBmp, { aPict.realloc( [pOut length] ); [pOut getBytes: aPict.getArray() length: aPict.getLength()]; -bResult = (aPict.getLength() != 0); +bResult = (!aPict.isEmpty()); } } } diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 8456d86..3820d81 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -6698,11 +6698,10 @@ PDFStreamIf::~PDFStreamIf() void SAL_CALL PDFStreamIf::writeBytes( const com::sun::star::uno::Sequence sal_Int8 aData ) throw() { -if( m_bWrite ) +if( m_bWrite aData.getLength() ) { sal_Int32 nBytes = aData.getLength(); -if( nBytes 0 ) -m_pWriter-writeBuffer( aData.getConstArray(), nBytes ); +m_pWriter-writeBuffer( aData.getConstArray(), nBytes ); } } diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
[Libreoffice-commits] .: sc/source
sc/source/filter/excel/xestring.cxx | 17 - sc/source/filter/excel/xestyle.cxx |6 -- sc/source/filter/excel/xlformula.cxx | 11 --- sc/source/filter/excel/xlstyle.cxx |5 - sc/source/filter/inc/xestring.hxx|2 -- sc/source/filter/inc/xestyle.hxx |6 -- sc/source/filter/inc/xlformula.hxx |3 --- sc/source/filter/inc/xlstyle.hxx |2 -- 8 files changed, 52 deletions(-) New commits: commit 361b7fc217c69e7a5b457f86f721ad00f2c8c7d0 Author: Petr Vorel petr.vo...@gmail.com Date: Mon Feb 27 18:56:04 2012 +0530 Removed unused code. diff --git a/sc/source/filter/excel/xestring.cxx b/sc/source/filter/excel/xestring.cxx index d12ebe8..2053a68 100644 --- a/sc/source/filter/excel/xestring.cxx +++ b/sc/source/filter/excel/xestring.cxx @@ -184,23 +184,6 @@ void XclExpString::AppendByte( sal_Unicode cChar, rtl_TextEncoding eTextEnc ) // formatting runs -void XclExpString::SetFormats( const XclFormatRunVec rFormats ) -{ -maFormats = rFormats; -#if OSL_DEBUG_LEVEL 0 -if( IsRich() ) -{ -XclFormatRunVec::const_iterator aCurr = maFormats.begin(); -XclFormatRunVec::const_iterator aPrev = aCurr; -XclFormatRunVec::const_iterator aEnd = maFormats.end(); -for( ++aCurr; aCurr != aEnd; ++aCurr, ++aPrev ) -OSL_ENSURE( aPrev-mnChar aCurr-mnChar, XclExpString::SetFormats - invalid char order ); -OSL_ENSURE( aPrev-mnChar = mnLen, XclExpString::SetFormats - invalid char index ); -} -#endif -LimitFormatCount( mbIsBiff8 ? EXC_STR_MAXLEN : EXC_STR_MAXLEN_8BIT ); -} - void XclExpString::AppendFormat( sal_uInt16 nChar, sal_uInt16 nFontIdx, bool bDropDuplicate ) { OSL_ENSURE( maFormats.empty() || (maFormats.back().mnChar nChar), XclExpString::AppendFormat - invalid char index ); diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx index 1d7f190..ae51486 100644 --- a/sc/source/filter/excel/xestyle.cxx +++ b/sc/source/filter/excel/xestyle.cxx @@ -1124,12 +1124,6 @@ sal_uInt16 XclExpFontBuffer::Insert( const SfxItemSet rItemSet, return Insert( aFont, eColorType, bAppFont ); } -sal_uInt16 XclExpFontBuffer::Insert( const ScPatternAttr rPattern, -sal_Int16 nScript, XclExpColorType eColorType, bool bAppFont ) -{ -return Insert( rPattern.GetItemSet(), nScript, eColorType, bAppFont ); -} - void XclExpFontBuffer::Save( XclExpStream rStrm ) { maFontList.Save( rStrm ); diff --git a/sc/source/filter/excel/xlformula.cxx b/sc/source/filter/excel/xlformula.cxx index 02154ba..8685041 100644 --- a/sc/source/filter/excel/xlformula.cxx +++ b/sc/source/filter/excel/xlformula.cxx @@ -483,12 +483,6 @@ XclTokenArray::XclTokenArray( bool bVolatile ) : { } -XclTokenArray::XclTokenArray( ScfUInt8Vec rTokVec, bool bVolatile ) : -mbVolatile( bVolatile ) -{ -maTokVec.swap( rTokVec ); -} - XclTokenArray::XclTokenArray( ScfUInt8Vec rTokVec, ScfUInt8Vec rExtDataVec, bool bVolatile ) : mbVolatile( bVolatile ) { @@ -598,11 +592,6 @@ XclTokenArrayIterator::XclTokenArrayIterator( const XclTokenArrayIterator rTokA SkipSpaces(); } -void XclTokenArrayIterator::Init() -{ -mppScTokenBeg = mppScTokenEnd = mppScToken = 0; -} - void XclTokenArrayIterator::Init( const ScTokenArray rScTokArr, bool bSkipSpaces ) { sal_uInt16 nTokArrLen = rScTokArr.GetLen(); diff --git a/sc/source/filter/excel/xlstyle.cxx b/sc/source/filter/excel/xlstyle.cxx index db0603d..e8ef58e 100644 --- a/sc/source/filter/excel/xlstyle.cxx +++ b/sc/source/filter/excel/xlstyle.cxx @@ -1751,11 +1751,6 @@ void XclXFBase::SetAllUsedFlags( bool bUsed ) mbProtUsed = mbFontUsed = mbFmtUsed = mbAlignUsed = mbBorderUsed = mbAreaUsed = bUsed; } -bool XclXFBase::HasUsedFlags() const -{ -return mbProtUsed || mbFontUsed || mbFmtUsed || mbAlignUsed || mbBorderUsed || mbAreaUsed; -} - bool XclXFBase::Equals( const XclXFBase rCmp ) const { return diff --git a/sc/source/filter/inc/xestring.hxx b/sc/source/filter/inc/xestring.hxx index abc6f33..42ab5db 100644 --- a/sc/source/filter/inc/xestring.hxx +++ b/sc/source/filter/inc/xestring.hxx @@ -131,8 +131,6 @@ public: // formatting runs -/** Sets new formatting runs for the current text. */ -voidSetFormats( const XclFormatRunVec rFormats ); /** Appends a formatting run. nChar must be greater than last contained character index. */ voidAppendFormat( sal_uInt16 nChar, sal_uInt16 nFontIdx, bool bDropDuplicate = true ); /** Appends a trailing formatting run with the passed font index. */ diff --git a/sc/source/filter/inc/xestyle.hxx b/sc/source/filter/inc/xestyle.hxx index 8f38b6f..c1263b3 100644 --- a/sc/source/filter/inc/xestyle.hxx +++ b/sc/source/filter/inc/xestyle.hxx @@ -247,12 +247,6 @@ public:
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - oox/source
oox/source/drawingml/diagram/diagramlayoutatoms.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 0b6fd58c1910b98a11e2f2ee4818d4b239f5d56c Author: Thorsten Behrens tbehr...@suse.com Date: Thu Feb 16 10:35:12 2012 +0100 Fix crash in smartart import Rather check iterator validity *before* accessing it. valgrind warning on linux, and crash on windows for e.g. doc at n#736495. Signed-off-by: Muthu Subramanian sumu...@suse.com diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx index 16b9420..c5f8774 100644 --- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx +++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx @@ -394,8 +394,8 @@ bool LayoutNode::setupShape( const ShapePtr rShape, const Diagram rDgm, sal_uI { // find the data node to grab text from DiagramData::PointsNameMap::const_iterator aDataNode=rDgm.getData()-getPointsPresNameMap().find(msName); -if( aDataNode-second.size() nIdx -aDataNode != rDgm.getData()-getPointsPresNameMap().end() ) +if( aDataNode != rDgm.getData()-getPointsPresNameMap().end() +aDataNode-second.size() nIdx ) { OSL_TRACE( Filling content from %d th layout node named \%s\, modelId \%s\, nIdx, ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: oox/source
oox/source/ppt/pptshapegroupcontext.cxx | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) New commits: commit 5c714632583036f72377aa0fa6ed1137e53582dc Author: Muthu Subramanian sumu...@suse.com Date: Thu Feb 16 20:59:57 2012 +0530 n744503: Importing useBgFill colors for shapes. diff --git a/oox/source/ppt/pptshapegroupcontext.cxx b/oox/source/ppt/pptshapegroupcontext.cxx index cf982cf..0529ec6 100644 --- a/oox/source/ppt/pptshapegroupcontext.cxx +++ b/oox/source/ppt/pptshapegroupcontext.cxx @@ -41,6 +41,7 @@ #include oox/drawingml/customshapegeometry.hxx #include oox/drawingml/textbodycontext.hxx #include oox/drawingml/connectorshapecontext.hxx +#include oox/drawingml/fillproperties.hxx #include extdrawingfragmenthandler.hxx using rtl::OUString; @@ -108,7 +109,19 @@ Reference XFastContextHandler PPTShapeGroupContext::createFastChildContext( s xRet.set( new PPTShapeGroupContext( *this, mpSlidePersistPtr, meShapeLocation, mpGroupShapePtr, oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, com.sun.star.drawing.GroupShape ) ) ) ); break; case PPT_TOKEN( sp ): // Shape -xRet.set( new PPTShapeContext( *this, mpSlidePersistPtr, mpGroupShapePtr, oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, com.sun.star.drawing.CustomShape ) ) ) ); +{ +AttributeList aAttribs( xAttribs ); +oox::drawingml::ShapePtr pShape = oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, com.sun.star.drawing.CustomShape ) ); +if( aAttribs.getBool( XML_useBgFill, false ) ) +{ +::oox::drawingml::FillProperties aFill = pShape-getFillProperties(); +aFill.moFillType = XML_solidFill; +// This is supposed to fill with slide (background) color, but +// TODO: We are using white here, because thats the closest we can assume (?) +aFill.maFillColor.setSrgbClr( API_RGB_WHITE ); +} +xRet.set( new PPTShapeContext( *this, mpSlidePersistPtr, mpGroupShapePtr, pShape ) ); +} break; case PPT_TOKEN( pic ): // CT_Picture xRet.set( new PPTGraphicShapeContext( *this, mpSlidePersistPtr, mpGroupShapePtr, oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, com.sun.star.drawing.GraphicObjectShape ) ) ) ); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: 2 commits - oox/source
oox/source/drawingml/textbodyproperties.cxx|4 oox/source/drawingml/textbodypropertiescontext.cxx |3 +++ oox/source/ppt/pptshape.cxx| 17 +++-- oox/source/ppt/slidepersist.cxx|2 +- 4 files changed, 19 insertions(+), 7 deletions(-) New commits: commit b93463bcfe79a80773c622bc27ccffc54d3eb71e Author: Muthu Subramanian sumu...@suse.com Date: Fri Feb 10 14:52:05 2012 +0530 n744512: Fixed formatting of tables. otherStyle needs to be used to format tables. removed wrong defaultStyling. added using masterslide style info correctly. diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx index 17ceb30..0bd2ce4 100644 --- a/oox/source/ppt/pptshape.cxx +++ b/oox/source/ppt/pptshape.cxx @@ -308,9 +308,22 @@ void PPTShape::addShape( if ( !sServiceName.isEmpty() ) { -// use style from master slide for placeholders only, otherwise use slide's style, which might be the default style from presentation if ( !aMasterTextListStyle.get() ) -aMasterTextListStyle = ( mnSubType rSlidePersist.getMasterPersist().get() ) ? rSlidePersist.getMasterPersist()-getOtherTextStyle() : rSlidePersist.getOtherTextStyle(); +{ +bool isOther = !getTextBody().get(); +TextListStylePtr aSlideStyle = isOther ? rSlidePersist.getOtherTextStyle() : rSlidePersist.getDefaultTextStyle(); +// Combine from MasterSlide details as well. +if( rSlidePersist.getMasterPersist().get() ) +{ +aMasterTextListStyle = isOther ? rSlidePersist.getMasterPersist()-getOtherTextStyle() : rSlidePersist.getMasterPersist()-getDefaultTextStyle(); +if( aSlideStyle.get() ) +aMasterTextListStyle-apply( *aSlideStyle.get() ); +} +else +{ +aMasterTextListStyle = aSlideStyle; +} +} if( aMasterTextListStyle.get() getTextBody().get() ) { TextListStylePtr aCombinedTextListStyle (new TextListStyle()); diff --git a/oox/source/ppt/slidepersist.cxx b/oox/source/ppt/slidepersist.cxx index 91f7734..77432ae 100644 --- a/oox/source/ppt/slidepersist.cxx +++ b/oox/source/ppt/slidepersist.cxx @@ -71,8 +71,8 @@ SlidePersist::SlidePersist( XmlFilterBase rFilter, sal_Bool bMaster, sal_Bool b maTitleTextStylePtr-apply( *pDefaultTextStyle.get() ); maBodyTextStylePtr-apply( *pDefaultTextStyle.get() ); maNotesTextStylePtr-apply( *pDefaultTextStyle.get() ); -*/ maOtherTextStylePtr-apply( *pDefaultTextStyle.get() ); +*/ } #if OSL_DEBUG_LEVEL 0 mxDebugPage = mxPage; commit 1ae7ac2a031b037174f03f170af013e0d4736424 Author: Muthu Subramanian sumu...@suse.com Date: Fri Feb 10 14:44:40 2012 +0530 Code review fixes. diff --git a/oox/source/drawingml/textbodyproperties.cxx b/oox/source/drawingml/textbodyproperties.cxx index 7a74610..43acd8c 100644 --- a/oox/source/drawingml/textbodyproperties.cxx +++ b/oox/source/drawingml/textbodyproperties.cxx @@ -42,10 +42,6 @@ TextBodyProperties::TextBodyProperties() void TextBodyProperties::pushToPropMap( PropertyMap rPropMap ) const { rPropMap.insert( maPropertyMap.begin(), maPropertyMap.end() ); - -// #160799# fake different vertical text modes by top-bottom writing mode -if( moVert.get( XML_horz ) != XML_horz ) -rPropMap[ PROP_TextWritingMode ] = ::com::sun::star::text::WritingMode_TB_RL; } // diff --git a/oox/source/drawingml/textbodypropertiescontext.cxx b/oox/source/drawingml/textbodypropertiescontext.cxx index ea84306..f281c56 100644 --- a/oox/source/drawingml/textbodypropertiescontext.cxx +++ b/oox/source/drawingml/textbodypropertiescontext.cxx @@ -119,6 +119,7 @@ TextBodyPropertiesContext::TextBodyPropertiesContext( ContextHandler rParent, bool bRtl = aAttribs.getBool( XML_rtl, false ); sal_Int32 tVert = mrTextBodyProp.moVert.get( XML_horz ); if( tVert == XML_vert || tVert == XML_eaVert || tVert == XML_vert270 || tVert == XML_mongolianVert ) { +// #160799# fake different vertical text modes by top-bottom writing mode mrTextBodyProp.maPropertyMap[ PROP_TextWritingMode ] = WritingMode_TB_RL; // workaround for TB_LR as using WritingMode2 doesn't work @@ -154,6 +155,8 @@ TextBodyPropertiesContext::TextBodyPropertiesContext( ContextHandler rParent, } else if( mrTextBodyProp.moVert.get( XML_horz ) == XML_horz ) mrTextBodyProp.maPropertyMap[ PROP_TextVerticalAdjust ] = eVA; +else if( eVA == drawing::TextVerticalAdjust_CENTER
[Libreoffice-commits] .: oox/source
oox/source/drawingml/textparagraphpropertiescontext.cxx |7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) New commits: commit a71c878cd0b443a0d8473d8e4eb43d66f37ce2c0 Author: Muthu Subramanian sumu...@suse.com Date: Fri Feb 3 16:20:34 2012 +0530 n#744509: Alignment of text is wrong. According to section 21.1.2.2.7 [pPr], If this [algn] attribute is omitted, then a value of left is implied. diff --git a/oox/source/drawingml/textparagraphpropertiescontext.cxx b/oox/source/drawingml/textparagraphpropertiescontext.cxx index 9d06ae1..d3c91cd 100644 --- a/oox/source/drawingml/textparagraphpropertiescontext.cxx +++ b/oox/source/drawingml/textparagraphpropertiescontext.cxx @@ -64,12 +64,7 @@ TextParagraphPropertiesContext::TextParagraphPropertiesContext( ContextHandler PropertyMap rPropertyMap( mrTextParagraphProperties.getTextParagraphPropertyMap() ); // ST_TextAlignType -if ( xAttribs-hasAttribute( XML_algn ) ) -{ -sal_Int32 nAlign = xAttribs-getOptionalValueToken( XML_algn, XML_l ); -rPropertyMap[ PROP_ParaAdjust ] = GetParaAdjust( nAlign ); -} -// OSL_TRACE( OOX: para adjust %d, GetParaAdjust( nAlign )); +rPropertyMap[ PROP_ParaAdjust ] = GetParaAdjust( xAttribs-getOptionalValueToken( XML_algn, XML_l ) ); // TODO see to do the same with RubyAdjust // ST_Coordinate32 ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sd/source
sd/source/ui/unoidl/unopage.cxx | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) New commits: commit fd33c0b1cf23020b27db25895eeb380653d734b6 Author: Muthu Subramanian sumu...@suse.com Date: Wed Feb 1 18:01:17 2012 +0530 n#735533: Donot set duplicate master slide names. diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index 4867338..a13a4fa 100644 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -3015,7 +3015,7 @@ void SdMasterPage::getBackground( Any rValue ) throw() } // XNamed -void SAL_CALL SdMasterPage::setName( const OUString aName ) +void SAL_CALL SdMasterPage::setName( const OUString rName ) throw(uno::RuntimeException) { ::SolarMutexGuard aGuard; @@ -3024,11 +3024,18 @@ void SAL_CALL SdMasterPage::setName( const OUString aName ) if(SvxFmDrawPage::mpPage GetPage()-GetPageKind() != PK_NOTES) { -String aNewName( aName ); +SdDrawDocument* pDoc = GetModel()-GetDoc(); +sal_Bool bOutDummy; +String aNewName( rName ); + +// Slide Name has to be unique +if( pDoc pDoc-GetPageByName( aNewName, bOutDummy ) != SDRPAGE_NOTFOUND ) +return; // throw Exception ? + GetPage()-SetName( aNewName ); -if(GetModel()-GetDoc()) - GetModel()-GetDoc()-RenameLayoutTemplate(GetPage()-GetLayoutName(), aNewName); +if( pDoc ) +pDoc-RenameLayoutTemplate( GetPage()-GetLayoutName(), aNewName ); // fake a mode change to repaint the page tab bar ::sd::DrawDocShell* pDocSh = GetModel()-GetDocShell(); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: 2 commits - sc/source svx/inc svx/source
sc/source/ui/app/scdll.cxx |2 sc/source/ui/inc/tabvwsh.hxx |4 + sc/source/ui/view/formatsh.cxx |9 +- sc/source/ui/view/tabvwsh4.cxx |1 svx/inc/svx/tbcontrl.hxx | 132 --- svx/source/tbxctrls/tbcontrl.cxx | 60 ++--- 6 files changed, 116 insertions(+), 92 deletions(-) New commits: commit 4daa3f54437730fe4e509082faa0d3509c62cea0 Author: Winfried Donkers w.donk...@dci-electronics.nl Date: Wed Feb 1 13:17:26 2012 +0530 fdo#34425: [Feature] Persist bgcolor toolbar button. This is to avoid background color selection evertime. diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx index 0a57bf6..4675a2e 100644 --- a/sc/source/ui/app/scdll.cxx +++ b/sc/source/ui/app/scdll.cxx @@ -204,7 +204,7 @@ void ScDLL::Init() SvxFontNameToolBoxControl ::RegisterControl(SID_ATTR_CHAR_FONT, pMod); // SvxFontHeightToolBoxControl ::RegisterControl(SID_ATTR_CHAR_FONTHEIGHT, pMod); SvxFontColorToolBoxControl ::RegisterControl(SID_ATTR_CHAR_COLOR, pMod); -SvxColorToolBoxControl ::RegisterControl(SID_BACKGROUND_COLOR, pMod); +SvxFontColorExtToolBoxControl ::RegisterControl(SID_BACKGROUND_COLOR, pMod); SvxFrameToolBoxControl ::RegisterControl(SID_ATTR_BORDER, pMod); SvxFrameLineStyleToolBoxControl ::RegisterControl(SID_FRAME_LINESTYLE, pMod); SvxFrameLineColorToolBoxControl ::RegisterControl(SID_FRAME_LINECOLOR, pMod); diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx index 05e6838..1bd0fb1 100644 --- a/sc/source/ui/inc/tabvwsh.hxx +++ b/sc/source/ui/inc/tabvwsh.hxx @@ -108,6 +108,7 @@ private: static sal_uInt16 nInsertCtrlState; static sal_uInt16 nInsCellsCtrlState; static sal_uInt16 nInsObjCtrlState; +static ColoraBackgroundColor; SvxHtmlOptions aHTMLOpt; ObjectSelectionType eCurOST; @@ -423,6 +424,9 @@ public: boolExecuteRetypePassDlg(ScPasswordHash eDesiredHash); +voidSetBackgroundColor( const Color aCol ) { aBackgroundColor = aCol; } +Color GetBackgroundColor(){ return aBackgroundColor; } + using ScTabView::ShowCursor; // ugly hack to call Define Names from Manage Names diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx index 1718741..bbb44ae 100644 --- a/sc/source/ui/view/formatsh.cxx +++ b/sc/source/ui/view/formatsh.cxx @@ -1452,13 +1452,12 @@ void ScFormatShell::ExecuteAttr( SfxRequest rReq ) case SID_BACKGROUND_COLOR: { -// SID_BACKGROUND_COLOR without arguments - set transparent background - +// SID_BACKGROUND_COLOR without arguments - set background to last used color SvxBrushItemaBrushItem( (const SvxBrushItem) pTabViewShell-GetSelectionPattern()- GetItem( ATTR_BACKGROUND ) ); -aBrushItem.SetColor( COL_TRANSPARENT ); +aBrushItem.SetColor( pTabViewShell-GetBackgroundColor() ); pTabViewShell-ApplyAttr( aBrushItem ); } @@ -1643,7 +1642,9 @@ void ScFormatShell::ExecuteAttr( SfxRequest rReq ) pTabViewShell-GetSelectionPattern()- GetItem( ATTR_BACKGROUND ) ); -aBrushItem.SetColor( rNewColorItem.GetValue() ); +Color aSet = rNewColorItem.GetValue(); +pTabViewShell-SetBackgroundColor( aSet ); +aBrushItem.SetColor( aSet ); pTabViewShell-ApplyAttr( aBrushItem ); } diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx index f8e2ab8..5ad0d03 100644 --- a/sc/source/ui/view/tabvwsh4.cxx +++ b/sc/source/ui/view/tabvwsh4.cxx @@ -109,6 +109,7 @@ using namespace com::sun::star; sal_uInt16 ScTabViewShell::nInsertCtrlState = SID_INSERT_GRAPHIC; sal_uInt16 ScTabViewShell::nInsCellsCtrlState = 0; sal_uInt16 ScTabViewShell::nInsObjCtrlState = SID_INSERT_DIAGRAM; +Color ScTabViewShell::aBackgroundColor = COL_TRANSPARENT; // --- diff --git a/svx/inc/svx/tbcontrl.hxx b/svx/inc/svx/tbcontrl.hxx index cdbd93b..32f218d 100644 --- a/svx/inc/svx/tbcontrl.hxx +++ b/svx/inc/svx/tbcontrl.hxx @@ -104,7 +104,7 @@ Note: Analysis of BrushItem: Brush-FillColor() is misused as switch, to distinguish whether a new style - or a new color has been set +or a new color has been set GetFillColor() ==
[Libreoffice-commits] .: oox/source
oox/source/drawingml/diagram/diagram.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit af15127871d38a862ce300ceda5cc74624fda8df Author: Muthu Subramanian sumu...@suse.com Date: Wed Feb 1 13:32:56 2012 +0530 Fixes crashing while loading manipulated pptx files. diff --git a/oox/source/drawingml/diagram/diagram.cxx b/oox/source/drawingml/diagram/diagram.cxx index 91a475f..9194001 100644 --- a/oox/source/drawingml/diagram/diagram.cxx +++ b/oox/source/drawingml/diagram/diagram.cxx @@ -340,7 +340,8 @@ void Diagram::addTo( const ShapePtr pParentShape ) // create Shape hierarchy ShapeCreationVisitor aCreationVisitor(pParentShape, *this); -mpLayout-getNode()-accept(aCreationVisitor); +if( mpLayout-getNode() ) +mpLayout-getNode()-accept( aCreationVisitor ); } OUString Diagram::getLayoutId() const ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: basegfx/inc basegfx/source unusedcode.easy
basegfx/inc/basegfx/polygon/b2dpolygonclipper.hxx |7 - basegfx/inc/basegfx/polygon/b2dpolygoncutandtouch.hxx | 10 - basegfx/inc/basegfx/polygon/b3dpolygonclipper.hxx | 14 -- basegfx/source/polygon/b2dpolygonclipper.cxx | 66 -- basegfx/source/polygon/b2dpolygoncutandtouch.cxx | 112 -- basegfx/source/polygon/b3dpolygonclipper.cxx | 102 unusedcode.easy | 10 - 7 files changed, 321 deletions(-) New commits: commit 92a87649a79de6013703d2344365ef86fc9788bd Author: Alexander Bergmann myadd...@gmx.de Date: Wed Jan 25 12:01:28 2012 +0530 Removing unused code (basegfx). diff --git a/basegfx/inc/basegfx/polygon/b2dpolygonclipper.hxx b/basegfx/inc/basegfx/polygon/b2dpolygonclipper.hxx index 172996a..2556b34 100644 --- a/basegfx/inc/basegfx/polygon/b2dpolygonclipper.hxx +++ b/basegfx/inc/basegfx/polygon/b2dpolygonclipper.hxx @@ -57,13 +57,6 @@ namespace basegfx BASEGFX_DLLPUBLIC B2DPolyPolygon clipPolyPolygonOnRange(const B2DPolyPolygon rCandidate, const B2DRange rRange, bool bInside, bool bStroke); BASEGFX_DLLPUBLIC B2DPolyPolygon clipPolygonOnRange(const B2DPolygon rCandidate, const B2DRange rRange, bool bInside, bool bStroke); -// Clip given PolyPolygon against the endless edge (ray) defined by the given two points. bAbove defines on which side -// of the edge the result will be together with the definition of the edge. If the edge is seen as a vector -// from A to B and bAbove is true, the result will contain the geometry left of the vector. -// The switch bStroke decides if the polygon is interpreted as area (false) or strokes (true). -BASEGFX_DLLPUBLIC B2DPolyPolygon clipPolyPolygonOnEdge(const B2DPolyPolygon rCandidate, const B2DPoint rPointA, const B2DPoint rPointB, bool bAbove, bool bStroke); -BASEGFX_DLLPUBLIC B2DPolyPolygon clipPolygonOnEdge(const B2DPolygon rCandidate, const B2DPoint rPointA, const B2DPoint rPointB, bool bAbove, bool bStroke); - // Clip given PolyPolygon against given clipping polygon. // The switch bStroke decides if the polygon is interpreted as area (false) or strokes (true). // With stroke polygons, You get all line snippets inside rCip. diff --git a/basegfx/inc/basegfx/polygon/b2dpolygoncutandtouch.hxx b/basegfx/inc/basegfx/polygon/b2dpolygoncutandtouch.hxx index 0c6296d..8997c54 100644 --- a/basegfx/inc/basegfx/polygon/b2dpolygoncutandtouch.hxx +++ b/basegfx/inc/basegfx/polygon/b2dpolygoncutandtouch.hxx @@ -53,28 +53,18 @@ namespace basegfx // not change or add points to rMask. BASEGFX_DLLPUBLIC B2DPolygon addPointsAtCutsAndTouches(const B2DPolyPolygon rMask, const B2DPolygon rCandidate); -// look for intersections of rCandidate with all polygons from rMask and add extra points there. Do -// not change or add points to rMask. -BASEGFX_DLLPUBLIC B2DPolyPolygon addPointsAtCutsAndTouches(const B2DPolyPolygon rMask, const B2DPolyPolygon rCandidate); - // look for intersections of rCandidate with the edge from rStart to rEnd and add extra points there. // Points are only added in the range of the edge, not on the endless vector. BASEGFX_DLLPUBLIC B2DPolygon addPointsAtCuts(const B2DPolygon rCandidate, const B2DPoint rStart, const B2DPoint rEnd); -BASEGFX_DLLPUBLIC B2DPolyPolygon addPointsAtCuts(const B2DPolyPolygon rCandidate, const B2DPoint rStart, const B2DPoint rEnd); // look for intersections of rCandidate with the mask Polygon and add extra points there. // The mask polygon is assumed to be closed, even when it's not explicitly. BASEGFX_DLLPUBLIC B2DPolygon addPointsAtCuts(const B2DPolygon rCandidate, const B2DPolyPolygon rMask); -BASEGFX_DLLPUBLIC B2DPolyPolygon addPointsAtCuts(const B2DPolyPolygon rCandidate, const B2DPolyPolygon rMask); // look for self-intersections in given polygon and add extra points there. Result will have no // intersections on an edge BASEGFX_DLLPUBLIC B2DPolygon addPointsAtCuts(const B2DPolygon rCandidate); -// add points at all self-intersections of single polygons (depends on bSelfIntersections) -// and at polygon-polygon intersections -BASEGFX_DLLPUBLIC B2DPolyPolygon addPointsAtCuts(const B2DPolyPolygon rCandidate, bool bSelfIntersections = true); - } // end of namespace tools } // end of namespace basegfx diff --git a/basegfx/inc/basegfx/polygon/b3dpolygonclipper.hxx b/basegfx/inc/basegfx/polygon/b3dpolygonclipper.hxx index 0c66967..f34effe 100644 --- a/basegfx/inc/basegfx/polygon/b3dpolygonclipper.hxx +++ b/basegfx/inc/basegfx/polygon/b3dpolygonclipper.hxx @@ -62,26 +62,12 @@ namespace basegfx // version for Polygons BASEGFX_DLLPUBLIC B3DPolyPolygon clipPolygonOnOrthogonalPlane(const B3DPolygon
[Libreoffice-commits] .: vcl/inc vcl/source
vcl/inc/vcl/outdev.hxx |1 + vcl/source/gdi/outdev.cxx | 32 vcl/source/gdi/outdev2.cxx | 35 +-- 3 files changed, 22 insertions(+), 46 deletions(-) New commits: commit f9c09fbbb32f3808e2ef2eaa7148e10a130ccd20 Author: Christina Rossmanith chrrossman...@web.de Date: Wed Jan 25 13:23:49 2012 +0530 Reduced duplicate code detected by simian. diff --git a/vcl/inc/vcl/outdev.hxx b/vcl/inc/vcl/outdev.hxx index 9ce143d..f14943b 100644 --- a/vcl/inc/vcl/outdev.hxx +++ b/vcl/inc/vcl/outdev.hxx @@ -547,6 +547,7 @@ public: // tells whether this output device is RTL in an LTR UI or LTR in a RTL UI SAL_DLLPRIVATE bool ImplIsAntiparallel() const ; +SAL_DLLPRIVATE Color ImplDrawModeToColor( const Color rColor ); // #i101491# // Helper which holds the old line geometry creation and is extended to use AA when diff --git a/vcl/source/gdi/outdev.cxx b/vcl/source/gdi/outdev.cxx index fe49527..76b09d0 100644 --- a/vcl/source/gdi/outdev.cxx +++ b/vcl/source/gdi/outdev.cxx @@ -1238,38 +1238,36 @@ void OutputDevice::SetLineColor() // --- -void OutputDevice::SetLineColor( const Color rColor ) +Color OutputDevice::ImplDrawModeToColor( const Color rColor ) { -OSL_TRACE( OutputDevice::SetLineColor( %lx ), rColor.GetColor() ); -DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice ); - Color aColor( rColor ); +sal_uLong nDrawMode = GetDrawMode(); -if( mnDrawMode ( DRAWMODE_BLACKLINE | DRAWMODE_WHITELINE | - DRAWMODE_GRAYLINE | DRAWMODE_GHOSTEDLINE | - DRAWMODE_SETTINGSLINE ) ) +if( nDrawMode ( DRAWMODE_BLACKLINE | DRAWMODE_WHITELINE | + DRAWMODE_GRAYLINE | DRAWMODE_GHOSTEDLINE | + DRAWMODE_SETTINGSLINE ) ) { if( !ImplIsColorTransparent( aColor ) ) { -if( mnDrawMode DRAWMODE_BLACKLINE ) +if( nDrawMode DRAWMODE_BLACKLINE ) { aColor = Color( COL_BLACK ); } -else if( mnDrawMode DRAWMODE_WHITELINE ) +else if( nDrawMode DRAWMODE_WHITELINE ) { aColor = Color( COL_WHITE ); } -else if( mnDrawMode DRAWMODE_GRAYLINE ) +else if( nDrawMode DRAWMODE_GRAYLINE ) { const sal_uInt8 cLum = aColor.GetLuminance(); aColor = Color( cLum, cLum, cLum ); } -else if( mnDrawMode DRAWMODE_SETTINGSLINE ) +else if( nDrawMode DRAWMODE_SETTINGSLINE ) { aColor = GetSettings().GetStyleSettings().GetFontColor(); } -if( mnDrawMode DRAWMODE_GHOSTEDLINE ) +if( nDrawMode DRAWMODE_GHOSTEDLINE ) { aColor = Color( ( aColor.GetRed() 1 ) | 0x80, ( aColor.GetGreen() 1 ) | 0x80, @@ -1277,6 +1275,16 @@ void OutputDevice::SetLineColor( const Color rColor ) } } } +return aColor; +} + + +void OutputDevice::SetLineColor( const Color rColor ) +{ +OSL_TRACE( OutputDevice::SetLineColor( %lx ), rColor.GetColor() ); +DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice ); + +Color aColor = ImplDrawModeToColor( rColor ); if( mpMetaFile ) mpMetaFile-AddAction( new MetaLineColorAction( aColor, sal_True ) ); diff --git a/vcl/source/gdi/outdev2.cxx b/vcl/source/gdi/outdev2.cxx index 2003de8..9b0b4f3 100644 --- a/vcl/source/gdi/outdev2.cxx +++ b/vcl/source/gdi/outdev2.cxx @@ -1441,40 +1441,7 @@ void OutputDevice::DrawPixel( const Point rPt, const Color rColor ) OSL_TRACE( OutputDevice::DrawPixel() ); DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice ); -Color aColor( rColor ); - -if( mnDrawMode ( DRAWMODE_BLACKLINE | DRAWMODE_WHITELINE | - DRAWMODE_GRAYLINE | DRAWMODE_GHOSTEDLINE | - DRAWMODE_SETTINGSLINE ) ) -{ -if( !ImplIsColorTransparent( aColor ) ) -{ -if( mnDrawMode DRAWMODE_BLACKLINE ) -{ -aColor = Color( COL_BLACK ); -} -else if( mnDrawMode DRAWMODE_WHITELINE ) -{ -aColor = Color( COL_WHITE ); -} -else if( mnDrawMode DRAWMODE_GRAYLINE ) -{ -const sal_uInt8 cLum = aColor.GetLuminance(); -aColor = Color( cLum, cLum, cLum ); -} -else if( mnDrawMode DRAWMODE_SETTINGSLINE ) -{ -aColor = GetSettings().GetStyleSettings().GetFontColor(); -} - -if( mnDrawMode DRAWMODE_GHOSTEDLINE ) -{ -aColor = Color( ( aColor.GetRed() 1 ) | 0x80, -( aColor.GetGreen() 1 ) |
[Libreoffice-commits] .: svtools/inc svtools/source unusedcode.easy
svtools/inc/svtools/ctrlbox.hxx| 33 - svtools/source/control/ctrlbox.cxx | 24 unusedcode.easy|3 --- 3 files changed, 60 deletions(-) New commits: commit 458c80234b701fb1cb9a71239cec532c54b2e9f0 Author: Mariusz Dykierek mariuszdykie...@gmail.com Date: Mon Jan 23 13:53:54 2012 +0530 Removed Get*EntryLine? and Get*EntryDistance methods. diff --git a/svtools/inc/svtools/ctrlbox.hxx b/svtools/inc/svtools/ctrlbox.hxx index 5815719..a4d9eff 100644 --- a/svtools/inc/svtools/ctrlbox.hxx +++ b/svtools/inc/svtools/ctrlbox.hxx @@ -352,16 +352,10 @@ public: using ListBox::GetEntryPos; virtual sal_uInt16 GetEntryPos( sal_uInt16 nStyle = STYLE_SOLID ) const; -longGetEntryLine1( sal_uInt16 nPos ) const; -longGetEntryLine2( sal_uInt16 nPos ) const; -longGetEntryDistance( sal_uInt16 nPos ) const; sal_uInt16 GetEntryStyle( sal_uInt16 nPos ) const; voidSelectEntry( const XubString rStr, sal_Bool bSelect = sal_True ) { ListBox::SelectEntry( rStr, bSelect ); } voidSelectEntry( sal_uInt16 nStyle = STYLE_SOLID, sal_Bool bSelect = sal_True ); -longGetSelectEntryLine1( sal_uInt16 nSelIndex = 0 ) const; -longGetSelectEntryLine2( sal_uInt16 nSelIndex = 0 ) const; -longGetSelectEntryDistance( sal_uInt16 nSelIndex = 0 ) const; sal_uInt16 GetSelectEntryStyle( sal_uInt16 nSelIndex = 0 ) const; inline sal_Bool IsEntrySelected( const XubString rStr ) const { return ListBox::IsEntrySelected( rStr ); } sal_BoolIsEntrySelected( sal_uInt16 nStyle1 = STYLE_SOLID ) const; @@ -389,33 +383,6 @@ private: void* GetEntryData( sal_uInt16 nPos ) const; }; -inline long LineListBox::GetSelectEntryLine1( sal_uInt16 nSelIndex ) const -{ -sal_uInt16 nPos = GetSelectEntryPos( nSelIndex ); -if ( nPos != LISTBOX_ENTRY_NOTFOUND ) -return GetEntryLine1( nPos ); -else -return 0; -} - -inline long LineListBox::GetSelectEntryLine2( sal_uInt16 nSelIndex ) const -{ -sal_uInt16 nPos = GetSelectEntryPos( nSelIndex ); -if ( nPos != LISTBOX_ENTRY_NOTFOUND ) -return GetEntryLine2( nPos ); -else -return 0; -} - -inline long LineListBox::GetSelectEntryDistance( sal_uInt16 nSelIndex ) const -{ -sal_uInt16 nPos = GetSelectEntryPos( nSelIndex ); -if ( nPos != LISTBOX_ENTRY_NOTFOUND ) -return GetEntryDistance( nPos ); -else -return 0; -} - inline sal_Bool LineListBox::IsEntrySelected( sal_uInt16 nStyle ) const { sal_uInt16 nPos = GetEntryPos( nStyle ); diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index d4959ec..ce72cdc 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -851,30 +851,6 @@ sal_uInt16 LineListBox::GetEntryPos( sal_uInt16 nStyle ) const // --- -long LineListBox::GetEntryLine1( sal_uInt16 nPos ) const -{ -ImpLineListData* pData = (nPos pLineList-size()) ? (*pLineList)[ nPos ] : NULL; -return ( pData ) ? pData-GetLine1ForWidth( m_nWidth ) : 0; -} - -// --- - -long LineListBox::GetEntryLine2( sal_uInt16 nPos ) const -{ -ImpLineListData* pData = (nPos pLineList-size()) ? (*pLineList)[ nPos ] : NULL; -return ( pData ) ? pData-GetLine2ForWidth( m_nWidth ) : 0; -} - -// --- - -long LineListBox::GetEntryDistance( sal_uInt16 nPos ) const -{ -ImpLineListData* pData = (nPos pLineList-size()) ? (*pLineList)[ nPos ] : NULL; -return ( pData ) ? pData-GetDistForWidth( m_nWidth ) : 0; -} - -// --- - sal_uInt16 LineListBox::GetEntryStyle( sal_uInt16 nPos ) const { ImpLineListData* pData = (nPos pLineList-size()) ? (*pLineList)[ nPos ] : NULL; diff --git a/unusedcode.easy b/unusedcode.easy index 9d44e00..caa31b1 100644 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -112,9 +112,6 @@ InsCapOptArr::Remove(InsCaptionOpt* const, unsigned short) InsCapOptArr::Remove(unsigned short, unsigned short) ItemList::FindAttrib(unsigned short) KeyboardSettings::CopyData() -LineListBox::GetEntryDistance(unsigned short) const -LineListBox::GetEntryLine1(unsigned short) const -LineListBox::GetEntryLine2(unsigned short) const LinkStructArr::DeleteAndDestroy(unsigned short, unsigned short) LngSvcMgr::RemoveLngSvcEvtBroadcaster(com::sun::star::uno::Referencecom::sun::star::linguistic2::XLinguServiceEventBroadcaster const) LocaleDataWrapper::getCollatorImplementations() const ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org
[Libreoffice-commits] .: svl/inc svl/source unusedcode.easy
svl/inc/svl/zforlist.hxx|4 svl/source/numbers/zforlist.cxx |8 unusedcode.easy |1 - 3 files changed, 13 deletions(-) New commits: commit ac7a8bfe4e53d4615929bcafe9cbdd88d03b6e1d Author: Mariusz Dykierek mariuszdykie...@gmail.com Date: Mon Jan 23 13:58:13 2012 +0530 Removed NfCurrencyEntry::ApplyVariableInformation(). diff --git a/svl/inc/svl/zforlist.hxx b/svl/inc/svl/zforlist.hxx index aa68fc1..ac387d4 100644 --- a/svl/inc/svl/zforlist.hxx +++ b/svl/inc/svl/zforlist.hxx @@ -260,10 +260,6 @@ public: /// Symbols and language identical booloperator==( const NfCurrencyEntry r ) const; -/** Apply format information (nPositiveFormat, - nNegativeFormat, nDigits, cZeroChar) of another format. */ -voidApplyVariableInformation( const NfCurrencyEntry ); - const String GetSymbol() const { return aSymbol; } const String GetBankSymbol() const { return aBankSymbol; } LanguageTypeGetLanguage() const { return eLanguage; } diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index eecd743..1f5085d 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -3852,14 +3852,6 @@ bool NfCurrencyEntry::operator==( const NfCurrencyEntry r ) const ; } -void NfCurrencyEntry::ApplyVariableInformation( const NfCurrencyEntry r ) -{ -nPositiveFormat = r.nPositiveFormat; -nNegativeFormat = r.nNegativeFormat; -cZeroChar = r.cZeroChar; -} - - void NfCurrencyEntry::BuildSymbolString( String rStr, bool bBank, bool bWithoutExtension ) const { diff --git a/unusedcode.easy b/unusedcode.easy index caa31b1..e06db0c 100644 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -147,7 +147,6 @@ MultiLineEdit::IsFocusSelectionHideEnabled() const MultiSelection::Append(long) MultiSelection::PrevSelected() NativeNumberWrapper::isValidNatNum(com::sun::star::lang::Locale const, short) const -NfCurrencyEntry::ApplyVariableInformation(NfCurrencyEntry const) NfCurrencyEntry::NfCurrencyEntry() NotificationSettings::CopyData() NumberFormatCodeWrapper::getDefault(short, short) const ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: tools/inc tools/source
tools/inc/tools/fsys.hxx|4 tools/source/fsys/comdep.hxx|2 -- tools/source/fsys/dirent.cxx| 22 -- tools/source/fsys/tdir.cxx |2 -- tools/source/fsys/wntmsc.cxx|2 -- tools/source/stream/strmunx.cxx |8 tools/source/stream/strmwnt.cxx |2 -- 7 files changed, 42 deletions(-) New commits: commit 7735b09b5e10e366ffb3a156790316ea0ccfa0a0 Author: Thomas Collerton tom.col...@gmail.com Date: Mon Jan 23 14:04:47 2012 +0530 fdo#44988: Remove obsolete BOOTSTRAP defines. diff --git a/tools/inc/tools/fsys.hxx b/tools/inc/tools/fsys.hxx index 3d2dfa8..3ec1799 100644 --- a/tools/inc/tools/fsys.hxx +++ b/tools/inc/tools/fsys.hxx @@ -425,9 +425,6 @@ public: DirEntry operator []( size_t nIndex ) const; }; -// we don't need this stuff for bootstraping -#ifndef BOOTSTRAP - // /** FSysRedirector is an abstract base class for a hook to redirect @@ -464,7 +461,6 @@ public: static void DoRedirect( String rPath ); }; -#endif // BOOTSTRP #if defined(DBG_UTIL) void FSysTest(); diff --git a/tools/source/fsys/comdep.hxx b/tools/source/fsys/comdep.hxx index 1728116..193041b 100644 --- a/tools/source/fsys/comdep.hxx +++ b/tools/source/fsys/comdep.hxx @@ -76,10 +76,8 @@ struct DirReader_Impl bReady ( sal_False ), bInUse( sal_False ) { -#ifndef BOOTSTRAP // Redirection FSysRedirector::DoRedirect( aPath ); -#endif // nur den String der Memer-Var nehmen! diff --git a/tools/source/fsys/dirent.cxx b/tools/source/fsys/dirent.cxx index a0d3d8e..38138f8 100644 --- a/tools/source/fsys/dirent.cxx +++ b/tools/source/fsys/dirent.cxx @@ -128,8 +128,6 @@ int Sys2SolarError_Impl( int nSysErr ) // -#ifndef BOOTSTRAP - FSysRedirector* FSysRedirector::_pRedirector = 0; sal_Bool FSysRedirector::_bEnabled = sal_True; #ifdef UNX @@ -184,8 +182,6 @@ void FSysRedirector::DoRedirect( String rPath ) return; } -#endif // BOOTSTRAP - // class DirEntryStack @@ -738,11 +734,9 @@ DirEntry::DirEntry( const String rInitName, FSysPathStyle eStyle ) rtl::OString aTmpName(rtl::OUStringToOString(rInitName, osl_getThreadTextEncoding())); if (comphelper::string::matchIgnoreAsciiCaseL(aTmpName, RTL_CONSTASCII_STRINGPARAM(file:))) { -#ifndef BOOTSTRAP DBG_WARNING( File URLs are not permitted but accepted ); aTmpName = rtl::OUStringToOString(INetURLObject( rInitName ).PathToFileName(), osl_getThreadTextEncoding()); eStyle = FSYS_STYLE_HOST; -#endif // BOOTSTRAP } else { @@ -792,11 +786,9 @@ DirEntry::DirEntry( const rtl::OString rInitName, FSysPathStyle eStyle ) rtl::OString aTmpName( rInitName ); if (comphelper::string::matchIgnoreAsciiCaseL(aTmpName, RTL_CONSTASCII_STRINGPARAM(file:))) { -#ifndef BOOTSTRAP DBG_WARNING( File URLs are not permitted but accepted ); aTmpName = rtl::OUStringToOString(INetURLObject( rInitName ).PathToFileName(), osl_getThreadTextEncoding()); eStyle = FSYS_STYLE_HOST; -#endif } #ifdef DBG_UTIL else @@ -916,10 +908,8 @@ DirEntry* DirEntry::ImpChangeParent( DirEntry* pNewParent, sal_Bool bNormalize ) sal_Bool DirEntry::Exists( FSysAccess nAccess ) const { -#ifndef BOOTSTRAP static osl::Mutex aLocalMutex; osl::MutexGuard aGuard( aLocalMutex ); -#endif if ( !IsValid() ) return sal_False; @@ -968,9 +958,7 @@ sal_Bool DirEntry::First() FSysFailOnErrorImpl(); StringaUniPathName( GetPath().GetFull() ); -#ifndef BOOTSTRAP FSysRedirector::DoRedirect( aUniPathName ); -#endif rtl::OString aPathName(rtl::OUStringToOString(aUniPathName, osl_getThreadTextEncoding())); DIR *pDir = opendir(aPathName.getStr()); @@ -1724,9 +1712,7 @@ DirEntry DirEntry::TempName( DirEntryKind eKind ) const // Redirect String aRetVal(ret_val, osl_getThreadTextEncoding()); String aRedirected (aRetVal); -#ifndef BOOTSTRAP FSysRedirector::DoRedirect( aRedirected ); -#endif if ( FSYS_KIND_DIR == eKind ) { if (0 == _mkdir(rtl::OUStringToOString(aRedirected, osl_getThreadTextEncoding()).getStr())) @@ -1823,9 +1809,7 @@ sal_Bool DirEntry::MakeDir( sal_Bool bSloppy ) const { FSysFailOnErrorImpl(); String aDirName(pNewDir-GetFull()); -#ifndef BOOTSTRAP
[Libreoffice-commits] .: 2 commits - oox/inc oox/source
oox/inc/oox/helper/propertymap.hxx |3 +++ oox/source/drawingml/textparagraph.cxx |2 +- oox/source/drawingml/textparagraphproperties.cxx |2 +- oox/source/helper/propertymap.cxx|6 ++ 4 files changed, 11 insertions(+), 2 deletions(-) New commits: commit 5fb4b78559a44133673a49a028c691fa474aee75 Author: Muthu Subramanian sumu...@suse.com Date: Tue Jan 24 13:03:11 2012 +0530 n719734: Overridding properties from master/layout. When there are conflicting properties in masterslide-layout-slide most recent (i.e. e.g. slide has higher priority than layout) should be used. diff --git a/oox/inc/oox/helper/propertymap.hxx b/oox/inc/oox/helper/propertymap.hxx index bf1e5d5..37b723e 100644 --- a/oox/inc/oox/helper/propertymap.hxx +++ b/oox/inc/oox/helper/propertymap.hxx @@ -86,6 +86,9 @@ public: inline void assignUsed( const PropertyMap rPropMap ) { insert( rPropMap.begin(), rPropMap.end() ); } +/** Inserts all properties contained in the passed property map */ +voidassignAll( const PropertyMap rPropMap ); + /** Returns a sequence of property values, filled with all contained properties. */ ::com::sun::star::uno::Sequence ::com::sun::star::beans::PropertyValue makePropertyValueSequence() const; diff --git a/oox/source/drawingml/textparagraphproperties.cxx b/oox/source/drawingml/textparagraphproperties.cxx index eeb8409..ff6e972 100644 --- a/oox/source/drawingml/textparagraphproperties.cxx +++ b/oox/source/drawingml/textparagraphproperties.cxx @@ -376,7 +376,7 @@ TextParagraphProperties::~TextParagraphProperties() void TextParagraphProperties::apply( const TextParagraphProperties rSourceProps ) { -maTextParagraphPropertyMap.insert( rSourceProps.maTextParagraphPropertyMap.begin(), rSourceProps.maTextParagraphPropertyMap.end() ); +maTextParagraphPropertyMap.assignAll( rSourceProps.maTextParagraphPropertyMap ); maBulletList.apply( rSourceProps.maBulletList ); maTextCharacterProperties.assignUsed( rSourceProps.maTextCharacterProperties ); if ( rSourceProps.maParaTopMargin.bHasValue ) diff --git a/oox/source/helper/propertymap.cxx b/oox/source/helper/propertymap.cxx index 2858baf..0bf875c 100644 --- a/oox/source/helper/propertymap.cxx +++ b/oox/source/helper/propertymap.cxx @@ -234,6 +234,12 @@ const Any* PropertyMap::getProperty( sal_Int32 nPropId ) const return (aIt == end()) ? 0 : aIt-second; } +void PropertyMap::assignAll( const PropertyMap rPropMap ) +{ +for( PropertyMap::const_iterator it=rPropMap.begin(); it != rPropMap.end(); it++ ) +(*this)[it-first] = it-second; +} + Sequence PropertyValue PropertyMap::makePropertyValueSequence() const { Sequence PropertyValue aSeq( static_cast sal_Int32 ( size() ) ); commit a21c7f835bd7034614fa8ac606fd60a0cbeef1ec Author: Muthu Subramanian sumu...@suse.com Date: Tue Jan 24 13:02:03 2012 +0530 Fix for a probable crash. (code review) diff --git a/oox/source/drawingml/textparagraph.cxx b/oox/source/drawingml/textparagraph.cxx index 964932f..689ab90 100644 --- a/oox/source/drawingml/textparagraph.cxx +++ b/oox/source/drawingml/textparagraph.cxx @@ -113,8 +113,8 @@ void TextParagraph::insertAt( { pTextParagraphStyle-pushToPropSet( rFilterBase, xProps, aioBulletList, NULL, sal_False, fCharacterSize ); fCharacterSize = pTextParagraphStyle-getCharHeightPoints( fCharacterSize ); +maProperties.pushToPropSet( rFilterBase, xProps, aioBulletList, pTextParagraphStyle-getBulletList(), sal_True, fCharacterSize ); } -maProperties.pushToPropSet( rFilterBase, xProps, aioBulletList, pTextParagraphStyle-getBulletList(), sal_True, fCharacterSize ); // empty paragraphs do not have bullets in ppt if ( !nParagraphSize ) ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sc/source
sc/source/filter/starcalc/scflt.cxx | 24 1 file changed, 12 insertions(+), 12 deletions(-) New commits: commit 9042c4d0740c5b222b27d189e526b74fbd740b6f Author: Mariusz Dykierek mariuszdykie...@gmail.com Date: Mon Jan 23 13:41:19 2012 +0530 Redundant condition and Comment Translations. diff --git a/sc/source/filter/starcalc/scflt.cxx b/sc/source/filter/starcalc/scflt.cxx index 1d30ea2..51e9e0a 100644 --- a/sc/source/filter/starcalc/scflt.cxx +++ b/sc/source/filter/starcalc/scflt.cxx @@ -1708,7 +1708,7 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab) sal_uInt16 nValue1; Sc10ColData *pColData; -// Font (Name, Groesse) +// Font (Name, Size) nStart = 0; nEnd = 0; nLimit = aFont.Count; @@ -1739,7 +1739,7 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab) nStart = nEnd + 1; } -// Fontfarbe +// Font color nStart = 0; nEnd = 0; nLimit = aColor.Count; @@ -1758,7 +1758,7 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab) nStart = nEnd + 1; } -// Fontattribute (Fett, Kursiv...) +// Font attributes (Bold, Italic...) nStart = 0; nEnd = 0; nLimit = aAttr.Count; @@ -1783,7 +1783,7 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab) nStart = nEnd + 1; } -// Zellausrichtung +// Cell alignment nStart = 0; nEnd = 0; nLimit = aJustify.Count; @@ -1834,15 +1834,15 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab) aScPattern.GetItemSet().Put(SfxInt32Item(ATTR_ROTATE_VALUE,27000)); sal_Int16 Margin = Max((sal_uInt16)20, (sal_uInt16)(EJustify * 20)); -if (((OJustify ojBottomTop) == ojBottomTop) || ((OJustify ojBottomTop) == ojBottomTop)) +if (OJustify ojBottomTop) aScPattern.GetItemSet().Put(SvxMarginItem(20, Margin, 20, Margin, ATTR_MARGIN)); else aScPattern.GetItemSet().Put(SvxMarginItem(Margin, 20, Margin, 20, ATTR_MARGIN)); pDoc-ApplyPatternAreaTab(Col, nStart, Col, nEnd, Tab, aScPattern); } -nStart = nEnd + 1; +nStart = nEnd + 1; } -// Umrandung +// Border sal_BoolbEnd = false; sal_uInt16 nColorIndex = 0; sal_uInt16 nFrameIndex = 0; @@ -1966,9 +1966,9 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab) pColData++; } -// ACHTUNG: Code bis hier ueberarbeitet ... jetzt hab' ich keinen Bock mehr! (GT) +// ATTENTION: Code up to here works more or less ... from here I've had enough ! (GT) -// Hintergrund (Farbe, Raster) +// Background (Color, Raster) sal_uInt16 nRasterIndex = 0; bEnd= false; nColorIndex = 0; @@ -2056,7 +2056,7 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab) nHelpMe--; } -// Zahlenformate +// Number format nStart = 0; nEnd = 0; nLimit = aValue.Count; @@ -2078,7 +2078,7 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab) nStart = nEnd + 1; } -// Zellattribute (Schutz, Versteckt...) +// Cell attributes (Protected, hidden...) nStart = 0; nEnd = 0; for (i=0; iaFlag.Count; i++) @@ -2097,7 +2097,7 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab) nStart = nEnd + 1; } -// ZellVorlagen +// Cell style nStart = 0; nEnd = 0; ScStyleSheetPool* pStylePool = pDoc-GetStyleSheetPool(); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: oox/source svx/inc svx/source
oox/source/drawingml/customshapeproperties.cxx|2 +- oox/source/drawingml/shapecontext.cxx |6 ++ oox/source/ppt/pptshapecontext.cxx|6 ++ oox/source/token/properties.txt |1 + oox/source/token/tokens.txt |1 + svx/inc/svx/svdoashp.hxx |2 +- svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx |8 svx/source/svdraw/svdoashp.cxx|5 +++-- 8 files changed, 27 insertions(+), 4 deletions(-) New commits: commit 5c4d1b05faa8a3d704fc74a186a173f8cc019cc1 Author: Muthu Subramanian sumu...@suse.com Date: Wed Jan 11 15:24:27 2012 +0530 n#734734: Text rotation fixes. PPTX would need rotation of text _inside_ text/object boundaries, rather than the rotation of the text/object itself. diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx index 5da446a..a03e42c 100644 --- a/oox/source/drawingml/customshapeproperties.cxx +++ b/oox/source/drawingml/customshapeproperties.cxx @@ -154,7 +154,7 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase /* rFi aPropertyMap[ PROP_MirroredX ] = Any( mbMirroredX ); aPropertyMap[ PROP_MirroredY ] = Any( mbMirroredY ); -aPropertyMap[ PROP_TextRotateAngle ] = Any( mnTextRotateAngle ); +aPropertyMap[ PROP_TextPreRotateAngle ] = Any( mnTextRotateAngle ); Sequence PropertyValue aSeq = aPropertyMap.makePropertyValueSequence(); aPropSet.setProperty( PROP_CustomShapeGeometry, aSeq ); diff --git a/oox/source/drawingml/shapecontext.cxx b/oox/source/drawingml/shapecontext.cxx index f613e89..389bfac 100644 --- a/oox/source/drawingml/shapecontext.cxx +++ b/oox/source/drawingml/shapecontext.cxx @@ -119,6 +119,12 @@ Reference XFastContextHandler ShapeContext::createFastChildContext( sal_Int32 xRet = new TextBodyContext( *this, *xTextBody ); break; } +case XML_txXfrm: +{ +AttributeList aAttribs( xAttribs ); +mpShapePtr-getTextBody()-getTextProperties().moRotation = aAttribs.getInteger( XML_rot ); +break; +} } if( !xRet.is() ) diff --git a/oox/source/ppt/pptshapecontext.cxx b/oox/source/ppt/pptshapecontext.cxx index dce07b8..cc62b82 100644 --- a/oox/source/ppt/pptshapecontext.cxx +++ b/oox/source/ppt/pptshapecontext.cxx @@ -218,6 +218,12 @@ Reference XFastContextHandler PPTShapeContext::createFastChildContext( sal_In xRet = new oox::drawingml::TextBodyContext( *this, *xTextBody ); break; } +case PPT_TOKEN( txXfrm ): +{ +AttributeList aAttribs( xAttribs ); +mpShapePtr-getTextBody()-getTextProperties().moRotation = aAttribs.getInteger( XML_rot ); +break; +} } if( !xRet.is() ) diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt index 65d2cb0..50c46bd 100644 --- a/oox/source/token/properties.txt +++ b/oox/source/token/properties.txt @@ -457,6 +457,7 @@ TextHorizontalAdjust TextLeftDistance TextLowerDistance TextOverlap +TextPreRotateAngle TextRightDistance TextRotateAngle TextRotation diff --git a/oox/source/token/tokens.txt b/oox/source/token/tokens.txt index 594468e..cec24b5 100644 --- a/oox/source/token/tokens.txt +++ b/oox/source/token/tokens.txt @@ -5334,6 +5334,7 @@ txOverObj txPr txSp txStyles +txXfrm txbxContent txtBox ty diff --git a/svx/inc/svx/svdoashp.hxx b/svx/inc/svx/svdoashp.hxx index 3d91549..013e150 100644 --- a/svx/inc/svx/svdoashp.hxx +++ b/svx/inc/svx/svdoashp.hxx @@ -149,7 +149,7 @@ public: void SetMirroredY( const sal_Bool bMirroredY ); double GetObjectRotation() const; -double GetExtraTextRotation() const; +double GetExtraTextRotation( const bool bPreRotation = false ) const; TYPEINFO(); SdrObjCustomShape(); diff --git a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx index 2e63da2..85628ca 100644 --- a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx @@ -160,6 +160,14 @@ namespace sdr // #i101684# get the text range unrotated and absolute to the object range const basegfx::B2DRange aTextRange(getCorrectedTextBoundRect()); +// Rotation before scaling + if(!basegfx::fTools::equalZero(GetCustomShapeObj().GetExtraTextRotation(true))) +{ +basegfx::B2DVector aTranslation(0.5, 0.5); +aTextBoxMatrix.translate( -aTranslation.getX(), -aTranslation.getY() ); +aTextBoxMatrix.rotate((360.0 - GetCustomShapeObj().GetExtraTextRotation(true
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - oox/source svx/inc svx/source
oox/source/drawingml/customshapeproperties.cxx|2 +- oox/source/drawingml/shapecontext.cxx |6 ++ oox/source/ppt/pptshapecontext.cxx|6 ++ oox/source/token/properties.txt |1 + oox/source/token/tokens.txt |1 + svx/inc/svx/svdoashp.hxx |2 +- svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx |8 svx/source/svdraw/svdoashp.cxx|5 +++-- 8 files changed, 27 insertions(+), 4 deletions(-) New commits: commit 0b63bb1d5f37ad673b0aadefe4bfe1e61ae667b9 Author: Muthu Subramanian sumu...@suse.com Date: Wed Jan 11 15:24:27 2012 +0530 n#734734: Text rotation fixes. PPTX would need rotation of text _inside_ text/object boundaries, rather than the rotation of the text/object itself. cherrypick: 5c4d1b05faa8a3d704fc74a186a173f8cc019cc1 diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx index 5da446a..a03e42c 100644 --- a/oox/source/drawingml/customshapeproperties.cxx +++ b/oox/source/drawingml/customshapeproperties.cxx @@ -154,7 +154,7 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase /* rFi aPropertyMap[ PROP_MirroredX ] = Any( mbMirroredX ); aPropertyMap[ PROP_MirroredY ] = Any( mbMirroredY ); -aPropertyMap[ PROP_TextRotateAngle ] = Any( mnTextRotateAngle ); +aPropertyMap[ PROP_TextPreRotateAngle ] = Any( mnTextRotateAngle ); Sequence PropertyValue aSeq = aPropertyMap.makePropertyValueSequence(); aPropSet.setProperty( PROP_CustomShapeGeometry, aSeq ); diff --git a/oox/source/drawingml/shapecontext.cxx b/oox/source/drawingml/shapecontext.cxx index f613e89..389bfac 100644 --- a/oox/source/drawingml/shapecontext.cxx +++ b/oox/source/drawingml/shapecontext.cxx @@ -119,6 +119,12 @@ Reference XFastContextHandler ShapeContext::createFastChildContext( sal_Int32 xRet = new TextBodyContext( *this, *xTextBody ); break; } +case XML_txXfrm: +{ +AttributeList aAttribs( xAttribs ); +mpShapePtr-getTextBody()-getTextProperties().moRotation = aAttribs.getInteger( XML_rot ); +break; +} } if( !xRet.is() ) diff --git a/oox/source/ppt/pptshapecontext.cxx b/oox/source/ppt/pptshapecontext.cxx index dce07b8..cc62b82 100644 --- a/oox/source/ppt/pptshapecontext.cxx +++ b/oox/source/ppt/pptshapecontext.cxx @@ -218,6 +218,12 @@ Reference XFastContextHandler PPTShapeContext::createFastChildContext( sal_In xRet = new oox::drawingml::TextBodyContext( *this, *xTextBody ); break; } +case PPT_TOKEN( txXfrm ): +{ +AttributeList aAttribs( xAttribs ); +mpShapePtr-getTextBody()-getTextProperties().moRotation = aAttribs.getInteger( XML_rot ); +break; +} } if( !xRet.is() ) diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt index 65d2cb0..50c46bd 100644 --- a/oox/source/token/properties.txt +++ b/oox/source/token/properties.txt @@ -457,6 +457,7 @@ TextHorizontalAdjust TextLeftDistance TextLowerDistance TextOverlap +TextPreRotateAngle TextRightDistance TextRotateAngle TextRotation diff --git a/oox/source/token/tokens.txt b/oox/source/token/tokens.txt index 594468e..cec24b5 100644 --- a/oox/source/token/tokens.txt +++ b/oox/source/token/tokens.txt @@ -5334,6 +5334,7 @@ txOverObj txPr txSp txStyles +txXfrm txbxContent txtBox ty diff --git a/svx/inc/svx/svdoashp.hxx b/svx/inc/svx/svdoashp.hxx index 3d91549..013e150 100644 --- a/svx/inc/svx/svdoashp.hxx +++ b/svx/inc/svx/svdoashp.hxx @@ -149,7 +149,7 @@ public: void SetMirroredY( const sal_Bool bMirroredY ); double GetObjectRotation() const; -double GetExtraTextRotation() const; +double GetExtraTextRotation( const bool bPreRotation = false ) const; TYPEINFO(); SdrObjCustomShape(); diff --git a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx index 2e63da2..85628ca 100644 --- a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx @@ -160,6 +160,14 @@ namespace sdr // #i101684# get the text range unrotated and absolute to the object range const basegfx::B2DRange aTextRange(getCorrectedTextBoundRect()); +// Rotation before scaling + if(!basegfx::fTools::equalZero(GetCustomShapeObj().GetExtraTextRotation(true))) +{ +basegfx::B2DVector aTranslation(0.5, 0.5); +aTextBoxMatrix.translate( -aTranslation.getX(), -aTranslation.getY() ); +aTextBoxMatrix.rotate
[Libreoffice-commits] .: oox/source
oox/source/drawingml/textparagraphpropertiescontext.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit 82e385c7e0b466cd1106e19cdbb6dc15b2464811 Author: Muthu Subramanian sumu...@suse.com Date: Tue Jan 3 18:07:24 2012 +0530 n734734: Line Spacing is used from previous values. diff --git a/oox/source/drawingml/textparagraphpropertiescontext.cxx b/oox/source/drawingml/textparagraphpropertiescontext.cxx index 2164bf2..9d06ae1 100644 --- a/oox/source/drawingml/textparagraphpropertiescontext.cxx +++ b/oox/source/drawingml/textparagraphpropertiescontext.cxx @@ -148,6 +148,9 @@ TextParagraphPropertiesContext::~TextParagraphPropertiesContext() PropertyMap rPropertyMap( mrTextParagraphProperties.getTextParagraphPropertyMap() ); if ( maLineSpacing.bHasValue ) rPropertyMap[ PROP_ParaLineSpacing ] = maLineSpacing.toLineSpacing(); +else +rPropertyMap[ PROP_ParaLineSpacing ] = ::com::sun::star::style::LineSpacing( ::com::sun::star::style::LineSpacingMode::PROP, 100 ); + ::std::list TabStop ::size_type nTabCount = maTabList.size(); if( nTabCount != 0 ) ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - oox/source
oox/source/drawingml/textparagraphpropertiescontext.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit b90236d3a516d8b7236ffc10a4ae5b26ac127a53 Author: Muthu Subramanian sumu...@suse.com Date: Tue Jan 3 18:07:24 2012 +0530 n734734: Line Spacing is used from previous values. diff --git a/oox/source/drawingml/textparagraphpropertiescontext.cxx b/oox/source/drawingml/textparagraphpropertiescontext.cxx index 0bee276..d0d1f08 100644 --- a/oox/source/drawingml/textparagraphpropertiescontext.cxx +++ b/oox/source/drawingml/textparagraphpropertiescontext.cxx @@ -148,6 +148,9 @@ TextParagraphPropertiesContext::~TextParagraphPropertiesContext() PropertyMap rPropertyMap( mrTextParagraphProperties.getTextParagraphPropertyMap() ); if ( maLineSpacing.bHasValue ) rPropertyMap[ PROP_ParaLineSpacing ] = maLineSpacing.toLineSpacing(); +else +rPropertyMap[ PROP_ParaLineSpacing ] = ::com::sun::star::style::LineSpacing( ::com::sun::star::style::LineSpacingMode::PROP, 100 ); + ::std::list TabStop ::size_type nTabCount = maTabList.size(); if( nTabCount != 0 ) ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: oox/inc oox/Library_oox.mk oox/source
oox/Library_oox.mk|1 oox/inc/oox/drawingml/diagram/diagram.hxx |2 oox/inc/oox/drawingml/shape.hxx |5 + oox/inc/oox/ppt/pptshapegroupcontext.hxx |3 oox/source/core/xmlfilterbase.cxx |6 - oox/source/drawingml/diagram/datamodelcontext.cxx |9 +- oox/source/drawingml/diagram/diagram.cxx |9 +- oox/source/drawingml/diagram/diagram.hxx |3 oox/source/drawingml/shape.cxx|7 + oox/source/ppt/extdrawingfragmenthandler.cxx | 95 ++ oox/source/ppt/extdrawingfragmenthandler.hxx | 71 oox/source/ppt/pptshapecontext.cxx|2 oox/source/ppt/pptshapegroupcontext.cxx | 28 ++ oox/source/token/namespaces.hxx.tail |1 oox/source/token/namespaces.txt |1 oox/source/token/tokens.txt |2 16 files changed, 236 insertions(+), 9 deletions(-) New commits: commit 60b7f09ed5980248c8f3088adf80380d02d66358 Author: Muthu Subramanian sumu...@suse.com Date: Fri Dec 30 16:09:42 2011 +0530 n#655408: Importing extLst of drawings in diagrams. data*.xml contains the list of drawings which can be imported instead. These are easier to import now that we support better smartart. diff --git a/oox/Library_oox.mk b/oox/Library_oox.mk index 0b54125..098d747 100644 --- a/oox/Library_oox.mk +++ b/oox/Library_oox.mk @@ -266,6 +266,7 @@ $(eval $(call gb_Library_add_exception_objects,oox,\ oox/source/ppt/timenode \ oox/source/ppt/timenodelistcontext \ oox/source/ppt/timetargetelementcontext \ +oox/source/ppt/extdrawingfragmenthandler \ oox/source/shape/ShapeContextHandler \ oox/source/shape/ShapeFilterBase \ oox/source/token/namespacemap \ diff --git a/oox/inc/oox/drawingml/diagram/diagram.hxx b/oox/inc/oox/drawingml/diagram/diagram.hxx index 9b75667..4c0a40d 100644 --- a/oox/inc/oox/drawingml/diagram/diagram.hxx +++ b/oox/inc/oox/drawingml/diagram/diagram.hxx @@ -43,7 +43,7 @@ namespace oox { namespace drawingml { generate and layout the shapes, and push it as children into the referenced shape. */ -void loadDiagram( const ShapePtr pShape, +void loadDiagram( ShapePtr pShape, core::XmlFilterBase rFilter, const ::rtl::OUString rDataModelPath, const ::rtl::OUString rLayoutPath, diff --git a/oox/inc/oox/drawingml/shape.hxx b/oox/inc/oox/drawingml/shape.hxx index ab7637a..772f699 100644 --- a/oox/inc/oox/drawingml/shape.hxx +++ b/oox/inc/oox/drawingml/shape.hxx @@ -107,6 +107,7 @@ public: void setChildPosition( com::sun::star::awt::Point nPosition ){ maChPosition = nPosition; } void setChildSize( com::sun::star::awt::Size aSize ){ maChSize = aSize; } +void moveAllToPosition( const com::sun::star::awt::Point rPoint ); void setPosition( com::sun::star::awt::Point nPosition ){ maPosition = nPosition; } const com::sun::star::awt::Point getPosition() const { return maPosition; } @@ -173,6 +174,9 @@ public: getXShape() const { return mxShape; } virtual voidapplyShapeReference( const Shape rReferencedShape ); +const ::std::vectorrtl::OUString +getExtDrawings() { return maExtDrawings; } +voidaddExtDrawingRelId( const ::rtl::OUString rRelId ) { maExtDrawings.push_back( rRelId ); } protected: @@ -233,6 +237,7 @@ protected: com::sun::star::awt::Size maSize; com::sun::star::awt::Point maPosition; +::std::vectorrtl::OUStringmaExtDrawings; private: enum FrameType diff --git a/oox/inc/oox/ppt/pptshapegroupcontext.hxx b/oox/inc/oox/ppt/pptshapegroupcontext.hxx index 948ee79..7e2a6d3 100644 --- a/oox/inc/oox/ppt/pptshapegroupcontext.hxx +++ b/oox/inc/oox/ppt/pptshapegroupcontext.hxx @@ -38,6 +38,7 @@ class PPTShapeGroupContext : public ::oox::drawingml::ShapeGroupContext { SlidePersistPtr mpSlidePersistPtr; ShapeLocation meShapeLocation; +oox::drawingml::ShapePtrpGraphicShape; public: PPTShapeGroupContext( @@ -50,6 +51,8 @@ public: virtual ::com::sun::star::uno::Reference ::com::sun::star::xml::sax::XFastContextHandler SAL_CALL createFastChildContext( ::sal_Int32 Element, const ::com::sun::star::uno::Reference ::com::sun::star::xml::sax::XFastAttributeList Attribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException); +virtual void SAL_CALL endFastElement( ::sal_Int32 Element ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException); + protected: }; diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core
[Libreoffice-commits] .: oox/source
oox/source/drawingml/customshapeproperties.cxx | 16 1 file changed, 16 deletions(-) New commits: commit 606c2e7e9f0ab0fb5c32d98a6778457bcaaf1719 Author: Muthu Subramanian sumu...@suse.com Date: Fri Dec 16 20:25:43 2011 +0530 Fixed: bentConnectors are not imported properly. Reverting regression with f0bf2a2ae95ddad3d08ddd1413ec56bf04224a94 diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx index 3f3bcdb..5da446a 100644 --- a/oox/source/drawingml/customshapeproperties.cxx +++ b/oox/source/drawingml/customshapeproperties.cxx @@ -110,22 +110,6 @@ static OUString GetConnectorShapeType( sal_Int32 nType ) static const OUString sStraightConnector1 = CREATE_OUSTRING( mso-spt32 ); sType = sStraightConnector1; } break; -case XML_bentConnector2: { -static const OUString sBentConnector2 = CREATE_OUSTRING( mso-spt33 ); -sType = sBentConnector2; -} break; -case XML_bentConnector3: { -static const OUString sBentConnector3 = CREATE_OUSTRING( mso-spt34 ); -sType = sBentConnector3; -} break; -case XML_bentConnector4: { -static const OUString sBentConnector4 = CREATE_OUSTRING( mso-spt35 ); -sType = sBentConnector4; -} break; -case XML_bentConnector5: { -static const OUString sBentConnector5 = CREATE_OUSTRING( mso-spt36 ); -sType = sBentConnector5; -} break; default: break; } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 2 commits - connectivity/source officecfg/registry sc/source
connectivity/source/drivers/dbase/DTable.cxx | 11 ++ officecfg/registry/schema/org/openoffice/Office/Calc.xcs | 26 ++ sc/source/ui/docshell/docsh8.cxx |4 + sc/source/ui/unoobj/filtuno.cxx | 60 ++- 4 files changed, 99 insertions(+), 2 deletions(-) New commits: commit 314ce5b09eaa2a2029d8da3ec660fa72badfd839 Author: Muthu Subramanian sumu...@suse.com Date: Fri Dec 16 20:43:54 2011 +0530 fdo#33602: Preserving dbf import/export charset. diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs index efe840c..79ebc2e 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs @@ -1029,6 +1029,32 @@ info descContains the dialogs settings./desc /info +group oor:name=DBFImport +info +descContains settings for DBF Import dialog/desc +/info +prop oor:name=CharSet oor:type=xs:int +info +authormuthusuba/author +descCharset/Language/desc +labelCharSet/label +/info +value-1/value +/prop +/group +group oor:name=DBFExport +info +descContains settings for DBF Export dialog/desc +/info +prop oor:name=CharSet oor:type=xs:int +info +authormuthusuba/author +descCharset/Language/desc +labelCharSet/label +/info +value-1/value +/prop +/group group oor:name=CSVImport info descContains setting for Text CSV Import/desc diff --git a/sc/source/ui/unoobj/filtuno.cxx b/sc/source/ui/unoobj/filtuno.cxx index 8d16f38..6c1a651 100644 --- a/sc/source/ui/unoobj/filtuno.cxx +++ b/sc/source/ui/unoobj/filtuno.cxx @@ -51,8 +51,15 @@ #include memory +#include optutil.hxx +#include com/sun/star/uno/Any.hxx +#include com/sun/star/uno/Sequence.hxx + + using namespace ::com::sun::star; using ::rtl::OUStringBuffer; +using namespace rtl; +using namespace com::sun::star::uno; // @@ -66,6 +73,55 @@ SC_SIMPLE_SERVICE_INFO( ScFilterOptionsObj, SCFILTEROPTIONSOBJ_IMPLNAME, SCFILTE #define SC_UNONAME_FILTEROPTIONSFilterOptions #define SC_UNONAME_INPUTSTREAM InputStream + +#define DBF_CHAR_SETCharSet +#define DBF_SEP_PATH_IMPORT Office.Calc/Dialogs/DBFImport +#define DBF_SEP_PATH_EXPORT Office.Calc/Dialogs/DBFExport + +// + +static void load_CharSet( rtl_TextEncoding nCharSet, bool bExport ) +{ +sal_Int32 nChar; +SequenceAny aValues; +const Any *pProperties; +SequenceOUString aNames(1); +OUString* pNames = aNames.getArray(); +ScLinkConfigItem aItem( OUString::createFromAscii( + bExport?DBF_SEP_PATH_EXPORT:DBF_SEP_PATH_IMPORT ) ); + +pNames[0] = OUString::createFromAscii( DBF_CHAR_SET ); +aValues = aItem.GetProperties( aNames ); +pProperties = aValues.getConstArray(); + +// Default choice +nCharSet = RTL_TEXTENCODING_IBM_850; + +if( pProperties[0].hasValue() ) +{ +pProperties[0] = nChar; +if( nChar = 0) +nCharSet = (rtl_TextEncoding) nChar; +} +} + +static void save_CharSet( rtl_TextEncoding nCharSet, bool bExport ) +{ +SequenceAny aValues; +Any *pProperties; +SequenceOUString aNames(1); +OUString* pNames = aNames.getArray(); +ScLinkConfigItem aItem( OUString::createFromAscii( + bExport?DBF_SEP_PATH_EXPORT:DBF_SEP_PATH_IMPORT ) ); + +pNames[0] = OUString::createFromAscii( DBF_CHAR_SET ); +aValues = aItem.GetProperties( aNames ); +pProperties = aValues.getArray(); +pProperties[0] = (sal_Int32) nCharSet; + +aItem.PutProperties(aNames, aValues); +} + // ScFilterOptionsObj::ScFilterOptionsObj() : @@ -250,8 +306,7 @@ sal_Int16 SAL_CALL ScFilterOptionsObj::execute() throw(uno::RuntimeException) // dBase import aTitle = ScGlobal::GetRscString( STR_IMPORT_DBF ); } -// common for dBase import/export -eEncoding = RTL_TEXTENCODING_IBM_850; +load_CharSet( eEncoding, bExport ); bDBEnc = sal_True; } else if ( aFilterString == ScDocShell::GetDifFilterName() ) @@ -279,6 +334,7 @@ sal_Int16 SAL_CALL
[Libreoffice-commits] .: sc/source
sc/source/filter/excel/impop.cxx |4 1 file changed, 4 insertions(+) New commits: commit 9dab9a26aeaeeaabcef3f4900597ca57e7411a2d Author: Muthu Subramanian sumu...@suse.com Date: Thu Dec 15 16:49:52 2011 +0530 fdo#33747: Row Height is unnecessarily large. diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx index 3c96481..533bbb9 100644 --- a/sc/source/filter/excel/impop.cxx +++ b/sc/source/filter/excel/impop.cxx @@ -937,6 +937,10 @@ void ImportExcel::Row34( void ) aIn nRowHeight; // direkt in Twips angegeben aIn.Ignore( 4 ); +nRowHeight = nRowHeight 0x7FFF; // Bit 15: Row Height not changed manually +if( !nRowHeight ) +nRowHeight = (GetBiff() == EXC_BIFF2) ? 0x25 : 0x225; + aIn nGrbit nXF; sal_uInt8 nLevel = ::extract_value sal_uInt8 ( nGrbit, 0, 3 ); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sc/source
sc/source/filter/excel/impop.cxx |4 1 file changed, 4 insertions(+) New commits: commit cb010c378dfb60fa82a3dfbcd1bcd20e5b26df48 Author: Muthu Subramanian sumu...@suse.com Date: Thu Dec 15 16:49:52 2011 +0530 fdo#33747: Row Height is unnecessarily large. diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx index 3c96481..533bbb9 100644 --- a/sc/source/filter/excel/impop.cxx +++ b/sc/source/filter/excel/impop.cxx @@ -937,6 +937,10 @@ void ImportExcel::Row34( void ) aIn nRowHeight; // direkt in Twips angegeben aIn.Ignore( 4 ); +nRowHeight = nRowHeight 0x7FFF; // Bit 15: Row Height not changed manually +if( !nRowHeight ) +nRowHeight = (GetBiff() == EXC_BIFF2) ? 0x25 : 0x225; + aIn nGrbit nXF; sal_uInt8 nLevel = ::extract_value sal_uInt8 ( nGrbit, 0, 3 ); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: oox/source
oox/source/drawingml/textbodypropertiescontext.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit a8b0407fef14cd89e3eb571c88ce3cb9edf70149 Author: Muthu Subramanian sumu...@suse.com Date: Tue Nov 15 21:13:18 2011 +0530 n#592912 and n#621744: Text Alignment fixes. diff --git a/oox/source/drawingml/textbodypropertiescontext.cxx b/oox/source/drawingml/textbodypropertiescontext.cxx index 083cccf..3c77a35 100644 --- a/oox/source/drawingml/textbodypropertiescontext.cxx +++ b/oox/source/drawingml/textbodypropertiescontext.cxx @@ -152,7 +152,7 @@ TextBodyPropertiesContext::TextBodyPropertiesContext( ContextHandler rParent, mrTextBodyProp.maPropertyMap[ PROP_TextHorizontalAdjust ] = TextHorizontalAdjust_RIGHT; } -else +else if( mrTextBodyProp.moVert.get( XML_horz ) == XML_horz ) mrTextBodyProp.maPropertyMap[ PROP_TextVerticalAdjust ] = eVA; } } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: oox/source
oox/source/drawingml/chart/seriesconverter.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit b645f9195f4da3014e001fb27b8a117d89c8f389 Author: Muthu Subramanian sumu...@suse.com Date: Wed Nov 2 13:50:20 2011 +0530 n#706792: Fix crash while opening certain pptx files. diff --git a/oox/source/drawingml/chart/seriesconverter.cxx b/oox/source/drawingml/chart/seriesconverter.cxx index 8a98471..3ed07e6 100644 --- a/oox/source/drawingml/chart/seriesconverter.cxx +++ b/oox/source/drawingml/chart/seriesconverter.cxx @@ -196,7 +196,7 @@ void DataLabelConverter::convertFromModel( const Reference XDataSeries rxDat PropertySet aPropSet( rxDataSeries-getDataPointByIndex( mrModel.mnIndex ) ); lclConvertLabelFormatting( aPropSet, getFormatter(), mrModel, rTypeGroup, false ); -if( !mrModel.mxLayout-mbAutoLayout ) +if( mrModel.mxLayout !mrModel.mxLayout-mbAutoLayout ) { // bnc#694340 - nasty hack - chart2 cannot individually // place data labels, let's try to find a useful ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sc/source
sc/source/core/tool/reftokenhelper.cxx | 22 -- sc/source/filter/excel/xichart.cxx | 12 sc/source/ui/unoobj/chart2uno.cxx | 29 + 3 files changed, 53 insertions(+), 10 deletions(-) New commits: commit 15202ad5b26ff48dc937ed12b57d53108c2731e4 Author: Muthu Subramanian sumu...@suse.com Date: Mon Oct 3 16:28:59 2011 +0530 n717290: Feature to allow string constants in chart ranges. Chart ranges specifically for labels can now be of the form =Label1. This allows labels to be picked from chart data (from UI) rather than from the sheet. diff --git a/sc/source/core/tool/reftokenhelper.cxx b/sc/source/core/tool/reftokenhelper.cxx index f4f09d6..5d6cbfb 100644 --- a/sc/source/core/tool/reftokenhelper.cxx +++ b/sc/source/core/tool/reftokenhelper.cxx @@ -46,11 +46,23 @@ using ::std::vector; using ::std::auto_ptr; using ::rtl::OUString; +static bool lcl_mayBeRangeConstString( const OUString aRangeStr ) +{ +if( aRangeStr.getLength() = 3 aRangeStr.endsWithAsciiL( \, 1 ) ) +if( aRangeStr[0] == '' ) +return true; +else if( aRangeStr[0] == '=' aRangeStr[1] == '' ) +return true; + +return false; +} + void ScRefTokenHelper::compileRangeRepresentation( vectorScTokenRef rRefTokens, const OUString rRangeStr, ScDocument* pDoc, const sal_Unicode cSep, FormulaGrammar::Grammar eGrammar) { const sal_Unicode cQuote = '\''; +bool bMayBeConstString = lcl_mayBeRangeConstString( rRangeStr ); // #i107275# ignore parentheses OUString aRangeStr = rRangeStr; @@ -80,7 +92,7 @@ void ScRefTokenHelper::compileRangeRepresentation( else { pArray-Reset(); -const FormulaToken* p = pArray-GetNextReference(); +const FormulaToken* p = pArray-Next(); if (!p) bFailure = true; else @@ -104,8 +116,14 @@ void ScRefTokenHelper::compileRangeRepresentation( if (!pT-GetDoubleRef().ValidExternal()) bFailure = true; break; +case svString: +if (!bMayBeConstString) +bFailure = true; +bMayBeConstString = false; +break; default: -; +bFailure = true; +break; } if (!bFailure) rRefTokens.push_back( diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx index d5b357f..36c0fe4 100644 --- a/sc/source/filter/excel/xichart.cxx +++ b/sc/source/filter/excel/xichart.cxx @@ -862,6 +862,18 @@ Reference XDataSequence XclImpChSourceLink::CreateDataSequence( const OUStrin //OSL_FAIL( XclImpChSourceLink::CreateDataSequence - cannot create data sequence ); } } +else if( rRole == EXC_CHPROP_ROLE_LABEL mxString mxString-GetText().Len() ) +{ +try +{ +OUString aString = OUString::createFromAscii(\); +xDataSeq = xDataProv-createDataSequenceByRangeRepresentation( aString + mxString-GetText() + aString ); +// set sequence role +ScfPropertySet aSeqProp( xDataSeq ); +aSeqProp.SetProperty( EXC_CHPROP_ROLE, rRole ); +} +catch( Exception ) { } +} return xDataSeq; } diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx index 398bcfe..04c1537 100644 --- a/sc/source/ui/unoobj/chart2uno.cxx +++ b/sc/source/ui/unoobj/chart2uno.cxx @@ -371,7 +371,7 @@ Chart2PositionMap::Chart2PositionMap(SCCOL nAllColCount, SCROW nAllRowCount, maData.init(mnDataColCount,mnDataRowCount); Table* pCol = static_castTable*(rCols.First()); -FormulaToken* pToken = static_castFormulaToken*(pCol-First()); +FormulaToken* pToken = NULL; for (SCCOL nCol = 0; nCol nAllColCount; ++nCol) { if (pCol) @@ -725,7 +725,8 @@ void Chart2Positioner::createPositionMap() String aTabName = bExternal ? pToken-GetString() : String(); ScComplexRefData aData; -ScRefTokenHelper::getDoubleRefDataFromToken(aData, *itr); +if( !ScRefTokenHelper::getDoubleRefDataFromToken(aData, *itr) ) +break; const ScSingleRefData s = aData.Ref1; const ScSingleRefData e = aData.Ref2; SCCOL nCol1 = s.nCol, nCol2 = e.nCol; @@ -2880,17 +2881,29 @@ uno::Sequence double SAL_CALL ScChart2DataSequence::getNumericalData() uno::Sequence rtl::OUString SAL_CALL ScChart2DataSequence::getTextualData( ) throw (uno::RuntimeException) { SolarMutexGuard aGuard; -if ( !m_pDocument) +uno::Sequencertl::OUString aSeq; +if ( !m_pDocument ) throw uno::RuntimeException(); BuildDataCache(); sal_Int32