[Libreoffice-commits] core.git: 3 commits - filter/source sw/source
Xisco Fauli
anistenis at gmail.com
Mon Apr 1 14:05:45 PDT 2013
filter/source/msfilter/escherex.cxx | 18 ++++++------------
filter/source/msfilter/svdfppt.cxx | 10 ++++++++++
sw/source/filter/ww8/ww8par.cxx | 13 +++++++++++--
3 files changed, 27 insertions(+), 14 deletions(-)
New commits:
commit c6ba5edabc427bfddd850b1e8e586d5e440246c2
Author: Xisco Fauli <anistenis at gmail.com>
Date: Mon Apr 1 23:01:59 2013 +0200
Related to #120039: Remove RTL_CONSTASCII_USTRINGPARAM
Change-Id: Idc6bae019e972ad512158c71376f7995ab8cf2db
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index 880cc51..6449ba8 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -1455,33 +1455,27 @@ sal_Bool EscherPropertyContainer::CreateGraphicProperties(
if ( eBitmapMode == ::com::sun::star::drawing::BitmapMode_REPEAT )
{
sal_Int32 nSizeX = 0,nSizeY = 0,nOffsetX = 0,nOffsetY = 0,nPosOffsetX = 0,nPosOffsetY = 0;
- if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet,
- String( RTL_CONSTASCII_USTRINGPARAM( "FillBitmapSizeX" ) ), sal_True ) )
+ if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, "FillBitmapSizeX", sal_True ) )
{
aAny >>= nSizeX;
}
- if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet,
- String( RTL_CONSTASCII_USTRINGPARAM( "FillBitmapSizeY" ) ), sal_True ) )
+ if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, "FillBitmapSizeY", sal_True ) )
{
aAny >>= nSizeY;
}
- if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet,
- String( RTL_CONSTASCII_USTRINGPARAM( "FillBitmapOffsetX" ) ), sal_True ) )
+ if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, "FillBitmapOffsetX", sal_True ) )
{
aAny >>= nOffsetX;
}
- if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet,
- String( RTL_CONSTASCII_USTRINGPARAM( "FillBitmapOffsetY" ) ), sal_True ) )
+ if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, "FillBitmapOffsetY", sal_True ) )
{
aAny >>= nOffsetY;
}
- if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet,
- String( RTL_CONSTASCII_USTRINGPARAM( "FillBitmapPositionOffsetX" ) ), sal_True ) )
+ if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, "FillBitmapPositionOffsetX", sal_True ) )
{
aAny >>= nPosOffsetX;
}
- if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet,
- String( RTL_CONSTASCII_USTRINGPARAM( "FillBitmapPositionOffsetY" ) ), sal_True ) )
+ if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, "FillBitmapPositionOffsetY", sal_True ) )
{
aAny >>= nPosOffsetY;
}
commit 638678893657aaf90a3b6e1a6c4d3fb3fc28e954
Author: Lei De Bin <leidb at apache.org>
Date: Wed Jul 4 05:46:06 2012 +0000
Fix #119510# - fix some invalid FLY_AT_PARA case:
The width should be automatically re-sized, then for the horizontal alignment left is
better than right.
Found by: yan ji
Patch by: Lei De Bin
Review by: Chen Zuo Jun
Conflicts:
sw/source/filter/ww8/ww8par.cxx
Change-Id: I584b81bf2f32e8ae41bd761f760672a33d1bfd73
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 621bdbb..f78da7b 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -57,6 +57,7 @@
#include <fmthdft.hxx>
#include <fmtcntnt.hxx>
#include <fmtcnct.hxx>
+#include <fmtanchr.hxx>
#include <fmtpdsc.hxx>
#include <ftninfo.hxx>
#include <fmtftn.hxx>
@@ -1892,9 +1893,17 @@ void SwWW8ImplReader::Read_HdFtTextAsHackedFrame(long nStart, long nLen,
SwFlyFrmFmt *pFrame = rDoc.MakeFlySection(FLY_AT_PARA, pPaM->GetPoint());
- pFrame->SetFmtAttr(SwFmtFrmSize(ATT_MIN_SIZE, nPageWidth, MINLAY));
+ SwFmtAnchor aAnch( pFrame->GetAnchor() );
+ aAnch.SetType( FLY_AT_PARA );
+ pFrame->SetFmtAttr( aAnch );
+ SwFmtFrmSize aSz(ATT_MIN_SIZE, nPageWidth, MINLAY);
+ SwFrmSize eFrmSize = ATT_MIN_SIZE;
+ if( eFrmSize != aSz.GetWidthSizeType() )
+ aSz.SetWidthSizeType( eFrmSize );
+ pFrame->SetFmtAttr(aSz);
pFrame->SetFmtAttr(SwFmtSurround(SURROUND_THROUGHT));
- pFrame->SetFmtAttr(SwFmtHoriOrient(0, text::HoriOrientation::RIGHT)); //iFOO
+ pFrame->SetFmtAttr(SwFmtHoriOrient(0, text::HoriOrientation::LEFT)); //iFOO
+
// #i43427# - send frame for header/footer into background.
pFrame->SetFmtAttr( SvxOpaqueItem( RES_OPAQUE, false ) );
SdrObject* pFrmObj = CreateContactObject( pFrame );
commit e518ef52bbda3449130f51dbbf6f0a60bb76298f
Author: Sun Ying <sunying at apache.org>
Date: Thu Aug 16 02:13:43 2012 +0000
Reported by: Li Feng Wang
Patch by: Ying Sun
Review by: Jian Yuan Li
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 200e7b4..d65254ba 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -7272,6 +7272,16 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell >& xCell )
eVA = drawing::TextVerticalAdjust_BOTTOM;
xPropSet->setPropertyValue( sTextVerticalAdjust, Any( eVA ) );
+ //set textHorizontalAdjust and TextWritingMode attr
+ const sal_Int32 eHA(((const SdrTextLeftDistItem&)pObj->GetMergedItem(SDRATTR_TEXT_HORZADJUST)).GetValue());
+ const SvxFrameDirection eDirection = (const SvxFrameDirection)((( const SvxFrameDirectionItem&)pObj->GetMergedItem(EE_PARA_WRITINGDIR)).GetValue());
+ static const rtl::OUString sHorizontalAdjust( RTL_CONSTASCII_USTRINGPARAM( "TextHorizontalAdjust" ) );
+ static const rtl::OUString sWritingMode( RTL_CONSTASCII_USTRINGPARAM("TextWritingMode") );
+ xPropSet->setPropertyValue( sHorizontalAdjust , Any( eHA ) );
+ if ( eDirection == FRMDIR_VERT_TOP_RIGHT )
+ {//vertical writing
+ xPropSet->setPropertyValue( sWritingMode , Any( ::com::sun::star::text::WritingMode_TB_RL ) );
+ }
SfxItemSet aSet( pObj->GetMergedItemSet() );
XFillStyle eFillStyle(((XFillStyleItem&)pObj->GetMergedItem( XATTR_FILLSTYLE )).GetValue());
::com::sun::star::drawing::FillStyle eFS( com::sun::star::drawing::FillStyle_NONE );
More information about the Libreoffice-commits
mailing list