This is an automated email from the ASF dual-hosted git repository. mseidel pushed a commit to branch AOO42X in repository https://gitbox.apache.org/repos/asf/openoffice.git
The following commit(s) were added to refs/heads/AOO42X by this push: new 2ada1115e4 Fixed typo (chnage -> change), general cleanup 2ada1115e4 is described below commit 2ada1115e4e0d34c6b84df3d8e11554b7b3b4ddf Author: mseidel <msei...@apache.org> AuthorDate: Sun Aug 11 11:27:55 2024 +0200 Fixed typo (chnage -> change), general cleanup (cherry picked from commit 721f84f292c13ee103c3eff117eb0ad9b2066153) --- main/sc/source/ui/view/preview.cxx | 19 ++++---- main/sd/source/ui/view/sdwindow.cxx | 32 ++++++------- main/svtools/source/filter/wmf/enhwmf.cxx | 50 +++++++++++---------- main/sw/source/core/fields/expfld.cxx | 61 +++++++++++++------------ main/sw/source/ui/docvw/edtwin.cxx | 74 +++++++++++++++---------------- main/sw/source/ui/uiview/pview.cxx | 40 ++++++++--------- 6 files changed, 138 insertions(+), 138 deletions(-) diff --git a/main/sc/source/ui/view/preview.cxx b/main/sc/source/ui/view/preview.cxx index 02ee2daf3f..a72de4c026 100644 --- a/main/sc/source/ui/view/preview.cxx +++ b/main/sc/source/ui/view/preview.cxx @@ -1,5 +1,5 @@ /************************************************************** - * + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -7,25 +7,22 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - * + * *************************************************************/ - - // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sc.hxx" - // INCLUDE --------------------------------------------------------------- #include <tools/pstm.hxx> #include "scitems.hxx" @@ -57,7 +54,7 @@ #include "drwlayer.hxx" #include "scmod.hxx" #include "globstr.hrc" -#include "sc.hrc" // fuer ShellInvalidate +#include "sc.hrc" // for ShellInvalidate #include "AccessibleDocumentPagePreview.hxx" #include <vcl/lineinfo.hxx> #include <svx/algitem.hxx> @@ -1487,7 +1484,7 @@ com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessible> ScPre return xAcc; } // MT: Removed Windows::SwitchView() introduced with IA2 CWS. -// There are other notifications for this when the active view has chnaged, so please update the code to use that event mechanism +// There are other notifications for this when the active view has changed, so please update the code to use that event mechanism void ScPreview::SwitchView() { if (!Application::IsAccessibilityEnabled()) @@ -1498,7 +1495,7 @@ void ScPreview::SwitchView() if (pAccDoc) { pAccDoc->SwitchViewFireFocus(); - } + } } //Issue51656 Add resizeable margin on page preview from maoyg void ScPreview::DragMove( long nDragMovePos, sal_uInt16 nFlags ) @@ -1544,3 +1541,5 @@ void ScPreview::DrawInvert( long nDragPos, sal_uInt16 nFlags ) } } //Issue51656 Add resizeable margin on page preview from maoyg + +/* vim: set noet sw=4 ts=4: */ diff --git a/main/sd/source/ui/view/sdwindow.cxx b/main/sd/source/ui/view/sdwindow.cxx index 6b6eee8db2..c2ec154096 100644 --- a/main/sd/source/ui/view/sdwindow.cxx +++ b/main/sd/source/ui/view/sdwindow.cxx @@ -1,5 +1,5 @@ /************************************************************** - * + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -7,20 +7,18 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - * + * *************************************************************/ - - // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sd.hxx" @@ -176,7 +174,7 @@ void Window::CalcMinZoom() else nFact = Max(nX, nY); - // The factor is tansfomed according to the current zoom factor. + // The factor is transformed according to the current zoom factor. nFact = nFact * nZoom / ZOOM_MULTIPLICATOR; mnMinZoom = Max((sal_uInt16) MIN_ZOOM, (sal_uInt16) nFact); } @@ -547,7 +545,7 @@ long Window::GetZoomForRect( const Rectangle& rZoomRect ) nRetZoom = GetZoom(); } else - { + { // Clip the zoom factor to the valid range marked by nMinZoom as // previously calculated by <member>CalcMinZoom()</member> and the // MAX_ZOOM constant. @@ -717,7 +715,7 @@ void Window::UpdateMapMode (void) { Size aViewSizePixel = LogicToPixel(maViewSize); Size aWinSizePixel = LogicToPixel(aWinSize); - + // Seite soll nicht am Fensterrand "kleben" if (aPix.Width() == 0) { @@ -734,13 +732,13 @@ void Window::UpdateMapMode (void) aPix.Height() -= 8; } } - + aPix = PixelToLogic(aPix); maWinPos.X() = aPix.Width(); maWinPos.Y() = aPix.Height(); Point aNewOrigin (-maWinPos.X(), -maWinPos.Y()); maWinPos += maViewOrigin; - + MapMode aMap(GetMapMode()); aMap.SetOrigin(aNewOrigin); SetMapMode(aMap); @@ -1036,7 +1034,7 @@ void Window::DataChanged( const DataChangedEvent& rDCEvt ) // Wie hier die Behandlung aussehen soll, weiss ich leider // selbst noch nicht. Evtl. mal einen Printer loeschen und // schauen was gemacht werden muss. Evtl. muesste ich in - // VCL dafuer noch etwas einbauen, wenn der benutze Printer + // VCL dafuer noch etwas einbauen, wenn der benutzte Printer // geloescht wird. Ansonsten wuerde ich hier evtl. die // Formatierung neu berechnen, wenn der aktuelle Drucker // zerstoert wurde. @@ -1148,9 +1146,9 @@ void Window::DropScroll(const Point& rMousePos) if ( (nDx || nDy) && (rMousePos.X()!=0 || rMousePos.Y()!=0 ) ) { - if (mnTicks > 20) + if (mnTicks > 20) mpViewShell->ScrollLines(nDx, nDy); - else + else mnTicks ++; } } @@ -1162,7 +1160,7 @@ void Window::DropScroll(const Point& rMousePos) ::com::sun::star::accessibility::XAccessible> Window::CreateAccessible (void) { - // If current viewshell is PresentationViewShell, just return empty because the correct ShowWin will be created later. + // If current viewshell is PresentationViewShell, just return empty because the correct ShowWin will be created later. if (mpViewShell && mpViewShell->ISA(PresentationViewShell)) { return ::Window::CreateAccessible (); @@ -1186,7 +1184,7 @@ void Window::DropScroll(const Point& rMousePos) } // MT: Removed Windows::SwitchView() introduced with IA2 CWS. -// There are other notifications for this when the active view has chnaged, so please update the code to use that event mechanism +// There are other notifications for this when the active view has changed, so please update the code to use that event mechanism void Window::SwitchView() { if (!Application::IsAccessibilityEnabled()) @@ -1234,3 +1232,5 @@ Selection Window::GetSurroundingTextSelection() const } } // end of namespace sd + +/* vim: set noet sw=4 ts=4: */ diff --git a/main/svtools/source/filter/wmf/enhwmf.cxx b/main/svtools/source/filter/wmf/enhwmf.cxx index 135ce1d8de..2f6ca484d6 100644 --- a/main/svtools/source/filter/wmf/enhwmf.cxx +++ b/main/svtools/source/filter/wmf/enhwmf.cxx @@ -1,5 +1,5 @@ /************************************************************** - * + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -7,16 +7,16 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - * + * *************************************************************/ // MARKER(update_precomp.py): autogen include statement, do not remove @@ -179,7 +179,7 @@ struct BLENDFUNCTION{ SvStream& operator>>( SvStream& rIn, BLENDFUNCTION& rBlendFun ) { - rIn >> rBlendFun.aBlendOperation >> rBlendFun.aBlendFlags >> + rIn >> rBlendFun.aBlendOperation >> rBlendFun.aBlendFlags >> rBlendFun.aSrcConstantAlpha >> rBlendFun.aAlphaFormat; return rIn; } @@ -194,7 +194,7 @@ SvStream& operator>>( SvStream& rIn, XForm& rXForm ) { #ifdef OSL_BIGENDIAN rXForm.eM11 = GetSwapFloat( rIn ); - rXForm.eM12 = GetSwapFloat( rIn ); + rXForm.eM12 = GetSwapFloat( rIn ); rXForm.eM21 = GetSwapFloat( rIn ); rXForm.eM22 = GetSwapFloat( rIn ); rXForm.eDx = GetSwapFloat( rIn ); @@ -389,7 +389,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF() { sal_uInt32 i(0); sal_uInt16* pnPoints = new sal_uInt16[ nPoly ]; - + for ( i = 0; i < nPoly && !pWMF->IsEof(); i++ ) { *pWMF >> nPoints; @@ -642,7 +642,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF() sal_Int32 elpHatch; sal_uInt32 offBmi, cbBmi, offBits, cbBits, nStyle, nWidth, nBrushStyle, elpNumEntries; Color aColorRef; - + *pWMF >> nIndex; if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 ) { @@ -830,8 +830,8 @@ sal_Bool EnhWMFReader::ReadEnhWMF() break; case EMR_ALPHABLEND: { - sal_Int32 xDest, yDest, cxDest, cyDest; - + sal_Int32 xDest, yDest, cxDest, cyDest; + BLENDFUNCTION aFunc; sal_Int32 xSrc, ySrc; XForm xformSrc; @@ -871,9 +871,9 @@ sal_Bool EnhWMFReader::ReadEnhWMF() pWMF->Read( pBuf + 14 + cbBmiSrc, cbBitsSrc ); aTmp.Seek( 0 ); ReadDIB(aBitmap, aTmp, true); - + // test if it is sensible to crop - if ( ( cxSrc > 0 ) && ( cySrc > 0 ) && + if ( ( cxSrc > 0 ) && ( cySrc > 0 ) && ( xSrc >= 0 ) && ( ySrc >= 0 ) && ( xSrc + static_cast< sal_Int32 >(cxSrc) <= static_cast< sal_Int32 >(aBitmap.GetSizePixel().Width()) ) && ( ySrc + static_cast< sal_Int32 >(cySrc) <= static_cast< sal_Int32 >(aBitmap.GetSizePixel().Height()) ) ) @@ -935,7 +935,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF() ReadDIB(aBitmap, aTmp, true); // test if it is sensible to crop - if ( ( cxSrc > 0 ) && ( cySrc > 0 ) && + if ( ( cxSrc > 0 ) && ( cySrc > 0 ) && ( xSrc >= 0 ) && ( ySrc >= 0 ) && ( xSrc + cxSrc <= aBitmap.GetSizePixel().Width() ) && ( ySrc + cySrc <= aBitmap.GetSizePixel().Height() ) ) @@ -989,7 +989,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF() ReadDIB(aBitmap, aTmp, true); // test if it is sensible to crop - if ( ( cxSrc > 0 ) && ( cySrc > 0 ) && + if ( ( cxSrc > 0 ) && ( cySrc > 0 ) && ( xSrc >= 0 ) && ( ySrc >= 0 ) && ( xSrc + cxSrc <= aBitmap.GetSizePixel().Width() ) && ( ySrc + cySrc <= aBitmap.GetSizePixel().Height() ) ) @@ -1024,11 +1024,11 @@ sal_Bool EnhWMFReader::ReadEnhWMF() aLogFont.alfFaceName = UniString( lfFaceName ); // #123216# Not used in the test case of #121382# (always identity in XForm), also - // no hints in ms docu if FontSize should be scaled with WT. Using with the example + // no hints in ms docu if FontSize should be scaled with WT. Using with the example // from #123216# creates errors, so removing. // // // #121382# Need to apply WorldTransform to FontHeight/Width; this should be completely - // // chnaged to basegfx::B2DHomMatrix instead of 'struct XForm', but not now due to time + // // changed to basegfx::B2DHomMatrix instead of 'struct XForm', but not now due to time // // constraints and dangers // const XForm& rXF = pOut->GetWorldTransform(); // const basegfx::B2DHomMatrix aWT(rXF.eM11, rXF.eM21, rXF.eDx, rXF.eM12, rXF.eM22, rXF.eDy); @@ -1233,20 +1233,20 @@ sal_Bool EnhWMFReader::ReadEnhWMF() // Anzahl der Polygone: *pWMF >> nPoly >> nGesPoints; sal_uInt32 nReadPoints(0); - + if ( ( nGesPoints < SAL_MAX_UINT32 / sizeof(Point) ) && ( nPoly < SAL_MAX_UINT32 / sizeof(sal_uInt16) ) && !pWMF->IsEof() ) { if ( ( static_cast< sal_uInt32 >( nPoly ) * sizeof( sal_uInt16 ) ) <= ( nEndPos - pWMF->Tell() ) ) { sal_uInt32 i(0); sal_uInt16* pnPoints = new sal_uInt16[ nPoly ]; - + for ( i = 0; i < nPoly && !pWMF->IsEof(); i++ ) { *pWMF >> nPoints; pnPoints[ i ] = (sal_uInt16)nPoints; } - + if ( ( nGesPoints * (sizeof(sal_uInt16)+sizeof(sal_uInt16)) ) <= ( nEndPos - pWMF->Tell() ) && !pWMF->IsEof() ) { PolyPolygon aPolyPoly(nPoly, nPoly); @@ -1262,15 +1262,15 @@ sal_Bool EnhWMFReader::ReadEnhWMF() pPtAry[b] = Point( nX16, nY16 ); nReadPoints++; } - + aPolyPoly.Insert(Polygon(nPointCount, pPtAry)); delete[] pPtAry; } - + // create PolyPolygon actions pOut->DrawPolyPolygon( aPolyPoly, bRecordPath ); } - + delete[] pnPoints; } } @@ -1319,8 +1319,8 @@ sal_Bool EnhWMFReader::ReadEnhWMF() { for ( sal_Int32 x = 0; x < pBmp->Width(); x++ ) { - const BitmapColor aColor( pBmp->GetColor( y, x ) ); - + const BitmapColor aColor( pBmp->GetColor( y, x ) ); + nRed += aColor.GetRed(); nGreen += aColor.GetGreen(); nBlue += aColor.GetBlue(); @@ -1481,3 +1481,5 @@ EnhWMFReader::~EnhWMFReader() { }; + +/* vim: set noet sw=4 ts=4: */ diff --git a/main/sw/source/core/fields/expfld.cxx b/main/sw/source/core/fields/expfld.cxx index 30fea0ec1c..3df3ea38bc 100644 --- a/main/sw/source/core/fields/expfld.cxx +++ b/main/sw/source/core/fields/expfld.cxx @@ -1,5 +1,5 @@ /************************************************************** - * + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -7,20 +7,18 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - * + * *************************************************************/ - - // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" @@ -296,7 +294,7 @@ SwGetExpField::SwGetExpField(SwGetExpFieldType* pTyp, const String& rFormel, sal_uInt16 nSub, sal_uLong nFmt) : SwFormulaField( pTyp, nFmt, 0.0 ), bIsInBodyTxt( sal_True ), - nSubType(nSub), + nSubType(nSub), bLateInitialization( false ) { SetFormula( rFormel ); @@ -329,7 +327,7 @@ SwField* SwGetExpField::Copy() const pTmp->SwValueField::SetValue(GetValue()); pTmp->sExpand = sExpand; pTmp->bIsInBodyTxt = bIsInBodyTxt; - pTmp->SetAutomaticLanguage(IsAutomaticLanguage()); + pTmp->SetAutomaticLanguage(IsAutomaticLanguage()); if( bLateInitialization ) pTmp->SetLateInitialization(); @@ -352,13 +350,13 @@ void SwGetExpField::ChangeExpansion( const SwFrm& rFrm, const SwTxtFld& rFld ) pTxtNode = GetBodyTxtNode( rDoc, aPos, rFrm ); // Wenn kein Layout vorhanden, kommt es in Kopf und Fusszeilen dazu - // das ChnageExpansion uebers Layout-Formatieren aufgerufen wird + // das ChangeExpansion uebers Layout-Formatieren aufgerufen wird // aber kein TxtNode vorhanden ist // if(!pTxtNode) return; - // #i82544# - if( bLateInitialization ) + // #i82544# + if( bLateInitialization ) { SwFieldType* pSetExpFld = rDoc.GetFldType(RES_SETEXPFLD, GetFormula(), sal_False); if( pSetExpFld ) @@ -369,7 +367,7 @@ void SwGetExpField::ChangeExpansion( const SwFrm& rFrm, const SwTxtFld& rFld ) SetSubType( nsSwGetSetExpType::GSE_STRING ); } } - + _SetGetExpFld aEndFld( aPos.nNode, &rFld, &aPos.nContent ); if(GetSubType() & nsSwGetSetExpType::GSE_STRING) { @@ -424,7 +422,7 @@ void SwGetExpField::SetLanguage(sal_uInt16 nLng) sal_Bool SwGetExpField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const { - switch( nWhichId ) + switch( nWhichId ) { case FIELD_PROP_DOUBLE: rAny <<= GetValue(); @@ -454,8 +452,8 @@ sal_Bool SwGetExpField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const rAny <<= rtl::OUString(GetExpStr()); break; default: - return SwField::QueryValue(rAny, nWhichId); - } + return SwField::QueryValue(rAny, nWhichId); + } return sal_True; } @@ -463,7 +461,7 @@ sal_Bool SwGetExpField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) { sal_Int32 nTmp = 0; String sTmp; - switch( nWhichId ) + switch( nWhichId ) { case FIELD_PROP_DOUBLE: SwValueField::SetValue(*(double*) rAny.getValue()); @@ -494,8 +492,8 @@ sal_Bool SwGetExpField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) ChgExpStr(::GetString( rAny, sTmp )); break; default: - return SwField::PutValue(rAny, nWhichId); - } + return SwField::PutValue(rAny, nWhichId); + } return sal_True; } @@ -631,7 +629,7 @@ void SwSetExpFieldType::SetChapter( SwSetExpField& rFld, const SwNode& rNd ) String sNumber( pRule->MakeNumString(aNum, sal_False )); if( sNumber.Len() ) - rFld.ChgExpStr( ( sNumber += sDelim ) += rFld.GetExpStr() ); + rFld.ChgExpStr( ( sNumber += sDelim ) += rFld.GetExpStr() ); } else { @@ -644,7 +642,7 @@ void SwSetExpFieldType::SetChapter( SwSetExpField& rFld, const SwNode& rNd ) sal_Bool SwSetExpFieldType::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const { - switch( nWhichId ) + switch( nWhichId ) { case FIELD_PROP_SUBTYPE: { @@ -669,7 +667,7 @@ sal_Bool SwSetExpFieldType::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) co sal_Bool SwSetExpFieldType::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) { - switch( nWhichId ) + switch( nWhichId ) { case FIELD_PROP_SUBTYPE: { @@ -851,8 +849,8 @@ SwField* SwSetExpField::Copy() const GetFormula(), GetFormat()); pTmp->SwValueField::SetValue(GetValue()); pTmp->sExpand = sExpand; - pTmp->SetAutomaticLanguage(IsAutomaticLanguage()); - pTmp->SetLanguage(GetLanguage()); + pTmp->SetAutomaticLanguage(IsAutomaticLanguage()); + pTmp->SetLanguage(GetLanguage()); pTmp->aPText = aPText; pTmp->bInput = bInput; pTmp->nSeqNo = nSeqNo; @@ -906,7 +904,7 @@ xub_StrLen SwGetExpField::GetReferenceTextPos( const SwFmtFld& rFmt, SwDoc& rDoc sNodeText.Erase(0, nRet); if(sNodeText.Len()) { - //now check if sNodeText starts with a non-alphanumeric character plus a blank + // now check if sNodeText starts with a non-alphanumeric character plus a blank sal_uInt16 nSrcpt = pBreakIt->GetRealScriptOfText( sNodeText, 0 ); static sal_uInt16 nIds[] = @@ -982,7 +980,7 @@ sal_Bool SwSetExpField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) sal_Int32 nTmp32 = 0; sal_Int16 nTmp16 = 0; String sTmp; - switch( nWhichId ) + switch( nWhichId ) { case FIELD_PROP_BOOL2: if(*(sal_Bool*)rAny.getValue()) @@ -1336,12 +1334,12 @@ sal_Bool SwInputField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) void SwInputField::SetPar1(const String& rStr) { - aContent = rStr; + aContent = rStr; } const String& SwInputField::GetPar1() const { - return getContent(); + return getContent(); } @@ -1357,22 +1355,22 @@ String SwInputField::GetPar2() const void SwInputField::SetHelp(const String & rStr) { - aHelp = rStr; + aHelp = rStr; } String SwInputField::GetHelp() const { - return aHelp; + return aHelp; } void SwInputField::SetToolTip(const String & rStr) { - aToolTip = rStr; + aToolTip = rStr; } String SwInputField::GetToolTip() const { - return aToolTip; + return aToolTip; } sal_uInt16 SwInputField::GetSubType() const @@ -1385,3 +1383,4 @@ void SwInputField::SetSubType(sal_uInt16 nSub) nSubType = nSub; } +/* vim: set noet sw=4 ts=4: */ diff --git a/main/sw/source/ui/docvw/edtwin.cxx b/main/sw/source/ui/docvw/edtwin.cxx index 1b025871bb..ed014df357 100644 --- a/main/sw/source/ui/docvw/edtwin.cxx +++ b/main/sw/source/ui/docvw/edtwin.cxx @@ -1,5 +1,5 @@ /************************************************************** - * + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -7,20 +7,18 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - * + * *************************************************************/ - - // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" @@ -184,10 +182,10 @@ class SwAnchorMarker Point aLastPos; bool bTopRightHandle; public: - SwAnchorMarker( SdrHdl* pH ) + SwAnchorMarker( SdrHdl* pH ) : pHdl( pH ) , aHdlPos( pH->GetPos() ) - , aLastPos( pH->GetPos() ) + , aLastPos( pH->GetPos() ) , bTopRightHandle( pH->GetKind() == HDL_ANCHOR_TR ) {} const Point& GetLastPos() const { return aLastPos; } @@ -196,8 +194,8 @@ public: const Point& GetPos() { return pHdl->GetPos(); } const Point& GetHdlPos() { return aHdlPos; } SdrHdl* GetHdl() const { return pHdl; } - void ChgHdl( SdrHdl* pNew ) - { + void ChgHdl( SdrHdl* pNew ) + { pHdl = pNew; if ( pHdl ) { @@ -215,9 +213,9 @@ public: else { aHitTestPos += Point( 1, 1 ); - } + } aHitTestPos = rOut.PixelToLogic( aHitTestPos ); - + return aHitTestPos; } }; @@ -1015,28 +1013,28 @@ void SwEditWin::ChangeFly( sal_uInt8 nDir, sal_Bool bWeb ) { case MOVE_LEFT_BIG: case MOVE_LEFT_HUGE: - case MOVE_LEFT_SMALL: aTmp.Left( aTmp.Left() - nLeft ); + case MOVE_LEFT_SMALL: aTmp.Left( aTmp.Left() - nLeft ); break; - + case MOVE_UP_BIG: case MOVE_UP_HUGE: - case MOVE_UP_SMALL: aTmp.Top( aTmp.Top() - nUp ); + case MOVE_UP_SMALL: aTmp.Top( aTmp.Top() - nUp ); break; - - case MOVE_RIGHT_SMALL: - if( aTmp.Width() < aSnap.Width() + MINFLY ) + + case MOVE_RIGHT_SMALL: + if( aTmp.Width() < aSnap.Width() + MINFLY ) break; nRight = aSnap.Width(); // kein break - case MOVE_RIGHT_HUGE: - case MOVE_RIGHT_BIG: aTmp.Left( aTmp.Left() + nRight ); + case MOVE_RIGHT_HUGE: + case MOVE_RIGHT_BIG: aTmp.Left( aTmp.Left() + nRight ); break; - case MOVE_DOWN_SMALL: - if( aTmp.Height() < aSnap.Height() + MINFLY ) + case MOVE_DOWN_SMALL: + if( aTmp.Height() < aSnap.Height() + MINFLY ) break; - nDown = aSnap.Height(); // kein break - case MOVE_DOWN_HUGE: - case MOVE_DOWN_BIG: aTmp.Top( aTmp.Top() + nDown ); + nDown = aSnap.Height(); // no break + case MOVE_DOWN_HUGE: + case MOVE_DOWN_BIG: aTmp.Top( aTmp.Top() + nDown ); break; default: ASSERT( sal_True, "ChangeFly: Unknown direction." ); @@ -1144,14 +1142,14 @@ void SwEditWin::ChangeDrawing( sal_uInt8 nDir ) long nX = 0; long nY = 0; const sal_Bool bOnePixel( - MOVE_LEFT_SMALL == nDir || - MOVE_UP_SMALL == nDir || - MOVE_RIGHT_SMALL == nDir || + MOVE_LEFT_SMALL == nDir || + MOVE_UP_SMALL == nDir || + MOVE_RIGHT_SMALL == nDir || MOVE_DOWN_SMALL == nDir); const sal_Bool bHuge( - MOVE_LEFT_HUGE == nDir || - MOVE_UP_HUGE == nDir || - MOVE_RIGHT_HUGE == nDir || + MOVE_LEFT_HUGE == nDir || + MOVE_UP_HUGE == nDir || + MOVE_RIGHT_HUGE == nDir || MOVE_DOWN_HUGE == nDir); sal_uInt16 nAnchorDir = SW_MOVE_UP; switch(nDir) @@ -2779,7 +2777,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) } else { - // Make sure the pointer is set to 0, otherwise it may point to + // Make sure the pointer is set to 0, otherwise it may point to // nowhere after deleting the corresponding text node. rView.SetNumRuleNodeFromDoc( NULL ); return; @@ -4330,7 +4328,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) SwFormatClipboard* pFormatClipboard = pApplyTempl->pFormatClipboard; if( pFormatClipboard )//apply format paintbrush { - //get some parameters + // get some parameters SwWrtShell& rWrtShell = rView.GetWrtShell(); SfxStyleSheetBasePool* pPool=0; bool bNoCharacterFormats = false; @@ -4344,7 +4342,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) else if( rMEvt.GetModifier() & KEY_MOD1 ) bNoParagraphFormats = true; } - //execute paste + // execute paste pFormatClipboard->Paste( rWrtShell, pPool, bNoCharacterFormats, bNoParagraphFormats ); //if the clipboard is empty after paste remove the ApplyTemplate @@ -4983,7 +4981,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) if ( sRecord.Len() ) { // #102812# convert quotes in IME text - // works on the last input character, this is escpecially in Korean text often done + // works on the last input character, this is especially in Korean text often done // quotes that are inside of the string are not replaced! const sal_Unicode aCh = sRecord.GetChar(sRecord.Len() - 1); SvxAutoCorrCfg* pACfg = SvxAutoCorrCfg::Get(); @@ -5239,7 +5237,7 @@ sal_Bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) SdrView *pSdrView = rSh.GetDrawView(); if ( pSdrView ) { - // no close of insert_draw and reset of draw mode, + // no close of insert_draw and reset of draw mode, // if context menu position is inside a selected object. if ( !bIsInsideSelectedObj && rView.GetDrawFuncPtr() ) { @@ -5792,7 +5790,7 @@ Selection SwEditWin::GetSurroundingTextSelection() const } } // MT: Removed Windows::SwitchView() introduced with IA2 CWS. -// There are other notifications for this when the active view has chnaged, so please update the code to use that event mechanism +// There are other notifications for this when the active view has changed, so please update the code to use that event mechanism void SwEditWin::SwitchView() { #ifdef ACCESSIBLE_LAYOUT @@ -5803,3 +5801,5 @@ void SwEditWin::SwitchView() rView.GetWrtShell().InvalidateAccessibleFocus(); #endif } + +/* vim: set noet sw=4 ts=4: */ diff --git a/main/sw/source/ui/uiview/pview.cxx b/main/sw/source/ui/uiview/pview.cxx index 5a864cabe5..a0c00472c4 100644 --- a/main/sw/source/ui/uiview/pview.cxx +++ b/main/sw/source/ui/uiview/pview.cxx @@ -1,5 +1,5 @@ /************************************************************** - * + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -7,20 +7,18 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - * + * *************************************************************/ - - // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" @@ -150,7 +148,7 @@ void lcl_InvalidateZoomSlots(SfxBindings& rBindings) /*-------------------------------------------------------------------- Beschreibung: --------------------------------------------------------------------*/ - + // erstmal der Zoom-Dialog class SwPreViewZoomDlg : public SvxStandardDialog @@ -184,7 +182,7 @@ SwPreViewZoomDlg::SwPreViewZoomDlg( SwPagePreViewWin& rParent ) : aColEdit(this,SW_RES(ED_COL)), aOkBtn(this,SW_RES(BT_OK)), aCancelBtn(this,SW_RES(BT_CANCEL)), - aHelpBtn(this,SW_RES(BT_HELP)) + aHelpBtn(this,SW_RES(BT_HELP)) { FreeResource(); @@ -1016,8 +1014,8 @@ MOVEPAGE: bNormalPrint = sal_True; SfxViewShell::ExecuteSlot( rReq, SfxViewShell::GetInterface() ); return; - case FN_CLOSE_PAGEPREVIEW: - case SID_PRINTPREVIEW: + case FN_CLOSE_PAGEPREVIEW: + case SID_PRINTPREVIEW: // print preview is now always in the same frame as the tab view // -> always switch this frame back to normal view // (ScTabViewShell ctor reads stored view data) @@ -1058,7 +1056,7 @@ void SwPagePreView::GetState( SfxItemSet& rSet ) ASSERT(nWhich, leeres Set); SwPagePreviewLayout* pPagePrevwLay = GetViewShell()->PagePreviewLayout(); //#106746# zoom has to be disabled if Accessibility support is switched on - // MT 2010/01, see #110498# + // MT 2010/01, see #110498# sal_Bool bZoomEnabled = sal_True; // !Application::GetSettings().GetMiscSettings().GetEnableATToolSupport(); while(nWhich) @@ -1358,14 +1356,14 @@ SwPagePreView::SwPagePreView(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh): mbFormDesignModeToReset = pVS->GetDrawView()->IsDesignMode(); } - if( pVS ) + if( pVS ) pNew = new ViewShell( *pVS, pViewWin, 0, VSHELLFLAG_ISPREVIEW ); else pNew = new ViewShell( *((SwDocShell*)pViewFrame->GetObjectShell())->GetDoc(), pViewWin, 0, 0, VSHELLFLAG_ISPREVIEW ); - pViewWin->SetViewShell( pNew ); + pViewWin->SetViewShell( pNew ); pNew->SetSfxViewShell( this ); Init(); } @@ -1528,7 +1526,7 @@ void SwPagePreView::CalcAndSetBorderPixel( SvBorder &rToFill, sal_Bool /*bInner* // const long nAdd = bInner ? 0 : ScrollBar::GetWindowOverlapPixel(); const StyleSettings &rSet = pViewWin->GetSettings().GetStyleSettings(); const long nTmp = rSet.GetScrollBarSize();// - nAdd; - if ( pVScrollbar->IsVisible( sal_False )) + if ( pVScrollbar->IsVisible( sal_False )) rToFill.Right() = nTmp; if ( pHScrollbar->IsVisible( sal_False ) ) rToFill.Bottom() = nTmp; @@ -1578,7 +1576,7 @@ void SwPagePreView::OuterResizePixel( const Point &rOfst, const Size &rSize ) //Aufruf der DocSzChgd-Methode der Scrollbars ist noetig, da vom maximalen //Scrollrange immer die halbe Hoehe der VisArea abgezogen wird. if ( pVScrollbar && - aTmpSize.Width() > 0 && aTmpSize.Height() > 0 ) + aTmpSize.Width() > 0 && aTmpSize.Height() > 0 ) { ScrollDocSzChg(); } @@ -1626,14 +1624,14 @@ void SwPagePreView::SetVisArea( const Rectangle &rRect, sal_Bool bUpdateScrollba //Vorsichtshalber tun wir das nur wenn an der Shell eine Action laeuft, //denn dann wir nicht wirklich gepaintet sondern die Rechtecke werden //lediglich (in Dokumentkoordinaten) vorgemerkt. - if( GetViewShell()->ActionPend() ) + if( GetViewShell()->ActionPend() ) pViewWin->Update(); // setze am View-Win die aktuelle Size aVisArea = aLR; pViewWin->SetWinSize( aLR.GetSize() ); - // OD 18.12.2002 #103492# - use new mode - ChgPage( SwPagePreViewWin::MV_NEWWINSIZE, bUpdateScrollbar ); + // OD 18.12.2002 #103492# - use new mode + ChgPage( SwPagePreViewWin::MV_NEWWINSIZE, bUpdateScrollbar ); pViewWin->Invalidate(); } @@ -2140,14 +2138,14 @@ uno::Reference< ::com::sun::star::accessibility::XAccessible > return xAcc; } if (mpViewShell) - { + { ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > xAccPreview = mpViewShell->CreateAccessiblePreview(); SetAccessible(xAccPreview); } return GetAccessible( sal_False ); } // MT: Removed Windows::SwitchView() introduced with IA2 CWS. -// There are other notifications for this when the active view has chnaged, so please update the code to use that event mechanism +// There are other notifications for this when the active view has changed, so please update the code to use that event mechanism void SwPagePreViewWin::SwitchView() { #ifdef ACCESSIBLE_LAYOUT @@ -2222,3 +2220,5 @@ void SwPagePreView::SetVScrollbarThumbPos( const sal_uInt16 _nNewThumbPos ) pVScrollbar->SetThumbPos( _nNewThumbPos ); } } + +/* vim: set noet sw=4 ts=4: */