This is an automated email from the ASF dual-hosted git repository. mseidel pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/openoffice.git
The following commit(s) were added to refs/heads/trunk by this push: new c22beca Fixed typos, removed whitespace c22beca is described below commit c22beca602a5819c83f48afc2fe0d88e01fb0f06 Author: mseidel <msei...@apache.org> AuthorDate: Mon Sep 20 16:09:37 2021 +0200 Fixed typos, removed whitespace --- main/svx/source/sdr/contact/displayinfo.cxx | 8 +- main/svx/source/sdr/contact/sdrmediawindow.hxx | 35 ++- .../source/sdr/contact/viewcontactofe3dcube.cxx | 14 +- .../source/sdr/contact/viewcontactofe3dextrude.cxx | 10 +- .../source/sdr/contact/viewcontactofe3dlathe.cxx | 16 +- .../source/sdr/contact/viewcontactofe3dsphere.cxx | 12 +- main/svx/source/sdr/contact/viewcontactofgroup.cxx | 16 +- .../source/sdr/contact/viewcontactofpageobj.cxx | 16 +- .../source/sdr/contact/viewcontactofsdrcircobj.cxx | 32 +-- .../source/sdr/contact/viewcontactofsdredgeobj.cxx | 18 +- .../source/sdr/contact/viewcontactofsdrpage.cxx | 290 ++++++++++----------- .../source/sdr/contact/viewcontactofsdrrectobj.cxx | 46 ++-- .../source/sdr/contact/viewcontactoftextobj.cxx | 8 +- .../source/sdr/contact/viewcontactofvirtobj.cxx | 34 +-- .../source/sdr/contact/viewobjectcontactofe3d.cxx | 60 ++--- .../sdr/contact/viewobjectcontactofgroup.cxx | 14 +- .../sdr/contact/viewobjectcontactofsdrobj.cxx | 118 ++++----- .../sdr/contact/viewobjectcontactredirector.cxx | 10 +- 18 files changed, 378 insertions(+), 379 deletions(-) diff --git a/main/svx/source/sdr/contact/displayinfo.cxx b/main/svx/source/sdr/contact/displayinfo.cxx index c32818f..3e04498 100644 --- a/main/svx/source/sdr/contact/displayinfo.cxx +++ b/main/svx/source/sdr/contact/displayinfo.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. - * + * *************************************************************/ diff --git a/main/svx/source/sdr/contact/sdrmediawindow.hxx b/main/svx/source/sdr/contact/sdrmediawindow.hxx index 76138b4..1a9ab1a 100644 --- a/main/svx/source/sdr/contact/sdrmediawindow.hxx +++ b/main/svx/source/sdr/contact/sdrmediawindow.hxx @@ -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,20 @@ * 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. - * + * *************************************************************/ - + #ifndef _SDR_CONTACT_SDRMEDIAWIMNDOW_HXX #include <avmedia/mediawindow.hxx> @@ -39,20 +39,20 @@ public: SdrMediaWindow( Window* pParent, ViewObjectContactOfSdrMediaObj& rViewObjContact ); ~SdrMediaWindow(); - - virtual void MouseMove( const MouseEvent& rMEvt ); - virtual void MouseButtonDown( const MouseEvent& rMEvt ); - virtual void MouseButtonUp( const MouseEvent& rMEvt ); - - virtual void KeyInput( const KeyEvent& rKEvt ); - virtual void KeyUp( const KeyEvent& rKEvt ); - virtual void Command( const CommandEvent& rCEvt ); + virtual void MouseMove( const MouseEvent& rMEvt ); + virtual void MouseButtonDown( const MouseEvent& rMEvt ); + virtual void MouseButtonUp( const MouseEvent& rMEvt ); + + virtual void KeyInput( const KeyEvent& rKEvt ); + virtual void KeyUp( const KeyEvent& rKEvt ); + + virtual void Command( const CommandEvent& rCEvt ); - virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ); - virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ); - - virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel ); + virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ); + virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ); + + virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel ); private: @@ -62,4 +62,3 @@ private: } } #endif - diff --git a/main/svx/source/sdr/contact/viewcontactofe3dcube.cxx b/main/svx/source/sdr/contact/viewcontactofe3dcube.cxx index 52bd093..b493bf3 100644 --- a/main/svx/source/sdr/contact/viewcontactofe3dcube.cxx +++ b/main/svx/source/sdr/contact/viewcontactofe3dcube.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. - * + * *************************************************************/ @@ -53,7 +53,7 @@ namespace sdr const drawinglayer::attribute::SdrLineFillShadowAttribute3D aAttribute( drawinglayer::primitive2d::createNewSdrLineFillShadowAttribute(rItemSet, false)); - // get cube geometry and use as traslation and scaling for unit cube + // get cube geometry and use as translation and scaling for unit cube basegfx::B3DRange aCubeRange; const basegfx::B3DVector aCubeSize(GetE3dCubeObj().GetCubeSize()); const basegfx::B3DPoint aCubePosition(GetE3dCubeObj().GetCubePos()); @@ -87,11 +87,11 @@ namespace sdr const drawinglayer::primitive3d::Primitive3DReference xReference( new drawinglayer::primitive3d::SdrCubePrimitive3D( aWorldTransform, aTextureSize, aAttribute, *pSdr3DObjectAttribute)); - xRetval = drawinglayer::primitive3d::Primitive3DSequence(&xReference, 1); + xRetval = drawinglayer::primitive3d::Primitive3DSequence(&xReference, 1); // delete 3D Object Attributes delete pSdr3DObjectAttribute; - + return xRetval; } } // end of namespace contact diff --git a/main/svx/source/sdr/contact/viewcontactofe3dextrude.cxx b/main/svx/source/sdr/contact/viewcontactofe3dextrude.cxx index 6e57958..717e5f7 100644 --- a/main/svx/source/sdr/contact/viewcontactofe3dextrude.cxx +++ b/main/svx/source/sdr/contact/viewcontactofe3dextrude.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. - * + * *************************************************************/ @@ -82,7 +82,7 @@ namespace sdr aWorldTransform, aTextureSize, aAttribute, *pSdr3DObjectAttribute, aPolyPolygon, fDepth, fDiagonal, fBackScale, bSmoothNormals, true, bSmoothLids, bCharacterMode, bCloseFront, bCloseBack)); - xRetval = drawinglayer::primitive3d::Primitive3DSequence(&xReference, 1); + xRetval = drawinglayer::primitive3d::Primitive3DSequence(&xReference, 1); // delete 3D Object Attributes delete pSdr3DObjectAttribute; diff --git a/main/svx/source/sdr/contact/viewcontactofe3dlathe.cxx b/main/svx/source/sdr/contact/viewcontactofe3dlathe.cxx index 9718970..e52b380 100644 --- a/main/svx/source/sdr/contact/viewcontactofe3dlathe.cxx +++ b/main/svx/source/sdr/contact/viewcontactofe3dlathe.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. - * + * *************************************************************/ @@ -59,12 +59,12 @@ namespace sdr // get 3D Object Attributes drawinglayer::attribute::Sdr3DObjectAttribute* pSdr3DObjectAttribute = drawinglayer::primitive2d::createNewSdr3DObjectAttribute(rItemSet); - // calculate texture size. Use the polygon length of the longest polygon for - // height and the rotated radius for width (using polygon center) to get a good + // calculate texture size. Use the polygon length of the longest polygon for + // height and the rotated radius for width (using polygon center) to get a good // texture mapping const sal_uInt32 nPolygonCount(aPolyPolygon.count()); double fPolygonMaxLength(0.0); - + for(sal_uInt32 a(0); a < nPolygonCount; a++) { const basegfx::B2DPolygon aCandidate(aPolyPolygon.getB2DPolygon(a)); @@ -97,7 +97,7 @@ namespace sdr aPolyPolygon, nHorizontalSegments, nVerticalSegments, fDiagonal, fBackScale, fRotation, bSmoothNormals, true, bSmoothLids, bCharacterMode, bCloseFront, bCloseBack)); - xRetval = drawinglayer::primitive3d::Primitive3DSequence(&xReference, 1); + xRetval = drawinglayer::primitive3d::Primitive3DSequence(&xReference, 1); // delete 3D Object Attributes delete pSdr3DObjectAttribute; diff --git a/main/svx/source/sdr/contact/viewcontactofe3dsphere.cxx b/main/svx/source/sdr/contact/viewcontactofe3dsphere.cxx index 0959cab..3d4db64 100644 --- a/main/svx/source/sdr/contact/viewcontactofe3dsphere.cxx +++ b/main/svx/source/sdr/contact/viewcontactofe3dsphere.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. - * + * *************************************************************/ @@ -78,9 +78,9 @@ namespace sdr // create primitive and add const drawinglayer::primitive3d::Primitive3DReference xReference( new drawinglayer::primitive3d::SdrSpherePrimitive3D( - aWorldTransform, aTextureSize, aAttribute, *pSdr3DObjectAttribute, + aWorldTransform, aTextureSize, aAttribute, *pSdr3DObjectAttribute, nHorizontalSegments, nVerticalSegments)); - xRetval = drawinglayer::primitive3d::Primitive3DSequence(&xReference, 1); + xRetval = drawinglayer::primitive3d::Primitive3DSequence(&xReference, 1); // delete 3D Object Attributes delete pSdr3DObjectAttribute; diff --git a/main/svx/source/sdr/contact/viewcontactofgroup.cxx b/main/svx/source/sdr/contact/viewcontactofgroup.cxx index 86b04c9..b456174 100644 --- a/main/svx/source/sdr/contact/viewcontactofgroup.cxx +++ b/main/svx/source/sdr/contact/viewcontactofgroup.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. - * + * *************************************************************/ @@ -71,7 +71,7 @@ namespace sdr { const ViewContact& rCandidate(GetViewContact(a)); const drawinglayer::primitive2d::Primitive2DSequence aCandSeq(rCandidate.getViewIndependentPrimitive2DSequence()); - + drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, aCandSeq); } } @@ -80,9 +80,9 @@ namespace sdr // append an invisible outline for the cases where no visible content exists const Rectangle aCurrentBoundRect(GetSdrObjGroup().GetLastBoundRect()); const basegfx::B2DRange aCurrentRange( - aCurrentBoundRect.Left(), aCurrentBoundRect.Top(), + aCurrentBoundRect.Left(), aCurrentBoundRect.Top(), aCurrentBoundRect.Right(), aCurrentBoundRect.Bottom()); - + const drawinglayer::primitive2d::Primitive2DReference xReference( drawinglayer::primitive2d::createHiddenGeometryPrimitives2D( false, aCurrentRange)); @@ -90,7 +90,7 @@ namespace sdr xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); } - return xRetval; + return xRetval; } } // end of namespace contact } // end of namespace sdr diff --git a/main/svx/source/sdr/contact/viewcontactofpageobj.cxx b/main/svx/source/sdr/contact/viewcontactofpageobj.cxx index 9337ca2..021eb5e 100644 --- a/main/svx/source/sdr/contact/viewcontactofpageobj.cxx +++ b/main/svx/source/sdr/contact/viewcontactofpageobj.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. - * + * *************************************************************/ @@ -82,16 +82,16 @@ namespace sdr drawinglayer::primitive2d::Primitive2DSequence ViewContactOfPageObj::createViewIndependentPrimitive2DSequence() const { - // ceate graphical visualisation data. Since this is the view-independent version which should not be used, - // create a replacement graphic visualisation here. Use GetLastBoundRect to access the model data directly + // create graphical visualization data. Since this is the view-independent version which should not be used, + // create a replacement graphic visualization here. Use GetLastBoundRect to access the model data directly // which is aOutRect for SdrPageObj. const Rectangle aModelRectangle(GetPageObj().GetLastBoundRect()); const basegfx::B2DRange aModelRange(aModelRectangle.Left(), aModelRectangle.Top(), aModelRectangle.Right(), aModelRectangle.Bottom()); - const basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aModelRange)); + const basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aModelRange)); const basegfx::BColor aYellow(1.0, 1.0, 0.0); const drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aOutline, aYellow)); - return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); + return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); } } // end of namespace contact diff --git a/main/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx b/main/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx index 397ee9f..84162d4 100644 --- a/main/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx +++ b/main/svx/source/sdr/contact/viewcontactofsdrcircobj.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. - * + * *************************************************************/ @@ -52,14 +52,14 @@ namespace sdr const SfxItemSet& rItemSet = GetCircObj().GetMergedItemSet(); const drawinglayer::attribute::SdrLineFillShadowTextAttribute aAttribute( drawinglayer::primitive2d::createNewSdrLineFillShadowTextAttribute( - rItemSet, - GetCircObj().getText(0), - false)); + rItemSet, + GetCircObj().getText(0), + false)); // take unrotated snap rect (direct model data) for position and size const Rectangle& rRectangle = GetCircObj().GetGeoRect(); const basegfx::B2DRange aObjectRange( - rRectangle.Left(), rRectangle.Top(), + rRectangle.Left(), rRectangle.Top(), rRectangle.Right(), rRectangle.Bottom()); const GeoStat& rGeoStat(GetCircObj().GetGeoStat()); @@ -81,9 +81,9 @@ namespace sdr { const drawinglayer::primitive2d::Primitive2DReference xReference( new drawinglayer::primitive2d::SdrEllipsePrimitive2D( - aObjectMatrix, + aObjectMatrix, aAttribute)); - + return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); } else @@ -97,13 +97,13 @@ namespace sdr const drawinglayer::primitive2d::Primitive2DReference xReference( new drawinglayer::primitive2d::SdrEllipseSegmentPrimitive2D( - aObjectMatrix, - aAttribute, - fStart, - fEnd, - bCloseSegment, + aObjectMatrix, + aAttribute, + fStart, + fEnd, + bCloseSegment, bCloseUsingCenter)); - + return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); } } diff --git a/main/svx/source/sdr/contact/viewcontactofsdredgeobj.cxx b/main/svx/source/sdr/contact/viewcontactofsdredgeobj.cxx index 680800c..9b4a088 100644 --- a/main/svx/source/sdr/contact/viewcontactofsdredgeobj.cxx +++ b/main/svx/source/sdr/contact/viewcontactofsdredgeobj.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. - * + * *************************************************************/ @@ -48,22 +48,22 @@ namespace sdr { const basegfx::B2DPolygon& rEdgeTrack = GetEdgeObj().getEdgeTrack(); - // what to do when no EdgeTrack is provided (HitTest and selectability) ? + // what to do when no EdgeTrack is provided (HitTest and selectability) ? OSL_ENSURE(0 != rEdgeTrack.count(), "Connectors with no geometry are not allowed (!)"); // ckeck attributes const SfxItemSet& rItemSet = GetEdgeObj().GetMergedItemSet(); const drawinglayer::attribute::SdrLineShadowTextAttribute aAttribute( drawinglayer::primitive2d::createNewSdrLineShadowTextAttribute( - rItemSet, - GetEdgeObj().getText(0))); + rItemSet, + GetEdgeObj().getText(0))); - // create primitive. Always create primitives to allow the decomposition of + // create primitive. Always create primitives to allow the decomposition of // SdrConnectorPrimitive2D to create needed invisible elements for HitTest // and/or BoundRect const drawinglayer::primitive2d::Primitive2DReference xReference( new drawinglayer::primitive2d::SdrConnectorPrimitive2D( - aAttribute, + aAttribute, rEdgeTrack)); return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); diff --git a/main/svx/source/sdr/contact/viewcontactofsdrpage.cxx b/main/svx/source/sdr/contact/viewcontactofsdrpage.cxx index 16f58d0..97fdf5d 100644 --- a/main/svx/source/sdr/contact/viewcontactofsdrpage.cxx +++ b/main/svx/source/sdr/contact/viewcontactofsdrpage.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. - * + * *************************************************************/ @@ -99,9 +99,9 @@ namespace sdr const Color aInitColor(aColorConfig.GetColorValue(svtools::DOCCOLOR).nColor); const basegfx::BColor aRGBColor(aInitColor.getBColor()); const drawinglayer::primitive2d::Primitive2DReference xReference( - new drawinglayer::primitive2d::BackgroundColorPrimitive2D(aRGBColor)); + new drawinglayer::primitive2d::BackgroundColorPrimitive2D(aRGBColor)); - return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); + return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); } ViewContactOfPageBackground::ViewContactOfPageBackground(ViewContactOfSdrPage& rParentViewContactOfSdrPage) @@ -131,59 +131,59 @@ namespace sdr drawinglayer::primitive2d::Primitive2DSequence ViewContactOfPageShadow::createViewIndependentPrimitive2DSequence() const { - static bool bUseOldPageShadow(false); - const SdrPage& rPage = getPage(); - basegfx::B2DHomMatrix aPageMatrix; - aPageMatrix.set(0, 0, (double)rPage.GetWdt()); - aPageMatrix.set(1, 1, (double)rPage.GetHgt()); - - if(bUseOldPageShadow) - { - // create page shadow polygon - const double fPageBorderFactor(1.0 / 256.0); - basegfx::B2DPolygon aPageShadowPolygon; - aPageShadowPolygon.append(basegfx::B2DPoint(1.0, fPageBorderFactor)); - aPageShadowPolygon.append(basegfx::B2DPoint(1.0 + fPageBorderFactor, fPageBorderFactor)); - aPageShadowPolygon.append(basegfx::B2DPoint(1.0 + fPageBorderFactor, 1.0 + fPageBorderFactor)); - aPageShadowPolygon.append(basegfx::B2DPoint(fPageBorderFactor, 1.0 + fPageBorderFactor)); - aPageShadowPolygon.append(basegfx::B2DPoint(fPageBorderFactor, 1.0)); - aPageShadowPolygon.append(basegfx::B2DPoint(1.0, 1.0)); - aPageShadowPolygon.setClosed(true); - aPageShadowPolygon.transform(aPageMatrix); - - // We have only the page information, not the view information. Use the - // svtools::FONTCOLOR color for initialisation - const svtools::ColorConfig aColorConfig; - const Color aShadowColor(aColorConfig.GetColorValue(svtools::FONTCOLOR).nColor); - const basegfx::BColor aRGBShadowColor(aShadowColor.getBColor()); - const drawinglayer::primitive2d::Primitive2DReference xReference( - new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D( - basegfx::B2DPolyPolygon(aPageShadowPolygon), - aRGBShadowColor)); - - return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); - } - else - { - static vcl::DeleteOnDeinit< drawinglayer::primitive2d::DiscreteShadow > aDiscreteShadow( - new drawinglayer::primitive2d::DiscreteShadow( - BitmapEx( - ResId( - SIP_SA_PAGESHADOW35X35, - *ImpGetResMgr())))); - - if(aDiscreteShadow.get()) - { - const drawinglayer::primitive2d::Primitive2DReference xReference( - new drawinglayer::primitive2d::DiscreteShadowPrimitive2D( - aPageMatrix, - *aDiscreteShadow.get())); - - return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); - } - - return drawinglayer::primitive2d::Primitive2DSequence(); - } + static bool bUseOldPageShadow(false); + const SdrPage& rPage = getPage(); + basegfx::B2DHomMatrix aPageMatrix; + aPageMatrix.set(0, 0, (double)rPage.GetWdt()); + aPageMatrix.set(1, 1, (double)rPage.GetHgt()); + + if(bUseOldPageShadow) + { + // create page shadow polygon + const double fPageBorderFactor(1.0 / 256.0); + basegfx::B2DPolygon aPageShadowPolygon; + aPageShadowPolygon.append(basegfx::B2DPoint(1.0, fPageBorderFactor)); + aPageShadowPolygon.append(basegfx::B2DPoint(1.0 + fPageBorderFactor, fPageBorderFactor)); + aPageShadowPolygon.append(basegfx::B2DPoint(1.0 + fPageBorderFactor, 1.0 + fPageBorderFactor)); + aPageShadowPolygon.append(basegfx::B2DPoint(fPageBorderFactor, 1.0 + fPageBorderFactor)); + aPageShadowPolygon.append(basegfx::B2DPoint(fPageBorderFactor, 1.0)); + aPageShadowPolygon.append(basegfx::B2DPoint(1.0, 1.0)); + aPageShadowPolygon.setClosed(true); + aPageShadowPolygon.transform(aPageMatrix); + + // We have only the page information, not the view information. Use the + // svtools::FONTCOLOR color for initialization + const svtools::ColorConfig aColorConfig; + const Color aShadowColor(aColorConfig.GetColorValue(svtools::FONTCOLOR).nColor); + const basegfx::BColor aRGBShadowColor(aShadowColor.getBColor()); + const drawinglayer::primitive2d::Primitive2DReference xReference( + new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D( + basegfx::B2DPolyPolygon(aPageShadowPolygon), + aRGBShadowColor)); + + return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); + } + else + { + static vcl::DeleteOnDeinit< drawinglayer::primitive2d::DiscreteShadow > aDiscreteShadow( + new drawinglayer::primitive2d::DiscreteShadow( + BitmapEx( + ResId( + SIP_SA_PAGESHADOW35X35, + *ImpGetResMgr())))); + + if(aDiscreteShadow.get()) + { + const drawinglayer::primitive2d::Primitive2DReference xReference( + new drawinglayer::primitive2d::DiscreteShadowPrimitive2D( + aPageMatrix, + *aDiscreteShadow.get())); + + return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); + } + + return drawinglayer::primitive2d::Primitive2DSequence(); + } } ViewContactOfPageShadow::ViewContactOfPageShadow(ViewContactOfSdrPage& rParentViewContactOfSdrPage) @@ -216,50 +216,50 @@ namespace sdr drawinglayer::primitive2d::Primitive2DSequence xRetval; // this class is used when the page is a MasterPage and is responsible to - // create a visualisation for the MPBGO, if exists. This needs to be suppressed - // when a SdrPage which uses a MasterPage creates it's output. Suppression + // create a visualization for the MPBGO, if exists. This needs to be suppressed + // when a SdrPage which uses a MasterPage creates its output. Suppression // is done in the corresponding VOC since DisplayInfo data is needed const SdrPage& rPage = getPage(); if(rPage.IsMasterPage()) { - if(0 == rPage.GetPageNum()) - { - // #i98063# - // filter MasterPage 0 since it's the HandoutPage. Thus, it's a - // MasterPage, but has no MPBGO, so there is nothing to do here. - } - else - { - drawinglayer::attribute::SdrFillAttribute aFill; - - // #i110846# Suppress SdrPage FillStyle for MasterPages without StyleSheets, - // else the PoolDefault (XFILL_COLOR and Blue8) will be used. Normally, all - // MasterPages should have a StyleSheet excactly for this reason, but historically - // e.g. the Notes MasterPage has no StyleSheet set (and there maybe others). - if(rPage.getSdrPageProperties().GetStyleSheet()) - { - // create page fill attributes with correct properties - aFill = drawinglayer::primitive2d::createNewSdrFillAttribute( - rPage.getSdrPageProperties().GetItemSet()); - } - - if(!aFill.isDefault()) - { - // direct model data is the page size, get and use it - const basegfx::B2DRange aInnerRange( - rPage.GetLftBorder(), rPage.GetUppBorder(), - rPage.GetWdt() - rPage.GetRgtBorder(), rPage.GetHgt() - rPage.GetLwrBorder()); - const basegfx::B2DPolygon aInnerPolgon(basegfx::tools::createPolygonFromRect(aInnerRange)); - const drawinglayer::primitive2d::Primitive2DReference xReference( + if(0 == rPage.GetPageNum()) + { + // #i98063# + // filter MasterPage 0 since it's the HandoutPage. Thus, it's a + // MasterPage, but has no MPBGO, so there is nothing to do here. + } + else + { + drawinglayer::attribute::SdrFillAttribute aFill; + + // #i110846# Suppress SdrPage FillStyle for MasterPages without StyleSheets, + // else the PoolDefault (XFILL_COLOR and Blue8) will be used. Normally, all + // MasterPages should have a StyleSheet excactly for this reason, but historically + // e.g. the Notes MasterPage has no StyleSheet set (and there maybe others). + if(rPage.getSdrPageProperties().GetStyleSheet()) + { + // create page fill attributes with correct properties + aFill = drawinglayer::primitive2d::createNewSdrFillAttribute( + rPage.getSdrPageProperties().GetItemSet()); + } + + if(!aFill.isDefault()) + { + // direct model data is the page size, get and use it + const basegfx::B2DRange aInnerRange( + rPage.GetLftBorder(), rPage.GetUppBorder(), + rPage.GetWdt() - rPage.GetRgtBorder(), rPage.GetHgt() - rPage.GetLwrBorder()); + const basegfx::B2DPolygon aInnerPolgon(basegfx::tools::createPolygonFromRect(aInnerRange)); + const drawinglayer::primitive2d::Primitive2DReference xReference( drawinglayer::primitive2d::createPolyPolygonFillPrimitive( - basegfx::B2DPolyPolygon(aInnerPolgon), + basegfx::B2DPolyPolygon(aInnerPolgon), aFill, drawinglayer::attribute::FillGradientAttribute())); - - xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); - } - } + + xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); + } + } } return xRetval; @@ -297,7 +297,7 @@ namespace sdr const basegfx::B2DPolygon aPageFillPolygon(basegfx::tools::createPolygonFromRect(aPageFillRange)); // We have only the page information, not the view information. Use the - // svtools::DOCCOLOR color for initialisation + // svtools::DOCCOLOR color for initialization const svtools::ColorConfig aColorConfig; const Color aPageFillColor(aColorConfig.GetColorValue(svtools::DOCCOLOR).nColor); @@ -305,7 +305,7 @@ namespace sdr const basegfx::BColor aRGBColor(aPageFillColor.getBColor()); const drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D(basegfx::B2DPolyPolygon(aPageFillPolygon), aRGBColor)); - return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); + return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); } ViewContactOfPageFill::ViewContactOfPageFill(ViewContactOfSdrPage& rParentViewContactOfSdrPage) @@ -335,46 +335,46 @@ namespace sdr drawinglayer::primitive2d::Primitive2DSequence ViewContactOfOuterPageBorder::createViewIndependentPrimitive2DSequence() const { - drawinglayer::primitive2d::Primitive2DSequence xRetval; + drawinglayer::primitive2d::Primitive2DSequence xRetval; const SdrPage& rPage = getPage(); const basegfx::B2DRange aPageBorderRange(0.0, 0.0, (double)rPage.GetWdt(), (double)rPage.GetHgt()); - - // Changed to 0x949599 for renaissance, before svtools::FONTCOLOR was used. - // Added old case as fallback for HighContrast. + + // Changed to 0x949599 for renaissance, before svtools::FONTCOLOR was used. + // Added old case as fallback for HighContrast. basegfx::BColor aRGBBorderColor(0x94 / (double)0xff, 0x95 / (double)0xff, 0x99 / (double)0xff); if(Application::GetSettings().GetStyleSettings().GetHighContrastMode()) { - const svtools::ColorConfig aColorConfig; + const svtools::ColorConfig aColorConfig; const Color aBorderColor(aColorConfig.GetColorValue(svtools::FONTCOLOR).nColor); - - aRGBBorderColor = aBorderColor.getBColor(); + + aRGBBorderColor = aBorderColor.getBColor(); + } + + if(rPage.getPageBorderOnlyLeftRight()) + { + // #i93597# for Report Designer, the page border shall be only displayed right and left, + // but not top and bottom. Create simplified geometry. + basegfx::B2DPolygon aLeft, aRight; + + aLeft.append(basegfx::B2DPoint(aPageBorderRange.getMinX(), aPageBorderRange.getMinY())); + aLeft.append(basegfx::B2DPoint(aPageBorderRange.getMinX(), aPageBorderRange.getMaxY())); + + aRight.append(basegfx::B2DPoint(aPageBorderRange.getMaxX(), aPageBorderRange.getMinY())); + aRight.append(basegfx::B2DPoint(aPageBorderRange.getMaxX(), aPageBorderRange.getMaxY())); + + xRetval.realloc(2); + xRetval[0] = drawinglayer::primitive2d::Primitive2DReference(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aLeft, aRGBBorderColor)); + xRetval[1] = drawinglayer::primitive2d::Primitive2DReference(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aRight, aRGBBorderColor)); + } + else + { + xRetval.realloc(1); + const basegfx::B2DPolygon aPageBorderPolygon(basegfx::tools::createPolygonFromRect(aPageBorderRange)); + xRetval[0] = drawinglayer::primitive2d::Primitive2DReference(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aPageBorderPolygon, aRGBBorderColor)); } - if(rPage.getPageBorderOnlyLeftRight()) - { - // #i93597# for Report Designer, the page border shall be only displayed right and left, - // but not top and bottom. Create simplified geometry. - basegfx::B2DPolygon aLeft, aRight; - - aLeft.append(basegfx::B2DPoint(aPageBorderRange.getMinX(), aPageBorderRange.getMinY())); - aLeft.append(basegfx::B2DPoint(aPageBorderRange.getMinX(), aPageBorderRange.getMaxY())); - - aRight.append(basegfx::B2DPoint(aPageBorderRange.getMaxX(), aPageBorderRange.getMinY())); - aRight.append(basegfx::B2DPoint(aPageBorderRange.getMaxX(), aPageBorderRange.getMaxY())); - - xRetval.realloc(2); - xRetval[0] = drawinglayer::primitive2d::Primitive2DReference(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aLeft, aRGBBorderColor)); - xRetval[1] = drawinglayer::primitive2d::Primitive2DReference(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aRight, aRGBBorderColor)); - } - else - { - xRetval.realloc(1); - const basegfx::B2DPolygon aPageBorderPolygon(basegfx::tools::createPolygonFromRect(aPageBorderRange)); - xRetval[0] = drawinglayer::primitive2d::Primitive2DReference(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aPageBorderPolygon, aRGBBorderColor)); - } - - return xRetval; + return xRetval; } ViewContactOfOuterPageBorder::ViewContactOfOuterPageBorder(ViewContactOfSdrPage& rParentViewContactOfSdrPage) @@ -406,7 +406,7 @@ namespace sdr { const SdrPage& rPage = getPage(); const basegfx::B2DRange aPageBorderRange( - (double)rPage.GetLftBorder(), (double)rPage.GetUppBorder(), + (double)rPage.GetLftBorder(), (double)rPage.GetUppBorder(), (double)(rPage.GetWdt() - rPage.GetRgtBorder()), (double)(rPage.GetHgt() - rPage.GetLwrBorder())); const basegfx::B2DPolygon aPageBorderPolygon(basegfx::tools::createPolygonFromRect(aPageBorderRange)); @@ -428,7 +428,7 @@ namespace sdr const basegfx::BColor aRGBBorderColor(aBorderColor.getBColor()); const drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aPageBorderPolygon, aRGBBorderColor)); - return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); + return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); } ViewContactOfInnerPageBorder::ViewContactOfInnerPageBorder(ViewContactOfSdrPage& rParentViewContactOfSdrPage) @@ -467,7 +467,7 @@ namespace sdr { const ViewContact& rCandidate(GetViewContact(a)); const drawinglayer::primitive2d::Primitive2DSequence aCandSeq(rCandidate.getViewIndependentPrimitive2DSequence()); - + drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, aCandSeq); } @@ -515,7 +515,7 @@ namespace sdr { // We have only the page information, not the view information and thus no grid settings. Create empty // default. For the view-dependent implementation, see ViewObjectContactOfPageGrid::createPrimitive2DSequence - return drawinglayer::primitive2d::Primitive2DSequence(); + return drawinglayer::primitive2d::Primitive2DSequence(); } ViewContactOfGrid::ViewContactOfGrid(ViewContactOfSdrPage& rParentViewContactOfSdrPage, bool bFront) @@ -548,7 +548,7 @@ namespace sdr { // We have only the page information, not the view information and thus no helplines. Create empty // default. For the view-dependent implementation, see ViewObjectContactOfPageHelplines::createPrimitive2DSequence - return drawinglayer::primitive2d::Primitive2DSequence(); + return drawinglayer::primitive2d::Primitive2DSequence(); } ViewContactOfHelplines::ViewContactOfHelplines(ViewContactOfSdrPage& rParentViewContactOfSdrPage, bool bFront) @@ -603,9 +603,9 @@ namespace sdr // Access to possible sub-hierarchy sal_uInt32 ViewContactOfSdrPage::GetObjectCount() const { - // Fixed count of content. It contains PageBackground (Wiese), PageShadow, PageFill, + // Fixed count of content. It contains PageBackground (Wiese), PageShadow, PageFill, // then - depending on if the page has a MasterPage - either MasterPage Hierarchy - // or MPBGO. Also OuterPageBorder, InnerPageBorder and two pairs of Grid and Helplines + // or MPBGO. Also OuterPageBorder, InnerPageBorder and two pairs of Grid and Helplines // (for front and back) which internally are visible or not depending on the current // front/back setting for those. return 11; @@ -618,7 +618,7 @@ namespace sdr case 0: return (ViewContact&)maViewContactOfPageBackground; case 1: return (ViewContact&)maViewContactOfPageShadow; case 2: return (ViewContact&)maViewContactOfPageFill; - case 3: + case 3: { const SdrPage& rPage = GetSdrPage(); @@ -652,7 +652,7 @@ namespace sdr maViewContactOfPageBackground.ActionChanged(); maViewContactOfPageShadow.ActionChanged(); maViewContactOfPageFill.ActionChanged(); - + const SdrPage& rPage = GetSdrPage(); if(rPage.TRG_HasMasterPage()) @@ -663,7 +663,7 @@ namespace sdr { maViewContactOfMasterPage.ActionChanged(); } - + maViewContactOfOuterPageBorder.ActionChanged(); maViewContactOfInnerPageBorder.ActionChanged(); maViewContactOfGridBack.ActionChanged(); @@ -672,7 +672,7 @@ namespace sdr maViewContactOfHelplinesFront.ActionChanged(); } - // overload for acessing the SdrPage + // overload for accessing the SdrPage SdrPage* ViewContactOfSdrPage::TryToGetSdrPage() const { return &GetSdrPage(); @@ -686,27 +686,27 @@ namespace sdr drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, maViewContactOfPageBackground.getViewIndependentPrimitive2DSequence()); drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, maViewContactOfPageShadow.getViewIndependentPrimitive2DSequence()); drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, maViewContactOfPageFill.getViewIndependentPrimitive2DSequence()); - + const SdrPage& rPage = GetSdrPage(); if(rPage.TRG_HasMasterPage()) { - drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, + drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, rPage.TRG_GetMasterPageDescriptorViewContact().getViewIndependentPrimitive2DSequence()); } else if(rPage.IsMasterPage()) { - drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, + drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, maViewContactOfMasterPage.getViewIndependentPrimitive2DSequence()); } - + drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, maViewContactOfOuterPageBorder.getViewIndependentPrimitive2DSequence()); drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, maViewContactOfInnerPageBorder.getViewIndependentPrimitive2DSequence()); drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, maViewContactOfPageHierarchy.getViewIndependentPrimitive2DSequence()); // Only add front versions of grid and helplines since no visibility test is done, - // so adding the back incarnations is not necessary. This makes the Front - // visualisation the default when no visibility tests are done. + // so adding the back incarnations is not necessary. This makes the Front + // visualization the default when no visibility tests are done. // // Since we have no view here, no grid and helpline definitions are available currently. The used // methods at ViewContactOfHelplines and ViewContactOfGrid return only empty sequences and diff --git a/main/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx b/main/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx index 8beec4b..59420f3 100644 --- a/main/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx +++ b/main/svx/source/sdr/contact/viewcontactofsdrrectobj.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. - * + * *************************************************************/ @@ -53,21 +53,21 @@ namespace sdr const SfxItemSet& rItemSet = GetRectObj().GetMergedItemSet(); const drawinglayer::attribute::SdrLineFillShadowTextAttribute aAttribute( drawinglayer::primitive2d::createNewSdrLineFillShadowTextAttribute( - rItemSet, - GetRectObj().getText(0), - false)); + rItemSet, + GetRectObj().getText(0), + false)); // take unrotated snap rect (direct model data) for position and size const Rectangle& rRectangle = GetRectObj().GetGeoRect(); const ::basegfx::B2DRange aObjectRange( - rRectangle.Left(), rRectangle.Top(), + rRectangle.Left(), rRectangle.Top(), rRectangle.Right(), rRectangle.Bottom()); const GeoStat& rGeoStat(GetRectObj().GetGeoStat()); - + // fill object matrix basegfx::B2DHomMatrix aObjectMatrix(basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix( aObjectRange.getWidth(), aObjectRange.getHeight(), - rGeoStat.nShearWink ? tan((36000 - rGeoStat.nShearWink) * F_PI18000) : 0.0, + rGeoStat.nShearWink ? tan((36000 - rGeoStat.nShearWink) * F_PI18000) : 0.0, rGeoStat.nDrehWink ? (36000 - rGeoStat.nDrehWink) * F_PI18000 : 0.0, aObjectRange.getMinX(), aObjectRange.getMinY())); @@ -77,22 +77,22 @@ namespace sdr double fCornerRadiusY; drawinglayer::primitive2d::calculateRelativeCornerRadius(nCornerRadius, aObjectRange, fCornerRadiusX, fCornerRadiusY); - // #i105856# use knowledge about pickthrough from the model - const bool bPickThroughTransparentTextFrames( - GetRectObj().GetModel() && GetRectObj().GetModel()->IsPickThroughTransparentTextFrames()); + // #i105856# use knowledge about pickthrough from the model + const bool bPickThroughTransparentTextFrames( + GetRectObj().GetModel() && GetRectObj().GetModel()->IsPickThroughTransparentTextFrames()); - // create primitive. Always create primitives to allow the decomposition of + // create primitive. Always create primitives to allow the decomposition of // SdrRectanglePrimitive2D to create needed invisible elements for HitTest and/or BoundRect const drawinglayer::primitive2d::Primitive2DReference xReference( - new drawinglayer::primitive2d::SdrRectanglePrimitive2D( - aObjectMatrix, - aAttribute, - fCornerRadiusX, - fCornerRadiusY, - // #i105856# use fill for HitTest when TextFrame and not PickThrough - GetRectObj().IsTextFrame() && !bPickThroughTransparentTextFrames)); - - return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); + new drawinglayer::primitive2d::SdrRectanglePrimitive2D( + aObjectMatrix, + aAttribute, + fCornerRadiusX, + fCornerRadiusY, + // #i105856# use fill for HitTest when TextFrame and not PickThrough + GetRectObj().IsTextFrame() && !bPickThroughTransparentTextFrames)); + + return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); } } // end of namespace contact } // end of namespace sdr diff --git a/main/svx/source/sdr/contact/viewcontactoftextobj.cxx b/main/svx/source/sdr/contact/viewcontactoftextobj.cxx index d0cd8d0..1072c18 100644 --- a/main/svx/source/sdr/contact/viewcontactoftextobj.cxx +++ b/main/svx/source/sdr/contact/viewcontactoftextobj.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. - * + * *************************************************************/ diff --git a/main/svx/source/sdr/contact/viewcontactofvirtobj.cxx b/main/svx/source/sdr/contact/viewcontactofvirtobj.cxx index 37575e9..11bc4fb 100644 --- a/main/svx/source/sdr/contact/viewcontactofvirtobj.cxx +++ b/main/svx/source/sdr/contact/viewcontactofvirtobj.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. - * + * *************************************************************/ @@ -37,12 +37,12 @@ namespace sdr { namespace contact { - SdrVirtObj& ViewContactOfVirtObj::GetVirtObj() const + SdrVirtObj& ViewContactOfVirtObj::GetVirtObj() const { return (SdrVirtObj&)mrObject; } - ViewContactOfVirtObj::ViewContactOfVirtObj(SdrVirtObj& rObj) + ViewContactOfVirtObj::ViewContactOfVirtObj(SdrVirtObj& rObj) : ViewContactOfSdrObj(rObj) { } @@ -51,22 +51,22 @@ namespace sdr { } - // Access to possible sub-hierarchy + // Access to possible sub-hierarchy sal_uInt32 ViewContactOfVirtObj::GetObjectCount() const { - // Here, SdrVirtObj's need to return 0L to show that they have no - // sub-hierarchy, even when they are group objects. This is necessary - // to avoid that the same VOCs will be added to the draw hierarchy - // twice which leads to problems. + // Here, SdrVirtObj's need to return 0L to show that they have no + // sub-hierarchy, even when they are group objects. This is necessary + // to avoid that the same VOCs will be added to the draw hierarchy + // twice which leads to problems. // - // This solution is only a first solution to get things running. Later - // this needs to be replaced with creating real VOCs for the objects - // referenced by virtual objects to avoid the 'trick' of setting the - // offset for painting at the destination OutputDevive. + // This solution is only a first solution to get things running. Later + // this needs to be replaced with creating real VOCs for the objects + // referenced by virtual objects to avoid the 'trick' of setting the + // offset for painting at the destination OutputDevive. // // As can be seen, with primitives, the problem will be solved using // a transformPrimitive, so this solution can stay with primitives. - return 0L; + return 0L; } drawinglayer::primitive2d::Primitive2DSequence ViewContactOfVirtObj::createViewIndependentPrimitive2DSequence() const @@ -90,7 +90,7 @@ namespace sdr // create transform primitive const drawinglayer::primitive2d::Primitive2DReference xReference( new drawinglayer::primitive2d::TransformPrimitive2D( - aObjectMatrix, + aObjectMatrix, xSequenceVirtual)); return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); diff --git a/main/svx/source/sdr/contact/viewobjectcontactofe3d.cxx b/main/svx/source/sdr/contact/viewobjectcontactofe3d.cxx index c143f67..598bee2 100644 --- a/main/svx/source/sdr/contact/viewobjectcontactofe3d.cxx +++ b/main/svx/source/sdr/contact/viewobjectcontactofe3d.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. - * + * *************************************************************/ @@ -50,37 +50,37 @@ namespace sdr { } - drawinglayer::primitive3d::Primitive3DSequence ViewObjectContactOfE3d::createPrimitive3DSequence(const DisplayInfo& rDisplayInfo) const - { - // get the view-independent Primitive from the viewContact - const ViewContactOfE3d& rViewContactOfE3d(dynamic_cast< const ViewContactOfE3d& >(GetViewContact())); - drawinglayer::primitive3d::Primitive3DSequence xRetval(rViewContactOfE3d.getViewIndependentPrimitive3DSequence()); - - // handle ghosted - if(isPrimitiveGhosted(rDisplayInfo)) - { - const ::basegfx::BColor aRGBWhite(1.0, 1.0, 1.0); - const ::basegfx::BColorModifierSharedPtr aBColorModifier( - new basegfx::BColorModifier_interpolate( - aRGBWhite, - 0.5)); - const drawinglayer::primitive3d::Primitive3DReference xReference( - new drawinglayer::primitive3d::ModifiedColorPrimitive3D( - xRetval, - aBColorModifier)); - - xRetval = drawinglayer::primitive3d::Primitive3DSequence(&xReference, 1); - } - - return xRetval; - } + drawinglayer::primitive3d::Primitive3DSequence ViewObjectContactOfE3d::createPrimitive3DSequence(const DisplayInfo& rDisplayInfo) const + { + // get the view-independent Primitive from the viewContact + const ViewContactOfE3d& rViewContactOfE3d(dynamic_cast< const ViewContactOfE3d& >(GetViewContact())); + drawinglayer::primitive3d::Primitive3DSequence xRetval(rViewContactOfE3d.getViewIndependentPrimitive3DSequence()); + + // handle ghosted + if(isPrimitiveGhosted(rDisplayInfo)) + { + const ::basegfx::BColor aRGBWhite(1.0, 1.0, 1.0); + const ::basegfx::BColorModifierSharedPtr aBColorModifier( + new basegfx::BColorModifier_interpolate( + aRGBWhite, + 0.5)); + const drawinglayer::primitive3d::Primitive3DReference xReference( + new drawinglayer::primitive3d::ModifiedColorPrimitive3D( + xRetval, + aBColorModifier)); + + xRetval = drawinglayer::primitive3d::Primitive3DSequence(&xReference, 1); + } + + return xRetval; + } drawinglayer::primitive2d::Primitive2DSequence ViewObjectContactOfE3d::createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const { - const ViewContactOfE3d& rViewContact = static_cast< const ViewContactOfE3d& >(GetViewContact()); + const ViewContactOfE3d& rViewContact = static_cast< const ViewContactOfE3d& >(GetViewContact()); // get 3d primitive vector, isPrimitiveVisible() is done in 3d creator - return rViewContact.impCreateWithGivenPrimitive3DSequence(getPrimitive3DSequence(rDisplayInfo)); + return rViewContact.impCreateWithGivenPrimitive3DSequence(getPrimitive3DSequence(rDisplayInfo)); } drawinglayer::primitive3d::Primitive3DSequence ViewObjectContactOfE3d::getPrimitive3DSequence(const DisplayInfo& rDisplayInfo) const diff --git a/main/svx/source/sdr/contact/viewobjectcontactofgroup.cxx b/main/svx/source/sdr/contact/viewobjectcontactofgroup.cxx index 38d5d85..99e68d7 100644 --- a/main/svx/source/sdr/contact/viewobjectcontactofgroup.cxx +++ b/main/svx/source/sdr/contact/viewobjectcontactofgroup.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. - * + * *************************************************************/ @@ -51,7 +51,7 @@ namespace sdr { } - drawinglayer::primitive2d::Primitive2DSequence ViewObjectContactOfGroup::getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const + drawinglayer::primitive2d::Primitive2DSequence ViewObjectContactOfGroup::getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const { drawinglayer::primitive2d::Primitive2DSequence xRetval; @@ -63,7 +63,7 @@ namespace sdr if(nSubHierarchyCount) { const sal_Bool bDoGhostedDisplaying( - GetObjectContact().DoVisualizeEnteredGroup() + GetObjectContact().DoVisualizeEnteredGroup() && !GetObjectContact().isOutputToPrinter() && GetObjectContact().getActiveViewContact() == &GetViewContact()); @@ -81,7 +81,7 @@ namespace sdr const drawinglayer::geometry::ViewInformation2D& rViewInformation2D(GetObjectContact().getViewInformation2D()); const ::basegfx::B2DRange aObjectRange(drawinglayer::primitive2d::getB2DRangeFromPrimitive2DSequence(xRetval, rViewInformation2D)); const basegfx::B2DRange aViewRange(rViewInformation2D.getViewport()); - + // check geometrical visibility if(!aViewRange.isEmpty() && !aViewRange.overlaps(aObjectRange)) { diff --git a/main/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx b/main/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx index aebb223..9f7d480 100644 --- a/main/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx +++ b/main/svx/source/sdr/contact/viewobjectcontactofsdrobj.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. - * + * *************************************************************/ @@ -83,61 +83,61 @@ namespace sdr return false; } - // Test for Calc object hiding (for OLE and Graphic it's extra, see there) - const SdrPageView* pSdrPageView = GetObjectContact().TryToGetSdrPageView(); - - if(pSdrPageView) - { - const SdrView& rSdrView = pSdrPageView->GetView(); - const bool bHideOle(rSdrView.getHideOle()); - const bool bHideChart(rSdrView.getHideChart()); - const bool bHideDraw(rSdrView.getHideDraw()); - const bool bHideFormControl(rSdrView.getHideFormControl()); - - if(bHideOle || bHideChart || bHideDraw || bHideFormControl) - { - if(OBJ_OLE2 == rObject.GetObjIdentifier()) - { - if(((SdrOle2Obj&)rObject).IsChart()) - { - // chart - if(bHideChart) - { - return false; - } - } - else - { - // OLE - if(bHideOle) - { - return false; - } - } - } - else if(OBJ_GRAF == rObject.GetObjIdentifier()) - { - // graphic handled like OLE - if(bHideOle) - { - return false; - } - } - else - { - const bool bIsFormControl = dynamic_cast< const FmFormObj * >( &rObject ) != 0; - if(bIsFormControl && bHideFormControl) - { - return false; - } - // any other draw object - if(!bIsFormControl && bHideDraw) - { - return false; - } - } - } - } + // Test for Calc object hiding (for OLE and Graphic it's extra, see there) + const SdrPageView* pSdrPageView = GetObjectContact().TryToGetSdrPageView(); + + if(pSdrPageView) + { + const SdrView& rSdrView = pSdrPageView->GetView(); + const bool bHideOle(rSdrView.getHideOle()); + const bool bHideChart(rSdrView.getHideChart()); + const bool bHideDraw(rSdrView.getHideDraw()); + const bool bHideFormControl(rSdrView.getHideFormControl()); + + if(bHideOle || bHideChart || bHideDraw || bHideFormControl) + { + if(OBJ_OLE2 == rObject.GetObjIdentifier()) + { + if(((SdrOle2Obj&)rObject).IsChart()) + { + // chart + if(bHideChart) + { + return false; + } + } + else + { + // OLE + if(bHideOle) + { + return false; + } + } + } + else if(OBJ_GRAF == rObject.GetObjIdentifier()) + { + // graphic handled like OLE + if(bHideOle) + { + return false; + } + } + else + { + const bool bIsFormControl = dynamic_cast< const FmFormObj * >( &rObject ) != 0; + if(bIsFormControl && bHideFormControl) + { + return false; + } + // any other draw object + if(!bIsFormControl && bHideDraw) + { + return false; + } + } + } + } return true; } diff --git a/main/svx/source/sdr/contact/viewobjectcontactredirector.cxx b/main/svx/source/sdr/contact/viewobjectcontactredirector.cxx index 63e5641..a794227 100644 --- a/main/svx/source/sdr/contact/viewobjectcontactredirector.cxx +++ b/main/svx/source/sdr/contact/viewobjectcontactredirector.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. - * + * *************************************************************/ @@ -44,7 +44,7 @@ namespace sdr } drawinglayer::primitive2d::Primitive2DSequence ViewObjectContactRedirector::createRedirectedPrimitive2DSequence( - const sdr::contact::ViewObjectContact& rOriginal, + const sdr::contact::ViewObjectContact& rOriginal, const sdr::contact::DisplayInfo& rDisplayInfo) { return rOriginal.createPrimitive2DSequence(rDisplayInfo);