diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2010-02-12 16:56:44 +0100 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2010-02-12 16:56:44 +0100 |
commit | db02ac8b89b8ec1e3d84f2676665667916582423 (patch) | |
tree | 55446fdc25ea149952589d200fb6b4224a6996f8 /svx/source | |
parent | ae19e5feff59f578d3f8de6fe9c27f9a57ba63d1 (diff) |
changefileheader2: #i10000#: convert files with CR/LF characters to CR only
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/editeng/editview.cxx | 100 | ||||
-rw-r--r-- | svx/source/editeng/impedit2.cxx | 70 | ||||
-rw-r--r-- | svx/source/form/fmPropBrw.cxx | 36 | ||||
-rw-r--r-- | svx/source/form/legacyformcontroller.cxx | 2 | ||||
-rw-r--r-- | svx/source/sdr/contact/viewcontactofe3dpolygon.cxx | 4 | ||||
-rw-r--r-- | svx/source/sdr/contact/viewobjectcontactofsdrole2obj.cxx | 4 | ||||
-rw-r--r-- | svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx | 14 | ||||
-rw-r--r-- | svx/source/svdraw/svdmrkv.cxx | 6 | ||||
-rw-r--r-- | svx/source/svdraw/svdoashp.cxx | 10 | ||||
-rw-r--r-- | svx/source/svdraw/svdotextdecomposition.cxx | 108 | ||||
-rw-r--r-- | svx/source/unodraw/shapepropertynotifier.cxx | 2 |
11 files changed, 178 insertions, 178 deletions
diff --git a/svx/source/editeng/editview.cxx b/svx/source/editeng/editview.cxx index 3be2e02e9aad..aad54cc16971 100644 --- a/svx/source/editeng/editview.cxx +++ b/svx/source/editeng/editview.cxx @@ -1544,53 +1544,53 @@ bool EditView::ChangeFontSize( bool bGrow, SfxItemSet& rSet, const FontList* pFo return bRet; } -String EditView::GetSurroundingText() const
-{
- DBG_CHKTHIS( EditView, 0 );
- DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
-
- EditSelection aSel( pImpEditView->GetEditSelection() );
- aSel.Adjust( PIMPEE->GetEditDoc() );
-
- if( HasSelection() )
- {
- XubString aStr = PIMPEE->GetSelected( aSel );
-
- // Stop reconversion if the selected text includes a line break.
- if ( aStr.Search( 0x0A ) == STRING_NOTFOUND )
- return aStr;
- else
- return String();
- }
- else
- {
- aSel.Min().SetIndex( 0 );
- aSel.Max().SetIndex( aSel.Max().GetNode()->Len() );
- return PIMPEE->GetSelected( aSel );
- }
-}
-
-Selection EditView::GetSurroundingTextSelection() const
-{
- DBG_CHKTHIS( EditView, 0 );
-
- ESelection aSelection( GetSelection() );
- aSelection.Adjust();
-
- if( HasSelection() )
- {
- EditSelection aSel( pImpEditView->GetEditSelection() );
- aSel.Adjust( PIMPEE->GetEditDoc() );
- XubString aStr = PIMPEE->GetSelected( aSel );
-
- // Stop reconversion if the selected text includes a line break.
- if ( aStr.Search( 0x0A ) == STRING_NOTFOUND )
- return Selection( 0, aSelection.nEndPos - aSelection.nStartPos );
- else
- return Selection( 0, 0 );
- }
- else
- {
- return Selection( aSelection.nStartPos, aSelection.nEndPos );
- }
-}
+String EditView::GetSurroundingText() const +{ + DBG_CHKTHIS( EditView, 0 ); + DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 ); + + EditSelection aSel( pImpEditView->GetEditSelection() ); + aSel.Adjust( PIMPEE->GetEditDoc() ); + + if( HasSelection() ) + { + XubString aStr = PIMPEE->GetSelected( aSel ); + + // Stop reconversion if the selected text includes a line break. + if ( aStr.Search( 0x0A ) == STRING_NOTFOUND ) + return aStr; + else + return String(); + } + else + { + aSel.Min().SetIndex( 0 ); + aSel.Max().SetIndex( aSel.Max().GetNode()->Len() ); + return PIMPEE->GetSelected( aSel ); + } +} + +Selection EditView::GetSurroundingTextSelection() const +{ + DBG_CHKTHIS( EditView, 0 ); + + ESelection aSelection( GetSelection() ); + aSelection.Adjust(); + + if( HasSelection() ) + { + EditSelection aSel( pImpEditView->GetEditSelection() ); + aSel.Adjust( PIMPEE->GetEditDoc() ); + XubString aStr = PIMPEE->GetSelected( aSel ); + + // Stop reconversion if the selected text includes a line break. + if ( aStr.Search( 0x0A ) == STRING_NOTFOUND ) + return Selection( 0, aSelection.nEndPos - aSelection.nStartPos ); + else + return Selection( 0, 0 ); + } + else + { + return Selection( aSelection.nStartPos, aSelection.nEndPos ); + } +} diff --git a/svx/source/editeng/impedit2.cxx b/svx/source/editeng/impedit2.cxx index 4e579cf9c498..1cf22f04e72f 100644 --- a/svx/source/editeng/impedit2.cxx +++ b/svx/source/editeng/impedit2.cxx @@ -638,41 +638,41 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView ) pView->GetWindow()->SetCursorRect(); } } - else if ( rCEvt.GetCommand() == COMMAND_SELECTIONCHANGE )
- {
- const CommandSelectionChangeData *pData = rCEvt.GetSelectionChangeData();
-
- ESelection aSelection = pView->GetSelection();
- aSelection.Adjust();
-
- if( pView->HasSelection() )
- {
- aSelection.nEndPos = aSelection.nStartPos;
- aSelection.nStartPos += pData->GetStart();
- aSelection.nEndPos += pData->GetEnd();
- }
- else
- {
- aSelection.nStartPos = pData->GetStart();
- aSelection.nEndPos = pData->GetEnd();
- }
- pView->SetSelection( aSelection );
- }
- else if ( rCEvt.GetCommand() == COMMAND_PREPARERECONVERSION )
- {
- if ( pView->HasSelection() )
- {
- ESelection aSelection = pView->GetSelection();
- aSelection.Adjust();
-
- if ( aSelection.nStartPara != aSelection.nEndPara )
- {
- xub_StrLen aParaLen = pEditEngine->GetTextLen( aSelection.nStartPara );
- aSelection.nEndPara = aSelection.nStartPara;
- aSelection.nEndPos = aParaLen;
- pView->SetSelection( aSelection );
- }
- }
+ else if ( rCEvt.GetCommand() == COMMAND_SELECTIONCHANGE ) + { + const CommandSelectionChangeData *pData = rCEvt.GetSelectionChangeData(); + + ESelection aSelection = pView->GetSelection(); + aSelection.Adjust(); + + if( pView->HasSelection() ) + { + aSelection.nEndPos = aSelection.nStartPos; + aSelection.nStartPos += pData->GetStart(); + aSelection.nEndPos += pData->GetEnd(); + } + else + { + aSelection.nStartPos = pData->GetStart(); + aSelection.nEndPos = pData->GetEnd(); + } + pView->SetSelection( aSelection ); + } + else if ( rCEvt.GetCommand() == COMMAND_PREPARERECONVERSION ) + { + if ( pView->HasSelection() ) + { + ESelection aSelection = pView->GetSelection(); + aSelection.Adjust(); + + if ( aSelection.nStartPara != aSelection.nEndPara ) + { + xub_StrLen aParaLen = pEditEngine->GetTextLen( aSelection.nStartPara ); + aSelection.nEndPara = aSelection.nStartPara; + aSelection.nEndPos = aParaLen; + pView->SetSelection( aSelection ); + } + } } GetSelEngine().Command( rCEvt ); diff --git a/svx/source/form/fmPropBrw.cxx b/svx/source/form/fmPropBrw.cxx index 341ae61cd904..5e4f30bd7c83 100644 --- a/svx/source/form/fmPropBrw.cxx +++ b/svx/source/form/fmPropBrw.cxx @@ -28,20 +28,20 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#include "fmhelp.hrc"
-#include "fmprop.hrc"
+#include "fmhelp.hrc" +#include "fmprop.hrc" #include "fmPropBrw.hxx" #include "fmresids.hrc" #include "fmservs.hxx" -#include "fmshimp.hxx"
-#include "fmpgeimp.hxx"
+#include "fmshimp.hxx" +#include "fmpgeimp.hxx" -#include "svx/dialmgr.hxx"
-#include "svx/fmpage.hxx"
-#include "svx/fmshell.hxx"
-#include "svx/sdrpagewindow.hxx"
-#include "svx/svdpagv.hxx"
-#include "svx/svxids.hrc"
+#include "svx/dialmgr.hxx" +#include "svx/fmpage.hxx" +#include "svx/fmshell.hxx" +#include "svx/sdrpagewindow.hxx" +#include "svx/svdpagv.hxx" +#include "svx/svxids.hrc" /** === begin UNO includes === **/ #include <com/sun/star/beans/PropertyValue.hpp> @@ -60,20 +60,20 @@ /** === end UNO includes === **/ #include <comphelper/processfactory.hxx> -#include <comphelper/property.hxx>
+#include <comphelper/property.hxx> #include <cppuhelper/component_context.hxx> #include <sfx2/bindings.hxx> #include <sfx2/childwin.hxx> -#include <sfx2/dispatch.hxx>
+#include <sfx2/dispatch.hxx> #include <sfx2/objitem.hxx> -#include <sfx2/objsh.hxx>
-#include <sfx2/viewfrm.hxx>
+#include <sfx2/objsh.hxx> +#include <sfx2/viewfrm.hxx> #include <toolkit/unohlp.hxx> -#include <tools/debug.hxx>
-#include <tools/diagnose_ex.h>
-#include <tools/shl.hxx>
+#include <tools/debug.hxx> +#include <tools/diagnose_ex.h> +#include <tools/shl.hxx> #include <unotools/confignode.hxx> -#include <vcl/stdtext.hxx>
+#include <vcl/stdtext.hxx> #include <algorithm> diff --git a/svx/source/form/legacyformcontroller.cxx b/svx/source/form/legacyformcontroller.cxx index d3c2e465e7f8..0908ae8af953 100644 --- a/svx/source/form/legacyformcontroller.cxx +++ b/svx/source/form/legacyformcontroller.cxx @@ -23,7 +23,7 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -
+ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" diff --git a/svx/source/sdr/contact/viewcontactofe3dpolygon.cxx b/svx/source/sdr/contact/viewcontactofe3dpolygon.cxx index 9a4f6cdc41af..393353249d86 100644 --- a/svx/source/sdr/contact/viewcontactofe3dpolygon.cxx +++ b/svx/source/sdr/contact/viewcontactofe3dpolygon.cxx @@ -71,8 +71,8 @@ namespace sdr basegfx::B3DPolyPolygon aPolyPolygon3D(GetE3dPolygonObj().GetPolyPolygon3D()); const basegfx::B3DPolyPolygon aPolyNormals3D(GetE3dPolygonObj().GetPolyNormals3D()); const basegfx::B2DPolyPolygon aPolyTexture2D(GetE3dPolygonObj().GetPolyTexture2D()); - const bool bNormals(aPolyNormals3D.count() && aPolyNormals3D.count() == aPolyPolygon3D.count());
- const bool bTexture(aPolyTexture2D.count() && aPolyTexture2D.count() == aPolyPolygon3D.count());
+ const bool bNormals(aPolyNormals3D.count() && aPolyNormals3D.count() == aPolyPolygon3D.count()); + const bool bTexture(aPolyTexture2D.count() && aPolyTexture2D.count() == aPolyPolygon3D.count()); if(bNormals || bTexture) { diff --git a/svx/source/sdr/contact/viewobjectcontactofsdrole2obj.cxx b/svx/source/sdr/contact/viewobjectcontactofsdrole2obj.cxx index c2b460088b03..4b22ec562e6d 100644 --- a/svx/source/sdr/contact/viewobjectcontactofsdrole2obj.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofsdrole2obj.cxx @@ -38,8 +38,8 @@ #include <drawinglayer/attribute/fillattribute.hxx> #include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx> #include <basegfx/polygon/b2dpolygontools.hxx> -#include <com/sun/star/embed/EmbedMisc.hpp>
-#include <com/sun/star/embed/EmbedStates.hpp>
+#include <com/sun/star/embed/EmbedMisc.hpp> +#include <com/sun/star/embed/EmbedStates.hpp> ////////////////////////////////////////////////////////////////////////////// diff --git a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx index 165b103120e7..170baf5c3a1a 100644 --- a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx @@ -117,13 +117,13 @@ namespace drawinglayer mbContainsOtherFields(false) { const EditTextObject& rETO = maOutlinerParaObject.GetTextObject(); -
- mbContainsPageField = rETO.HasField(SvxPageField::StaticType());
- mbContainsPageCountField = rETO.HasField(SvxPagesField::StaticType());
- mbContainsOtherFields = rETO.HasField(SvxHeaderField::StaticType())
- || rETO.HasField(SvxFooterField::StaticType())
- || rETO.HasField(SvxDateTimeField::StaticType())
- || rETO.HasField(SvxAuthorField::StaticType());
+ + mbContainsPageField = rETO.HasField(SvxPageField::StaticType()); + mbContainsPageCountField = rETO.HasField(SvxPagesField::StaticType()); + mbContainsOtherFields = rETO.HasField(SvxHeaderField::StaticType()) + || rETO.HasField(SvxFooterField::StaticType()) + || rETO.HasField(SvxDateTimeField::StaticType()) + || rETO.HasField(SvxAuthorField::StaticType()); } bool SdrTextPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index 43e6182a6eee..b9598cef4ceb 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -206,9 +206,9 @@ void __EXPORT SdrMarkView::Notify(SfxBroadcaster& rBC, const SfxHint& rHint) bMarkedPointsRectsDirty=TRUE; } /* removed for now since this breaks existing code who iterates over the mark list and sequentially replaces objects - if( eKind==HINT_OBJREMOVED && IsObjMarked( const_cast<SdrObject*>(pSdrHint->GetObject()) ) )
- {
- MarkObj( const_cast<SdrObject*>(pSdrHint->GetObject()), GetSdrPageView(), TRUE );
+ if( eKind==HINT_OBJREMOVED && IsObjMarked( const_cast<SdrObject*>(pSdrHint->GetObject()) ) ) + { + MarkObj( const_cast<SdrObject*>(pSdrHint->GetObject()), GetSdrPageView(), TRUE ); } */ } diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index e72aa8bcabbf..3147c0f9708a 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -1671,11 +1671,11 @@ void SdrObjCustomShape::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const } } -void SdrObjCustomShape::SetModel(SdrModel* pNewModel)
-{
- SdrTextObj::SetModel(pNewModel);
- mXRenderedCustomShape.clear();
-}
+void SdrObjCustomShape::SetModel(SdrModel* pNewModel) +{ + SdrTextObj::SetModel(pNewModel); + mXRenderedCustomShape.clear(); +} UINT16 SdrObjCustomShape::GetObjIdentifier() const { diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index 3b26662dba33..b281c6c23e42 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -90,10 +90,10 @@ namespace // the visible area for contour text decomposition basegfx::B2DVector maScale; - // #SJ# ClipRange for BlockText decomposition; only text portions completely
- // inside are to be accepted, so this is different from geometric clipping
- // (which would allow e.g. upper parts of portions to remain). Only used for
- // BlockText (see there)
+ // #SJ# ClipRange for BlockText decomposition; only text portions completely + // inside are to be accepted, so this is different from geometric clipping + // (which would allow e.g. upper parts of portions to remain). Only used for + // BlockText (see there) basegfx::B2DRange maClipRange; DECL_LINK(decomposeContourTextPrimitive, DrawPortionInfo* ); @@ -115,12 +115,12 @@ namespace public: impTextBreakupHandler(SdrOutliner& rOutliner) : maTextPortionPrimitives(), - maLinePrimitives(),
- maParagraphPrimitives(),
- mrOutliner(rOutliner),
- maNewTransformA(),
- maNewTransformB(),
- maScale(),
+ maLinePrimitives(), + maParagraphPrimitives(), + mrOutliner(rOutliner), + maNewTransformA(), + maNewTransformB(), + maScale(), maClipRange() { } @@ -573,43 +573,43 @@ namespace { if(pInfo) { - // #SJ# Is clipping wanted? This is text clipping; only accept a portion
- // if it's completely in the range
- if(!maClipRange.isEmpty())
- {
- // Test start position first; this allows to not get the text range at
- // all if text is far outside
- const basegfx::B2DPoint aStartPosition(pInfo->mrStartPos.X(), pInfo->mrStartPos.Y());
-
- if(!maClipRange.isInside(aStartPosition))
- {
- return 0;
- }
-
- // Start position is inside. Get TextBoundRect and TopLeft next
- drawinglayer::primitive2d::TextLayouterDevice aTextLayouterDevice;
- aTextLayouterDevice.setFont(pInfo->mrFont);
-
- const basegfx::B2DRange aTextBoundRect(
- aTextLayouterDevice.getTextBoundRect(
- pInfo->mrText, pInfo->mnTextStart, pInfo->mnTextLen));
- const basegfx::B2DPoint aTopLeft(aTextBoundRect.getMinimum() + aStartPosition);
-
- if(!maClipRange.isInside(aTopLeft))
- {
- return 0;
- }
-
- // TopLeft is inside. Get BottomRight and check
- const basegfx::B2DPoint aBottomRight(aTextBoundRect.getMaximum() + aStartPosition);
-
- if(!maClipRange.isInside(aBottomRight))
- {
- return 0;
- }
-
- // all inside, clip was successful
- }
+ // #SJ# Is clipping wanted? This is text clipping; only accept a portion + // if it's completely in the range + if(!maClipRange.isEmpty()) + { + // Test start position first; this allows to not get the text range at + // all if text is far outside + const basegfx::B2DPoint aStartPosition(pInfo->mrStartPos.X(), pInfo->mrStartPos.Y()); + + if(!maClipRange.isInside(aStartPosition)) + { + return 0; + } + + // Start position is inside. Get TextBoundRect and TopLeft next + drawinglayer::primitive2d::TextLayouterDevice aTextLayouterDevice; + aTextLayouterDevice.setFont(pInfo->mrFont); + + const basegfx::B2DRange aTextBoundRect( + aTextLayouterDevice.getTextBoundRect( + pInfo->mrText, pInfo->mnTextStart, pInfo->mnTextLen)); + const basegfx::B2DPoint aTopLeft(aTextBoundRect.getMinimum() + aStartPosition); + + if(!maClipRange.isInside(aTopLeft)) + { + return 0; + } + + // TopLeft is inside. Get BottomRight and check + const basegfx::B2DPoint aBottomRight(aTextBoundRect.getMaximum() + aStartPosition); + + if(!maClipRange.isInside(aBottomRight)) + { + return 0; + } + + // all inside, clip was successful + } impHandleDrawPortionInfo(*pInfo); } @@ -918,13 +918,13 @@ void SdrTextObj::impDecomposeBlockTextPrimitive( bMirrorX ? -1.0 : 1.0, bMirrorY ? -1.0 : 1.0, fShearX, fRotate, aTranslate.getX(), aTranslate.getY())); - // #SJ# create ClipRange (if needed)
- basegfx::B2DRange aClipRange;
-
- if(rSdrBlockTextPrimitive.getClipOnBounds())
- {
- aClipRange.expand(-aAdjOffset);
- aClipRange.expand(basegfx::B2DTuple(aAnchorTextSize.Width(), aAnchorTextSize.Height()) - aAdjOffset);
+ // #SJ# create ClipRange (if needed) + basegfx::B2DRange aClipRange; + + if(rSdrBlockTextPrimitive.getClipOnBounds()) + { + aClipRange.expand(-aAdjOffset); + aClipRange.expand(basegfx::B2DTuple(aAnchorTextSize.Width(), aAnchorTextSize.Height()) - aAdjOffset); } // now break up text primitives. diff --git a/svx/source/unodraw/shapepropertynotifier.cxx b/svx/source/unodraw/shapepropertynotifier.cxx index 30323073a745..408587d31822 100644 --- a/svx/source/unodraw/shapepropertynotifier.cxx +++ b/svx/source/unodraw/shapepropertynotifier.cxx @@ -23,7 +23,7 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -
+ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" |