[Libreoffice-commits] core.git: 5 commits - dbaccess/source extensions/source offapi/com scp2/source sd/source svtools/source tools/source vcl/source
Ariel Constenla-Haile
arielch at apache.org
Thu May 23 07:19:33 PDT 2013
dbaccess/source/ui/dlg/admincontrols.cxx | 1
extensions/source/ole/oleobjw.cxx | 4
extensions/source/ole/unoconversionutilities.hxx | 4
offapi/com/sun/star/linguistic2/XLanguageGuessing.idl | 2
scp2/source/ooo/module_helppack.ulf | 4
scp2/source/ooo/module_langpack.ulf | 4
sd/source/filter/eppt/epptso.cxx | 8 +
svtools/source/misc/langtab.src | 2
tools/source/generic/poly2.cxx | 65 +++++++++----
vcl/source/gdi/outdev4.cxx | 85 +++++++++++-------
10 files changed, 116 insertions(+), 63 deletions(-)
New commits:
commit 1bfbe4963db6edb7dc4333988d147d9b13689e2b
Author: Ariel Constenla-Haile <arielch at apache.org>
Date: Sun Mar 17 23:08:31 2013 +0000
Fix build breaker
(cherry picked from commit 4f7c31cdcf7ba9558e59bc345b3925f6b3d2695c)
Change-Id: Iccb1de40dc66d94128d4db2ca08b05b7e4c567f5
diff --git a/extensions/source/ole/oleobjw.cxx b/extensions/source/ole/oleobjw.cxx
index d487a15..b3b7b52 100644
--- a/extensions/source/ole/oleobjw.cxx
+++ b/extensions/source/ole/oleobjw.cxx
@@ -1646,7 +1646,7 @@ TypeDescription IUnknownWrapper_Impl::getInterfaceMemberDescOfCurrentCall(const
{
typelib_TypeDescriptionReference* pTypeRefMember = pInterface->ppAllMembers[i];
typelib_TypeDescription* pDescMember= NULL;
- TYPELIB_DANGER_GET( &pDescMember, pTypeRefMember)
+ TYPELIB_DANGER_GET( &pDescMember, pTypeRefMember);
typelib_InterfaceMemberTypeDescription* pInterfaceMember=
(typelib_InterfaceMemberTypeDescription*) pDescMember;
@@ -1655,7 +1655,7 @@ TypeDescription IUnknownWrapper_Impl::getInterfaceMemberDescOfCurrentCall(const
pMember= pInterfaceMember;
break;
}
- TYPELIB_DANGER_RELEASE( pDescMember)
+ TYPELIB_DANGER_RELEASE( pDescMember);
}
if( pMember)
diff --git a/extensions/source/ole/unoconversionutilities.hxx b/extensions/source/ole/unoconversionutilities.hxx
index a77fbf6..36af845 100644
--- a/extensions/source/ole/unoconversionutilities.hxx
+++ b/extensions/source/ole/unoconversionutilities.hxx
@@ -2023,9 +2023,9 @@ void UnoConversionUtilities<T>::dispatchExObject2Sequence( const VARIANTARG* pva
typelib_TypeDescriptionReference *pSeqElemDescRef= pSeqDesc->pType; // type of the Sequence' elements
Type elemType( pSeqElemDescRef);
_typelib_TypeDescription* pSeqElemDesc=NULL;
- TYPELIB_DANGER_GET( &pSeqElemDesc, pSeqElemDescRef)
+ TYPELIB_DANGER_GET( &pSeqElemDesc, pSeqElemDescRef);
sal_uInt32 nelementSize= pSeqElemDesc->nSize;
- TYPELIB_DANGER_RELEASE( pSeqElemDesc)
+ TYPELIB_DANGER_RELEASE( pSeqElemDesc);
uno_Sequence *p_uno_Seq;
uno_sequence_construct( &p_uno_Seq, pDesc, NULL, length, cpp_acquire);
commit c1acf1d72ea1421cbb460e65ee5b1d9d3200033c
Author: Armin Le Grand <alg at apache.org>
Date: Thu Sep 27 12:07:14 2012 +0000
Resolves: #i115630# secured OutputDevice::ImplDrawHatch in vcl
and PolyPolygon::Optimize in tools to useful fallbacks when working on
PolyPolygons (what they do *not* support)
(cherry picked from commit dbe489ab9766d96c5cafb079bc4778103bded783)
Conflicts:
vcl/source/gdi/outdev4.cxx
Change-Id: I5d2374ec95702cb0cab29d2e82710d4aa29fa823
diff --git a/tools/source/generic/poly2.cxx b/tools/source/generic/poly2.cxx
index 535ff9a..2650960 100644
--- a/tools/source/generic/poly2.cxx
+++ b/tools/source/generic/poly2.cxx
@@ -241,39 +241,62 @@ void PolyPolygon::Optimize( sal_uIntPtr nOptimizeFlags, const PolyOptimizeData*
{
DBG_CHKTHIS( PolyPolygon, NULL );
- if( nOptimizeFlags )
+ if(nOptimizeFlags && Count())
{
- double fArea;
- const sal_Bool bEdges = ( nOptimizeFlags & POLY_OPTIMIZE_EDGES ) == POLY_OPTIMIZE_EDGES;
- sal_uInt16 nPercent = 0;
+ // #115630# ImplDrawHatch does not work with beziers included in the polypolygon, take care of that
+ bool bIsCurve(false);
- if( bEdges )
+ for(sal_uInt16 a(0); !bIsCurve && a < Count(); a++)
{
- const Rectangle aBound( GetBoundRect() );
-
- fArea = ( aBound.GetWidth() + aBound.GetHeight() ) * 0.5;
- nPercent = pData ? pData->GetPercentValue() : 50;
- nOptimizeFlags &= ~POLY_OPTIMIZE_EDGES;
+ if((*this)[a].HasFlags())
+ {
+ bIsCurve = true;
+ }
}
- // watch for ref counter
- if( mpImplPolyPolygon->mnRefCount > 1 )
+ if(bIsCurve)
{
- mpImplPolyPolygon->mnRefCount--;
- mpImplPolyPolygon = new ImplPolyPolygon( *mpImplPolyPolygon );
- }
+ OSL_ENSURE(false, "Optimize does *not* support curves, falling back to AdaptiveSubdivide()...");
+ PolyPolygon aPolyPoly;
- // Optimize polygons
- for( sal_uInt16 i = 0, nPolyCount = mpImplPolyPolygon->mnCount; i < nPolyCount; i++ )
+ AdaptiveSubdivide(aPolyPoly);
+ aPolyPoly.Optimize(nOptimizeFlags, pData);
+ *this = aPolyPoly;
+ }
+ else
{
+ double fArea;
+ const sal_Bool bEdges = ( nOptimizeFlags & POLY_OPTIMIZE_EDGES ) == POLY_OPTIMIZE_EDGES;
+ sal_uInt16 nPercent = 0;
+
if( bEdges )
{
- mpImplPolyPolygon->mpPolyAry[ i ]->Optimize( POLY_OPTIMIZE_NO_SAME );
- Polygon::ImplReduceEdges( *( mpImplPolyPolygon->mpPolyAry[ i ] ), fArea, nPercent );
+ const Rectangle aBound( GetBoundRect() );
+
+ fArea = ( aBound.GetWidth() + aBound.GetHeight() ) * 0.5;
+ nPercent = pData ? pData->GetPercentValue() : 50;
+ nOptimizeFlags &= ~POLY_OPTIMIZE_EDGES;
}
- if( nOptimizeFlags )
- mpImplPolyPolygon->mpPolyAry[ i ]->Optimize( nOptimizeFlags, pData );
+ // watch for ref counter
+ if( mpImplPolyPolygon->mnRefCount > 1 )
+ {
+ mpImplPolyPolygon->mnRefCount--;
+ mpImplPolyPolygon = new ImplPolyPolygon( *mpImplPolyPolygon );
+ }
+
+ // Optimize polygons
+ for( sal_uInt16 i = 0, nPolyCount = mpImplPolyPolygon->mnCount; i < nPolyCount; i++ )
+ {
+ if( bEdges )
+ {
+ mpImplPolyPolygon->mpPolyAry[ i ]->Optimize( POLY_OPTIMIZE_NO_SAME );
+ Polygon::ImplReduceEdges( *( mpImplPolyPolygon->mpPolyAry[ i ] ), fArea, nPercent );
+ }
+
+ if( nOptimizeFlags )
+ mpImplPolyPolygon->mpPolyAry[ i ]->Optimize( nOptimizeFlags, pData );
+ }
}
}
}
diff --git a/vcl/source/gdi/outdev4.cxx b/vcl/source/gdi/outdev4.cxx
index dba20d3..4dd70e6 100644
--- a/vcl/source/gdi/outdev4.cxx
+++ b/vcl/source/gdi/outdev4.cxx
@@ -1077,40 +1077,39 @@ void OutputDevice::AddHatchActions( const PolyPolygon& rPolyPoly, const Hatch& r
void OutputDevice::ImplDrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch, sal_Bool bMtf )
{
- Rectangle aRect( rPolyPoly.GetBoundRect() );
- const long nLogPixelWidth = ImplDevicePixelToLogicWidth( 1 );
- const long nWidth = ImplDevicePixelToLogicWidth( std::max( ImplLogicWidthToDevicePixel( rHatch.GetDistance() ), 3L ) );
- Point* pPtBuffer = new Point[ HATCH_MAXPOINTS ];
- Point aPt1, aPt2, aEndPt1;
- Size aInc;
-
- // Single hatch
- aRect.Left() -= nLogPixelWidth; aRect.Top() -= nLogPixelWidth; aRect.Right() += nLogPixelWidth; aRect.Bottom() += nLogPixelWidth;
- ImplCalcHatchValues( aRect, nWidth, rHatch.GetAngle(), aPt1, aPt2, aInc, aEndPt1 );
- do
+ if(rPolyPoly.Count())
{
- ImplDrawHatchLine( Line( aPt1, aPt2 ), rPolyPoly, pPtBuffer, bMtf );
- aPt1.X() += aInc.Width(); aPt1.Y() += aInc.Height();
- aPt2.X() += aInc.Width(); aPt2.Y() += aInc.Height();
- }
- while( ( aPt1.X() <= aEndPt1.X() ) && ( aPt1.Y() <= aEndPt1.Y() ) );
+ // #i115630# ImplDrawHatch does not work with beziers included in the polypolygon, take care of that
+ bool bIsCurve(false);
- if( ( rHatch.GetStyle() == HATCH_DOUBLE ) || ( rHatch.GetStyle() == HATCH_TRIPLE ) )
- {
- // Double hatch
- ImplCalcHatchValues( aRect, nWidth, rHatch.GetAngle() + 900, aPt1, aPt2, aInc, aEndPt1 );
- do
+ for(sal_uInt16 a(0); !bIsCurve && a < rPolyPoly.Count(); a++)
{
- ImplDrawHatchLine( Line( aPt1, aPt2 ), rPolyPoly, pPtBuffer, bMtf );
- aPt1.X() += aInc.Width(); aPt1.Y() += aInc.Height();
- aPt2.X() += aInc.Width(); aPt2.Y() += aInc.Height();
+ if(rPolyPoly[a].HasFlags())
+ {
+ bIsCurve = true;
+ }
}
- while( ( aPt1.X() <= aEndPt1.X() ) && ( aPt1.Y() <= aEndPt1.Y() ) );
- if( rHatch.GetStyle() == HATCH_TRIPLE )
+ if(bIsCurve)
{
- // Triple hatch
- ImplCalcHatchValues( aRect, nWidth, rHatch.GetAngle() + 450, aPt1, aPt2, aInc, aEndPt1 );
+ OSL_ENSURE(false, "ImplDrawHatch does *not* support curves, falling back to AdaptiveSubdivide()...");
+ PolyPolygon aPolyPoly;
+
+ rPolyPoly.AdaptiveSubdivide(aPolyPoly);
+ ImplDrawHatch(aPolyPoly, rHatch, bMtf);
+ }
+ else
+ {
+ Rectangle aRect( rPolyPoly.GetBoundRect() );
+ const long nLogPixelWidth = ImplDevicePixelToLogicWidth( 1 );
+ const long nWidth = ImplDevicePixelToLogicWidth( std::max( ImplLogicWidthToDevicePixel( rHatch.GetDistance() ), 3L ) );
+ Point* pPtBuffer = new Point[ HATCH_MAXPOINTS ];
+ Point aPt1, aPt2, aEndPt1;
+ Size aInc;
+
+ // Single hatch
+ aRect.Left() -= nLogPixelWidth; aRect.Top() -= nLogPixelWidth; aRect.Right() += nLogPixelWidth; aRect.Bottom() += nLogPixelWidth;
+ ImplCalcHatchValues( aRect, nWidth, rHatch.GetAngle(), aPt1, aPt2, aInc, aEndPt1 );
do
{
ImplDrawHatchLine( Line( aPt1, aPt2 ), rPolyPoly, pPtBuffer, bMtf );
@@ -1118,10 +1117,36 @@ void OutputDevice::ImplDrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHa
aPt2.X() += aInc.Width(); aPt2.Y() += aInc.Height();
}
while( ( aPt1.X() <= aEndPt1.X() ) && ( aPt1.Y() <= aEndPt1.Y() ) );
+
+ if( ( rHatch.GetStyle() == HATCH_DOUBLE ) || ( rHatch.GetStyle() == HATCH_TRIPLE ) )
+ {
+ // Double hatch
+ ImplCalcHatchValues( aRect, nWidth, rHatch.GetAngle() + 900, aPt1, aPt2, aInc, aEndPt1 );
+ do
+ {
+ ImplDrawHatchLine( Line( aPt1, aPt2 ), rPolyPoly, pPtBuffer, bMtf );
+ aPt1.X() += aInc.Width(); aPt1.Y() += aInc.Height();
+ aPt2.X() += aInc.Width(); aPt2.Y() += aInc.Height();
+ }
+ while( ( aPt1.X() <= aEndPt1.X() ) && ( aPt1.Y() <= aEndPt1.Y() ) );
+
+ if( rHatch.GetStyle() == HATCH_TRIPLE )
+ {
+ // Triple hatch
+ ImplCalcHatchValues( aRect, nWidth, rHatch.GetAngle() + 450, aPt1, aPt2, aInc, aEndPt1 );
+ do
+ {
+ ImplDrawHatchLine( Line( aPt1, aPt2 ), rPolyPoly, pPtBuffer, bMtf );
+ aPt1.X() += aInc.Width(); aPt1.Y() += aInc.Height();
+ aPt2.X() += aInc.Width(); aPt2.Y() += aInc.Height();
+ }
+ while( ( aPt1.X() <= aEndPt1.X() ) && ( aPt1.Y() <= aEndPt1.Y() ) );
+ }
+ }
+
+ delete[] pPtBuffer;
}
}
-
- delete[] pPtBuffer;
}
void OutputDevice::ImplCalcHatchValues( const Rectangle& rRect, long nDist, sal_uInt16 nAngle10,
commit 59cc160f34c214ce1e6474e67ecc566a7faf6864
Author: Ariel Constenla-Haile <arielch at apache.org>
Date: Sun Sep 9 20:47:16 2012 +0000
Resolves: #i120858# Change "Farsi" with "Persian"
Changes done on UI code and IDL, not in comments
(cherry picked from commit fa88b1f1e227ad7530f6595d802a6ed1f5d54cb4)
Conflicts:
scp2/source/ooo/module_langpack.ulf
wizards/com/sun/star/wizards/letter/LocaleCodes.java
Change-Id: I9f66f697789965af79c1ea6db08c8e43f099ddf8
diff --git a/offapi/com/sun/star/linguistic2/XLanguageGuessing.idl b/offapi/com/sun/star/linguistic2/XLanguageGuessing.idl
index f27d086..6a5a63b 100644
--- a/offapi/com/sun/star/linguistic2/XLanguageGuessing.idl
+++ b/offapi/com/sun/star/linguistic2/XLanguageGuessing.idl
@@ -48,7 +48,7 @@ module com { module sun { module star { module linguistic2 {
<li>es : Spanish</li>
<li>et : Estonian</li>
<li>eu : Basque</li>
- <li>fa : Farsi</li>
+ <li>fa : Persian</li>
<li>fi : Finnish</li>
<li>fr : French</li>
<li>fy : Frisian</li>
diff --git a/scp2/source/ooo/module_helppack.ulf b/scp2/source/ooo/module_helppack.ulf
index 011e442..8f2ec4cb 100644
--- a/scp2/source/ooo/module_helppack.ulf
+++ b/scp2/source/ooo/module_helppack.ulf
@@ -446,10 +446,10 @@ en-US = "Kinyarwanda"
en-US = "Installs Kinyarwanda help in %PRODUCTNAME %PRODUCTVERSION"
[STR_NAME_MODULE_HELPPACK_FA]
-en-US = "Farsi"
+en-US = "Persian"
[STR_DESC_MODULE_HELPPACK_FA]
-en-US = "Installs Farsi help in %PRODUCTNAME %PRODUCTVERSION"
+en-US = "Installs Persian help in %PRODUCTNAME %PRODUCTVERSION"
[STR_NAME_MODULE_HELPPACK_TT]
en-US = "Tatar"
diff --git a/scp2/source/ooo/module_langpack.ulf b/scp2/source/ooo/module_langpack.ulf
index 4dd3006..52c7079 100644
--- a/scp2/source/ooo/module_langpack.ulf
+++ b/scp2/source/ooo/module_langpack.ulf
@@ -452,10 +452,10 @@ en-US = "Kinyarwanda"
en-US = "Installs the Kinyarwanda user interface"
[STR_NAME_MODULE_LANGPACK_FA]
-en-US = "Farsi"
+en-US = "Persian"
[STR_DESC_MODULE_LANGPACK_FA]
-en-US = "Installs the Farsi user interface"
+en-US = "Installs the Persian user interface"
[STR_NAME_MODULE_LANGPACK_TT]
en-US = "Tatar"
diff --git a/svtools/source/misc/langtab.src b/svtools/source/misc/langtab.src
index ba4ffd1..849a803 100644
--- a/svtools/source/misc/langtab.src
+++ b/svtools/source/misc/langtab.src
@@ -99,7 +99,7 @@ StringArray STR_ARR_SVT_LANGUAGE_TABLE
< "Estonian" ; LANGUAGE_ESTONIAN ; > ;
< "Finnish" ; LANGUAGE_FINNISH ; > ;
< "Faroese" ; LANGUAGE_FAEROESE ; > ;
- < "Farsi" ; LANGUAGE_FARSI ; > ;
+ < "Persian" ; LANGUAGE_FARSI ; > ;
< "French (France)" ; LANGUAGE_FRENCH ; > ;
< "French (Belgium)" ; LANGUAGE_FRENCH_BELGIAN ; > ;
< "French (Canada)" ; LANGUAGE_FRENCH_CANADIAN ; > ;
commit d586255881ec8e149c099c603249050dcb81ab28
Author: Ariel Constenla-Haile <arielch at apache.org>
Date: Sun Sep 9 19:28:21 2012 +0000
Resolves: #i120859# Advance the wizard when Socket edit field has text
(cherry picked from commit a9c651aa7f7a05049229c0169e439dccde3b4d51)
Change-Id: Ia027dc549e3157eeb7b1d924550ed89122ae1a23
diff --git a/dbaccess/source/ui/dlg/admincontrols.cxx b/dbaccess/source/ui/dlg/admincontrols.cxx
index fd2c978..425d577 100644
--- a/dbaccess/source/ui/dlg/admincontrols.cxx
+++ b/dbaccess/source/ui/dlg/admincontrols.cxx
@@ -159,6 +159,7 @@ namespace dbaui
m_aDatabaseName.SetModifyHdl( _rControlModificationLink );
m_aHostName.SetModifyHdl( _rControlModificationLink );
m_aPort.SetModifyHdl( _rControlModificationLink );
+ m_aSocket.SetModifyHdl( _rControlModificationLink );
m_aNamedPipe.SetModifyHdl( _rControlModificationLink );
m_aSocketRadio.SetToggleHdl( _rControlModificationLink );
m_aNamedPipeRadio.SetToggleHdl( _rControlModificationLink );
commit febce416485db4f7282b4731fb69453525f66595
Author: Sun Ying <sunying at apache.org>
Date: Thu Aug 16 02:28:45 2012 +0000
Resolves: #i119458# fix master's subtitle is modified when save .pot template
Reported by: liupingtan
Patch by: Ying Sun
Review by: Jian Yuan Li(cherry picked from commit a19ed1cba504e1531df54de9131960f9dc2c94f9)
Change-Id: Ied47d7f1421d3e27d8c7ad6529234f188af23787
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index 4d4c3ee..f8f1a78 100644
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -3004,14 +3004,18 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
*mpStrm << (sal_Int16)maRect.Top() << (sal_Int16)maRect.Left() << (sal_Int16)maRect.Right() << (sal_Int16)maRect.Bottom(); // top, left, right, bottom ????
mpPptEscherEx->OpenContainer( ESCHER_ClientData );
mpPptEscherEx->AddAtom( 8, EPP_OEPlaceholderAtom );
+ sal_uInt8 PlaceHolderID = ( mType == "presentation.Subtitle") ? EPP_PLACEHOLDER_MASTERSUBTITLE:EPP_PLACEHOLDER_MASTERBODY;
*mpStrm << (sal_uInt32)1 // PlacementID
- << (sal_uInt8)EPP_PLACEHOLDER_MASTERBODY // PlaceHolderID
+ << PlaceHolderID/*(sal_uInt8)EPP_PLACEHOLDER_MASTERBODY */ // PlaceHolderID
<< (sal_uInt8)0 // Size of PlaceHolder ( 0 = FULL, 1 = HALF, 2 = QUARTER )
<< (sal_uInt16)0; // padword
mpPptEscherEx->CloseContainer(); // ESCHER_ClientData
mpPptEscherEx->OpenContainer( ESCHER_ClientTextbox ); // printf
mpPptEscherEx->AddAtom( 4, EPP_TextHeaderAtom );
- *mpStrm << (sal_uInt32)EPP_TEXTTYPE_Body;
+ if ( mType == "presentation.Subtitle")
+ *mpStrm << (sal_uInt32)EPP_TEXTTYPE_CenterBody;
+ else
+ *mpStrm << (sal_uInt32)EPP_TEXTTYPE_Body;
mnTextSize = aTextObj.Count();
aTextObj.Write( mpStrm );
mpPptEscherEx->BeginAtom();
More information about the Libreoffice-commits
mailing list