[Libreoffice-commits] .: 2 commits - svx/source
Thomas Arnhold
tarnhold at kemper.freedesktop.org
Mon Feb 21 14:24:42 PST 2011
svx/source/accessibility/AccessibleFrameSelector.cxx | 5 ---
svx/source/accessibility/AccessibleShape.cxx | 23 ----------------
svx/source/accessibility/AccessibleTextHelper.cxx | 8 -----
svx/source/accessibility/GraphCtlAccessibleContext.cxx | 4 --
svx/source/accessibility/ShapeTypeHandler.cxx | 1
svx/source/accessibility/charmapacc.cxx | 4 +-
svx/source/accessibility/svxrectctaccessiblecontext.cxx | 3 --
svx/source/customshapes/EnhancedCustomShape2d.cxx | 11 -------
svx/source/customshapes/EnhancedCustomShape3d.cxx | 13 +--------
svx/source/customshapes/EnhancedCustomShapeFontWork.cxx | 5 ---
svx/source/customshapes/tbxcustomshapes.cxx | 12 ++++----
11 files changed, 11 insertions(+), 78 deletions(-)
New commits:
commit 4492b8c9476766239eedd2a4957cca7e18e4d194
Author: Albert Thuswaldner <albert.thuswaldner at gmail.com>
Date: Mon Feb 21 23:24:41 2011 +0100
Remove dead code and translate German comments
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index 2dfdb50..7e5f9d6 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -462,7 +462,6 @@ sal_Bool EnhancedCustomShape2d::ConvertSequenceToEnhancedCustomShape2dHandle(
const rtl::OUString sMirroredY ( RTL_CONSTASCII_USTRINGPARAM( "MirroredY" ) );
const rtl::OUString sSwitched ( RTL_CONSTASCII_USTRINGPARAM( "Switched" ) );
const rtl::OUString sPolar ( RTL_CONSTASCII_USTRINGPARAM( "Polar" ) );
-// const rtl::OUString sMap ( RTL_CONSTASCII_USTRINGPARAM( "Map" ) );
const rtl::OUString sRefX ( RTL_CONSTASCII_USTRINGPARAM( "RefX" ) );
const rtl::OUString sRefY ( RTL_CONSTASCII_USTRINGPARAM( "RefY" ) );
const rtl::OUString sRefAngle ( RTL_CONSTASCII_USTRINGPARAM( "RefAngle" ) );
@@ -2140,8 +2139,6 @@ SdrObject* EnhancedCustomShape2d::CreateObject( sal_Bool bLineGeometryNeededOnly
if ( eSpType == mso_sptRectangle )
{
pRet = new SdrRectObj( aLogicRect );
-// SJ: not setting model, so we save a lot of broadcasting and the model is not modified any longer
-// pRet->SetModel( pCustomShapeObj->GetModel() );
pRet->SetMergedItemSet( *this );
}
if ( !pRet )
@@ -2161,14 +2158,6 @@ void EnhancedCustomShape2d::ApplyGluePoints( SdrObject* pObj )
aGluePoint.SetPos( GetPoint( seqGluePoints[ i ], sal_True, sal_True ) );
aGluePoint.SetPercent( sal_False );
-
-// const Point& rPoint = GetPoint( seqGluePoints[ i ], sal_True, sal_True );
-// double fXRel = rPoint.X();
-// double fYRel = rPoint.Y();
-// fXRel = aLogicRect.GetWidth() == 0 ? 0.0 : fXRel / aLogicRect.GetWidth() * 10000;
-// fYRel = aLogicRect.GetHeight() == 0 ? 0.0 : fYRel / aLogicRect.GetHeight() * 10000;
-// aGluePoint.SetPos( Point( (sal_Int32)fXRel, (sal_Int32)fYRel ) );
-// aGluePoint.SetPercent( sal_True );
aGluePoint.SetAlign( SDRVERTALIGN_TOP | SDRHORZALIGN_LEFT );
aGluePoint.SetEscDir( SDRESC_SMART );
SdrGluePointList* pList = pObj->ForceGluePointList();
diff --git a/svx/source/customshapes/EnhancedCustomShape3d.cxx b/svx/source/customshapes/EnhancedCustomShape3d.cxx
index 6593e75..8276e78 100644
--- a/svx/source/customshapes/EnhancedCustomShape3d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape3d.cxx
@@ -346,8 +346,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con
if ( pAny )
*pAny >>= eProjectionMode;
ProjectionType eProjectionType( eProjectionMode == drawing::ProjectionMode_PARALLEL ? PR_PARALLEL : PR_PERSPECTIVE );
-
- // pShape2d Umwandeln in Szene mit 3D Objekt
+ // pShape2d Convert in scenes which include 3D Objects
E3dDefaultAttributes a3DDefaultAttr;
a3DDefaultAttr.SetDefaultLatheCharacterMode( TRUE );
a3DDefaultAttr.SetDefaultExtrudeCharacterMode( TRUE );
@@ -508,7 +507,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con
// then we can change the return value
pRet = pScene;
- // Kameraeinstellungen, Perspektive ...
+ // Camera settings, Perspective ...
Camera3D& rCamera = (Camera3D&)pScene->GetCamera();
const basegfx::B3DRange& rVolume = pScene->GetBoundVolume();
pScene->NbcSetSnapRect( aSnapRect );
@@ -713,14 +712,6 @@ Rectangle EnhancedCustomShape3d::CalculateNewSnapRect( const SdrObject* pCustomS
drawing::Direction3D aRotationCenterDefault( 0, 0, 0 ); // default seems to be wrong, a fractional size of shape has to be used!!
drawing::Direction3D aRotationCenter( GetDirection3D( rGeometryItem, sRotationCenter, aRotationCenterDefault ) );
- // double XCenterInGUnits = rPropSet.GetPropertyValue( DFF_Prop_c3DRotationCenterX, 0 );
- // double YCenterInGUnits = rPropSet.GetPropertyValue( DFF_Prop_c3DRotationCenterY, 0 );
-
- // sal_Int32 nRotationXAxisInProz = rPropSet.GetPropertyValue( DFF_Prop_c3DRotationAxisX, 100 );
- // sal_Int32 nRotationYAxisInProz = rPropSet.GetPropertyValue( DFF_Prop_c3DRotationAxisY, 0 );
- // sal_Int32 nRotationZAxisInProz = rPropSet.GetPropertyValue( DFF_Prop_c3DRotationAxisZ, 0 );
-
-
double fXRotate, fYRotate;
GetRotateAngle( rGeometryItem, fXRotate, fYRotate );
double fZRotate = - ((SdrObjCustomShape*)pCustomShape)->GetObjectRotation() * F_PI180;
diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
index 23cfd5b..957f24c 100644
--- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
@@ -260,7 +260,6 @@ void GetTextAreaOutline( const FWData& rFWData, const SdrObject* pCustomShape, F
Font aFont;
aFont.SetHeight( rFWData.nSingleLineHeight );
aFont.SetAlign( ALIGN_TOP );
- // aFont.SetAlign( )
aFont.SetName( rFontItem.GetFamilyName() );
aFont.SetFamily( rFontItem.GetFamily() );
@@ -797,8 +796,6 @@ SdrObject* CreateSdrObjectFromParagraphOutlines( const FWData& rFWData, const Sd
if ( rFWData.vTextAreas.size() )
{
pRet = new SdrObjGroup();
-// SJ: not setting model, so we save a lot of broadcasting and the model is not modified any longer
-// pRet->SetModel( pCustomShape->GetModel() );
std::vector< FWTextArea >::const_iterator aTextAreaIter = rFWData.vTextAreas.begin();
std::vector< FWTextArea >::const_iterator aTextAreaIEnd = rFWData.vTextAreas.end();
while ( aTextAreaIter != aTextAreaIEnd )
@@ -816,8 +813,6 @@ SdrObject* CreateSdrObjectFromParagraphOutlines( const FWData& rFWData, const Sd
while( aOutlineIter != aOutlineIEnd )
{
SdrObject* pPathObj = new SdrPathObj( OBJ_POLY, aOutlineIter->getB2DPolyPolygon() );
- // SJ: not setting model, so we save a lot of broadcasting and the model is not modified any longer
- // pPathObj->SetModel( pCustomShape->GetModel() );
((SdrObjGroup*)pRet)->GetSubList()->NbcInsertObject( pPathObj );
++aOutlineIter;
}
diff --git a/svx/source/customshapes/tbxcustomshapes.cxx b/svx/source/customshapes/tbxcustomshapes.cxx
index 4175542..49ff258 100644
--- a/svx/source/customshapes/tbxcustomshapes.cxx
+++ b/svx/source/customshapes/tbxcustomshapes.cxx
@@ -108,7 +108,7 @@ SvxTbxCtlCustomShapes::SvxTbxCtlCustomShapes( USHORT nSlotId, USHORT nId, ToolBo
/*************************************************************************
|*
-|* Benachrichtigung, wenn sich der Applikationsstatus geaendert hat
+|* Notification when the application status has changed
|*
\************************************************************************/
@@ -120,7 +120,7 @@ void SvxTbxCtlCustomShapes::StateChanged( USHORT nSID, SfxItemState eState,
/*************************************************************************
|*
-|* Wenn man ein PopupWindow erzeugen will
+|* when one wants to create a popup window
|*
\************************************************************************/
@@ -131,9 +131,9 @@ SfxPopupWindowType SvxTbxCtlCustomShapes::GetPopupWindowType() const
/*************************************************************************
|*
-|* Hier wird das Fenster erzeugt
-|* Lage der Toolbox mit GetToolBox() abfragbar
-|* rItemRect sind die Screen-Koordinaten
+|* Here is the window created
+|* The location of the Toolbox is queried through GetToolBox()
+|* rItemRect are the screen coordinates
|*
\************************************************************************/
@@ -157,7 +157,7 @@ void SvxTbxCtlCustomShapes::Select( BOOL /*bMod1*/ )
::sal_Bool SAL_CALL SvxTbxCtlCustomShapes::opensSubToolbar() throw (::com::sun::star::uno::RuntimeException)
{
- // We control a sub-toolbar therefor, we have to return true.
+ // We control a sub-toolbar therefore we have to return true.
return sal_True;
}
commit 54e2345561ed55f73b4b82c7b6c1b2d49d4ae766
Author: Albert Thuswaldner <albert.thuswaldner at gmail.com>
Date: Mon Feb 21 23:15:14 2011 +0100
Remove dead code and translate one comment
diff --git a/svx/source/accessibility/AccessibleFrameSelector.cxx b/svx/source/accessibility/AccessibleFrameSelector.cxx
index dfb7e81..6cbf923 100644
--- a/svx/source/accessibility/AccessibleFrameSelector.cxx
+++ b/svx/source/accessibility/AccessibleFrameSelector.cxx
@@ -625,12 +625,7 @@ void AccFrameSelector::NotifyFocusListeners(sal_Bool bGetFocus)
aEvent.FocusFlags |= AwtFocusChangeReason::AROUND;
if(nFocusFlags&GETFOCUS_UNIQUEMNEMONIC)
aEvent.FocusFlags |= AwtFocusChangeReason::UNIQUEMNEMONIC;
- // if(nFocusFlags&GETFOCUS_INIT)
- // aEvent.FocusFlags |= AwtFocusChangeReason::
}
-// else
- //how can I find the current focus window?
-// aEvent.NextFocus = ;
aEvent.Temporary = sal_False;
Reference < XAccessibleContext > xThis( this );
diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx
index fc696b5..5682ada 100644
--- a/svx/source/accessibility/AccessibleShape.cxx
+++ b/svx/source/accessibility/AccessibleShape.cxx
@@ -569,27 +569,6 @@ awt::Rectangle SAL_CALL AccessibleShape::getBounds (void)
int x = aPixelPosition.getX() - aParentLocation.X;
int y = aPixelPosition.getY() - aParentLocation.Y;
- /* // The following block is a workarround for bug #99889# (property
- // BoundRect returnes coordinates relative to document window
- // instead of absolute coordinates for shapes in Writer). Has to
- // be removed as soon as bug is fixed.
-
- // Use a non-null anchor position as flag that the shape is in a
- // Writer document.
- if (xSetInfo.is())
- if (xSetInfo->hasPropertyByName (sAnchorPositionName))
- {
- uno::Any aPos = xSet->getPropertyValue (sAnchorPositionName);
- awt::Point aAnchorPosition;
- aPos >>= aAnchorPosition;
- if (aAnchorPosition.X > 0)
- {
- x = aPixelPosition.getX();
- y = aPixelPosition.getY();
- }
- }
- // End of workarround.
- */
// Clip with parent (with coordinates relative to itself).
::Rectangle aBBox (
x, y, x + aPixelSize.getWidth(), y + aPixelSize.getHeight());
@@ -845,8 +824,6 @@ uno::Sequence<uno::Type> SAL_CALL
::getCppuType((const uno::Reference<document::XEventListener>*)0);
const uno::Type aUnoTunnelType =
::getCppuType((const uno::Reference<lang::XUnoTunnel>*)0);
- // const uno::Type aStateSetType =
- // ::getCppuType((const uno::Reference<XAccessibleStateSet>*)0);
// ... and merge them all into one list.
sal_Int32 nTypeCount (aTypeList.getLength()),
diff --git a/svx/source/accessibility/AccessibleTextHelper.cxx b/svx/source/accessibility/AccessibleTextHelper.cxx
index 1f50794..84a2f08 100644
--- a/svx/source/accessibility/AccessibleTextHelper.cxx
+++ b/svx/source/accessibility/AccessibleTextHelper.cxx
@@ -683,14 +683,6 @@ namespace accessibility
else if ( maLastSelection.HasRange() &&
aSelection.HasRange() )
{
- // send event TEXT_SELECTION_CHANGED for difference
- // between last and new selection. (#i27299#)
-// // selection was on, now is different: take union of ranges
-// maParaManager.FireEvent( ::std::min(sortedSelection.first,
-// sortedLastSelection.second),
-// ::std::max(sortedSelection.first,
-// sortedLastSelection.second)+1,
-// nTextSelChgEventId );
// use sorted last and new selection
ESelection aTmpLastSel( maLastSelection );
aTmpLastSel.Adjust();
diff --git a/svx/source/accessibility/GraphCtlAccessibleContext.cxx b/svx/source/accessibility/GraphCtlAccessibleContext.cxx
index 0e60765..1d05ca3 100644
--- a/svx/source/accessibility/GraphCtlAccessibleContext.cxx
+++ b/svx/source/accessibility/GraphCtlAccessibleContext.cxx
@@ -432,8 +432,6 @@ Reference< XAccessibleStateSet > SAL_CALL SvxGraphCtrlAccessibleContext::getAcce
}
else
{
- // pStateSetHelper->AddState( AccessibleStateType::ENABLED );
- // pStateSetHelper->AddState( AccessibleStateType::SENSITIVE );
pStateSetHelper->AddState( AccessibleStateType::FOCUSABLE );
if( mpControl->HasFocus() )
pStateSetHelper->AddState( AccessibleStateType::FOCUSED );
@@ -949,7 +947,7 @@ void SvxGraphCtrlAccessibleContext::Notify( SfxBroadcaster& /*rBC*/, const SfxHi
{
const SfxSimpleHint* pSfxHint = PTR_CAST(SfxSimpleHint, &rHint );
- // ist unser SdDrawDocument gerade gestorben?
+ // Has our SdDrawDocument just died?
if(pSfxHint && pSfxHint->GetId() == SFX_HINT_DYING)
{
dispose();
diff --git a/svx/source/accessibility/ShapeTypeHandler.cxx b/svx/source/accessibility/ShapeTypeHandler.cxx
index 9952496..3103305 100644
--- a/svx/source/accessibility/ShapeTypeHandler.cxx
+++ b/svx/source/accessibility/ShapeTypeHandler.cxx
@@ -94,7 +94,6 @@ ShapeTypeId ShapeTypeHandler::GetTypeId (const OUString& aServiceName) const
tServiceNameToSlotId::iterator I (maServiceNameToSlotId.find (aServiceName));
if (I != maServiceNameToSlotId.end())
{
- // long nSlotId = maServiceNameToSlotId[aServiceName];
return maShapeTypeDescriptorList[I->second].mnShapeTypeId;
}
else
diff --git a/svx/source/accessibility/charmapacc.cxx b/svx/source/accessibility/charmapacc.cxx
index f758115..8cee0d8 100644
--- a/svx/source/accessibility/charmapacc.cxx
+++ b/svx/source/accessibility/charmapacc.cxx
@@ -60,7 +60,7 @@ SvxShowCharSetVirtualAcc::SvxShowCharSetVirtualAcc( SvxShowCharSet* pParent ) :
,m_pTable(NULL)
{
osl_incrementInterlockedCount(&m_refCount);
- { // #b6211265 #
+ {
lateInit(this);
}
osl_decrementInterlockedCount(&m_refCount);
@@ -301,7 +301,7 @@ SvxShowCharSetAcc::SvxShowCharSetAcc( SvxShowCharSetVirtualAcc* _pParent ) : OAc
,m_pParent( _pParent )
{
osl_incrementInterlockedCount(&m_refCount);
- { // #b6211265 #
+ {
lateInit(this);
}
osl_decrementInterlockedCount(&m_refCount);
diff --git a/svx/source/accessibility/svxrectctaccessiblecontext.cxx b/svx/source/accessibility/svxrectctaccessiblecontext.cxx
index 2b02a99..3cfd980 100644
--- a/svx/source/accessibility/svxrectctaccessiblecontext.cxx
+++ b/svx/source/accessibility/svxrectctaccessiblecontext.cxx
@@ -389,8 +389,6 @@ Reference< XAccessibleStateSet > SAL_CALL SvxRectCtlAccessibleContext::getAccess
if( IsAlive() )
{
- // pStateSetHelper->AddState( AccessibleStateType::ENABLED );
- // pStateSetHelper->AddState( AccessibleStateType::SENSITIVE );
pStateSetHelper->AddState( AccessibleStateType::FOCUSABLE );
if( mpRepr->HasFocus() )
pStateSetHelper->AddState( AccessibleStateType::FOCUSED );
@@ -846,7 +844,6 @@ Reference< XAccessibleContext> SAL_CALL SvxRectCtlChildAccessibleContext::getAcc
sal_Bool SAL_CALL SvxRectCtlChildAccessibleContext::containsPoint( const awt::Point& rPoint ) throw( RuntimeException )
{
// no guard -> done in getBounds()
-// return GetBoundingBox().IsInside( VCLPoint( rPoint ) );
return Rectangle( Point( 0, 0 ), GetBoundingBox().GetSize() ).IsInside( VCLPoint( rPoint ) );
}
More information about the Libreoffice-commits
mailing list