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 a70413d Fixed typos, removed whitespace, change document border color (Draw/Impress) to black a70413d is described below commit a70413d29f1883bcae9ae9c56de4a4edc73bcc8d Author: mseidel <msei...@apache.org> AuthorDate: Fri Dec 3 21:31:57 2021 +0100 Fixed typos, removed whitespace, change document border color (Draw/Impress) to black (cherry picked from commit 16bba488c3d48e207291611c0a87d272868594f2) --- main/svx/source/sdr/contact/objectcontact.cxx | 68 +++++----- main/svx/source/sdr/contact/viewcontact.cxx | 144 ++++++++++----------- .../sdr/contact/viewcontactofsdrmeasureobj.cxx | 22 ++-- .../source/sdr/contact/viewcontactofsdrpage.cxx | 8 +- .../sdr/contact/viewobjectcontactofsdrmediaobj.cxx | 50 +++---- 5 files changed, 146 insertions(+), 146 deletions(-) diff --git a/main/svx/source/sdr/contact/objectcontact.cxx b/main/svx/source/sdr/contact/objectcontact.cxx index 18d509c..1efb6f9 100644 --- a/main/svx/source/sdr/contact/objectcontact.cxx +++ b/main/svx/source/sdr/contact/objectcontact.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. - * + * *************************************************************/ @@ -98,12 +98,12 @@ namespace sdr { maViewObjectContactVector.push_back(&rVOContact); } - + // A ViewObjectContact was deleted and shall be forgotten. void ObjectContact::RemoveViewObjectContact(ViewObjectContact& rVOContact) { std::vector< ViewObjectContact* >::iterator aFindResult = std::find(maViewObjectContactVector.begin(), maViewObjectContactVector.end(), &rVOContact); - + if(aFindResult != maViewObjectContactVector.end()) { maViewObjectContactVector.erase(aFindResult); @@ -129,7 +129,7 @@ namespace sdr // default has no active VC return 0; } - + // Invalidate given rectangle at the window/output which is represented by // this ObjectContact. void ObjectContact::InvalidatePartOfView(const basegfx::B2DRange& /*rRange*/) const @@ -164,7 +164,7 @@ namespace sdr } // method to get the EventHandler. It will - // return a existing one or create a new one using CreateEventHandler(). + // return an existing one or create a new one using CreateEventHandler(). sdr::event::TimerEventHandler& ObjectContact::GetEventHandler() const { if(!HasEventHandler()) @@ -205,7 +205,7 @@ namespace sdr return true; } - // check if asynchronious graphis loading is allowed. Default is false. + // check if asynchronous graphics loading is allowed. Default is false. bool ObjectContact::IsAsynchronGraphicsLoadingAllowed() const { return false; @@ -279,37 +279,37 @@ namespace sdr return false; } - // access to SdrPageView. Default implementation returns NULL + // access to SdrPageView. Default implementation returns NULL SdrPageView* ObjectContact::TryToGetSdrPageView() const - { - return 0; - } - + { + return 0; + } + // access to OutputDevice. Default implementation returns NULL OutputDevice* ObjectContact::TryToGetOutputDevice() const - { - return 0; - } + { + return 0; + } - void ObjectContact::resetViewPort() - { + void ObjectContact::resetViewPort() + { const drawinglayer::geometry::ViewInformation2D& rCurrentVI2D = getViewInformation2D(); - if(!rCurrentVI2D.getViewport().isEmpty()) - { - const basegfx::B2DRange aEmptyRange; - - drawinglayer::geometry::ViewInformation2D aNewVI2D( - rCurrentVI2D.getObjectTransformation(), - rCurrentVI2D.getViewTransformation(), - aEmptyRange, - rCurrentVI2D.getVisualizedPage(), - rCurrentVI2D.getViewTime(), - rCurrentVI2D.getExtendedInformationSequence()); - - updateViewInformation2D(aNewVI2D); - } - } + if(!rCurrentVI2D.getViewport().isEmpty()) + { + const basegfx::B2DRange aEmptyRange; + + drawinglayer::geometry::ViewInformation2D aNewVI2D( + rCurrentVI2D.getObjectTransformation(), + rCurrentVI2D.getViewTransformation(), + aEmptyRange, + rCurrentVI2D.getVisualizedPage(), + rCurrentVI2D.getViewTime(), + rCurrentVI2D.getExtendedInformationSequence()); + + updateViewInformation2D(aNewVI2D); + } + } } // end of namespace contact } // end of namespace sdr diff --git a/main/svx/source/sdr/contact/viewcontact.cxx b/main/svx/source/sdr/contact/viewcontact.cxx index a9993da..29235c8 100644 --- a/main/svx/source/sdr/contact/viewcontact.cxx +++ b/main/svx/source/sdr/contact/viewcontact.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. - * + * *************************************************************/ @@ -39,7 +39,7 @@ namespace sdr { namespace contact { - // Create a Object-Specific ViewObjectContact, set ViewContact and + // Create a Object-Specific ViewObjectContact, set ViewContact and // ObjectContact. Always needs to return something. Default is to create // a standard ViewObjectContact containing the given ObjectContact and *this ViewObjectContact& ViewContact::CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) @@ -48,7 +48,7 @@ namespace sdr } ViewContact::ViewContact() - : maViewObjectContactVector(), + : maViewObjectContactVector(), mxViewIndependentPrimitive2DSequence() { } @@ -66,8 +66,8 @@ namespace sdr ViewContact::~ViewContact() { - deleteAllVOCs(); - } + deleteAllVOCs(); + } void ViewContact::deleteAllVOCs() { @@ -89,10 +89,10 @@ namespace sdr // all ViewObjectContacts can be deleted, too. delete pCandidate; } - + // assert when there were new entries added during deletion DBG_ASSERT(maViewObjectContactVector.empty(), "Corrupted ViewObjectContactList in VC (!)"); - } + } // get a Object-specific ViewObjectContact for a specific // ObjectContact (->View). Always needs to return something. @@ -115,7 +115,7 @@ namespace sdr if(!pRetval) { - // create a new one. It's inserted to the local list from the + // create a new one. It's inserted to the local list from the // VieObjectContact constructor via AddViewObjectContact() pRetval = &CreateObjectSpecificViewObjectContact(rObjectContact); } @@ -133,20 +133,20 @@ namespace sdr StartGettingViewed(); } } - + // A ViewObjectContact was deleted and shall be forgotten. void ViewContact::RemoveViewObjectContact(ViewObjectContact& rVOContact) { std::vector< ViewObjectContact* >::iterator aFindResult = std::find(maViewObjectContactVector.begin(), maViewObjectContactVector.end(), &rVOContact); - + if(aFindResult != maViewObjectContactVector.end()) { maViewObjectContactVector.erase(aFindResult); if(maViewObjectContactVector.empty()) { - // This may need to get asynchron later since it eventually triggers - // deletes of OCs where the VOC is still added. + // This may need to get asynchron later since it eventually triggers + // deletes of OCs where the VOC is still added. StopGettingViewed(); } } @@ -159,21 +159,21 @@ namespace sdr const sal_uInt32 nCount(maViewObjectContactVector.size()); if(bExcludePreviews) - { - for(sal_uInt32 a(0); a < nCount; a++) - { - if(!maViewObjectContactVector[a]->GetObjectContact().IsPreviewRenderer()) - { - return true; - } - } - - return false; - } - else - { - return (0L != nCount); - } + { + for(sal_uInt32 a(0); a < nCount; a++) + { + if(!maViewObjectContactVector[a]->GetObjectContact().IsPreviewRenderer()) + { + return true; + } + } + + return false; + } + else + { + return (0L != nCount); + } } // Test if this ViewContact has ViewObjectContacts at all. This can @@ -194,7 +194,7 @@ namespace sdr } // Access to possible sub-hierarchy and parent. GetObjectCount() default is 0L - // and GetViewContact default pops up an assert since it's an error if + // and GetViewContact default pops up an assert since it's an error if // GetObjectCount has a result != 0 and it's not overloaded. sal_uInt32 ViewContact::GetObjectCount() const { @@ -208,7 +208,7 @@ namespace sdr DBG_ERROR("ViewContact::GetViewContact: This call needs to be overloaded when GetObjectCount() can return results != 0 (!)"); return (ViewContact&)(*this); } - + ViewContact* ViewContact::GetParentContact() const { // default has no parent @@ -217,7 +217,7 @@ namespace sdr void ViewContact::ActionChildInserted(ViewContact& rChild) { - // propagate change to all exsisting visualisations which + // propagate change to all existing visualizations which // will force a VOC for the new child and invalidate it's range const sal_uInt32 nCount(maViewObjectContactVector.size()); @@ -236,7 +236,7 @@ namespace sdr void ViewContact::ActionChanged() { // propagate change to all existing VOCs. This will invalidate - // all drawn visualisations in all known views + // all drawn visualizations in all known views const sal_uInt32 nCount(maViewObjectContactVector.size()); for(sal_uInt32 a(0); a < nCount; a++) @@ -265,18 +265,18 @@ namespace sdr drawinglayer::primitive2d::Primitive2DSequence ViewContact::createViewIndependentPrimitive2DSequence() const { - // This is the default impelemtation and should never be called (see header). If this is called, - // someone implemented a ViewContact (VC) visualisation object without defining the visualisation by - // providing a seqence of primitives -> which cannot be correct. - // Since we have no access to any known model data here, the default implementation creates a yellow placeholder - // hairline polygon with a default size of (1000, 1000, 5000, 3000) - DBG_ERROR("ViewContact::createViewIndependentPrimitive2DSequence(): Never call the fallback base implementation, this is always an error (!)"); - const basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(basegfx::B2DRange(1000.0, 1000.0, 5000.0, 3000.0))); + // This is the default implementation and should never be called (see header). If this is called, + // someone implemented a ViewContact (VC) visualization object without defining the visualization by + // providing a sequence of primitives -> which cannot be correct. + // Since we have no access to any known model data here, the default implementation creates a yellow placeholder + // hairline polygon with a default size of (1000, 1000, 5000, 3000) + DBG_ERROR("ViewContact::createViewIndependentPrimitive2DSequence(): Never call the fallback base implementation, this is always an error (!)"); + const basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(basegfx::B2DRange(1000.0, 1000.0, 5000.0, 3000.0))); const basegfx::BColor aYellow(1.0, 1.0, 0.0); const drawinglayer::primitive2d::Primitive2DReference xReference( - new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aOutline, aYellow)); + new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aOutline, aYellow)); - return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); + return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); } drawinglayer::primitive2d::Primitive2DSequence ViewContact::getViewIndependentPrimitive2DSequence() const @@ -284,11 +284,11 @@ namespace sdr // local up-to-date checks. Create new list and compare. drawinglayer::primitive2d::Primitive2DSequence xNew(createViewIndependentPrimitive2DSequence()); - if(xNew.hasElements()) - { - // allow evtl. embedding in object-specific infos, e.g. Name, Title, Description - xNew = embedToObjectSpecificInformation(xNew); - } + if(xNew.hasElements()) + { + // allow evtl. embedding in object-specific infos, e.g. Name, Title, Description + xNew = embedToObjectSpecificInformation(xNew); + } if(!drawinglayer::primitive2d::arePrimitive2DSequencesEqual(mxViewIndependentPrimitive2DSequence, xNew)) { @@ -299,7 +299,7 @@ namespace sdr // return current Primitive2DSequence return mxViewIndependentPrimitive2DSequence; } - + // add Gluepoints (if available) drawinglayer::primitive2d::Primitive2DSequence ViewContact::createGluePointPrimitive2DSequence() const { @@ -307,29 +307,29 @@ namespace sdr return drawinglayer::primitive2d::Primitive2DSequence(); } - drawinglayer::primitive2d::Primitive2DSequence ViewContact::embedToObjectSpecificInformation(const drawinglayer::primitive2d::Primitive2DSequence& rSource) const - { - // nothing to do for default - return rSource; - } - - void ViewContact::flushViewObjectContacts(bool bWithHierarchy) - { - if(bWithHierarchy) - { - // flush DrawingLayer hierarchy - const sal_uInt32 nCount(GetObjectCount()); - - for(sal_uInt32 a(0); a < nCount; a++) - { - ViewContact& rChild = GetViewContact(a); - rChild.flushViewObjectContacts(bWithHierarchy); - } - } - - // delete local VOCs - deleteAllVOCs(); - } + drawinglayer::primitive2d::Primitive2DSequence ViewContact::embedToObjectSpecificInformation(const drawinglayer::primitive2d::Primitive2DSequence& rSource) const + { + // nothing to do for default + return rSource; + } + + void ViewContact::flushViewObjectContacts(bool bWithHierarchy) + { + if(bWithHierarchy) + { + // flush DrawingLayer hierarchy + const sal_uInt32 nCount(GetObjectCount()); + + for(sal_uInt32 a(0); a < nCount; a++) + { + ViewContact& rChild = GetViewContact(a); + rChild.flushViewObjectContacts(bWithHierarchy); + } + } + + // delete local VOCs + deleteAllVOCs(); + } } // end of namespace contact } // end of namespace sdr diff --git a/main/svx/source/sdr/contact/viewcontactofsdrmeasureobj.cxx b/main/svx/source/sdr/contact/viewcontactofsdrmeasureobj.cxx index 2c0114c..0c7adf8 100644 --- a/main/svx/source/sdr/contact/viewcontactofsdrmeasureobj.cxx +++ b/main/svx/source/sdr/contact/viewcontactofsdrmeasureobj.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. - * + * *************************************************************/ @@ -55,8 +55,8 @@ namespace sdr const SfxItemSet& rItemSet = GetMeasureObj().GetMergedItemSet(); const drawinglayer::attribute::SdrLineShadowTextAttribute aAttribute( drawinglayer::primitive2d::createNewSdrLineShadowTextAttribute( - rItemSet, - GetMeasureObj().getText(0))); + rItemSet, + GetMeasureObj().getText(0))); // take properties which are the model data. const ::basegfx::B2DPoint aStart(GetMeasureObj().GetPoint(0).X(), GetMeasureObj().GetPoint(0).Y()); @@ -119,15 +119,15 @@ namespace sdr } } - // create primitive with the model data. Always create primitives to allow the + // create primitive with the model data. Always create primitives to allow the // decomposition of SdrMeasurePrimitive2D to create needed invisible elements for HitTest // and/or BoundRect const drawinglayer::primitive2d::Primitive2DReference xReference( new drawinglayer::primitive2d::SdrMeasurePrimitive2D( - aAttribute, aStart, aEnd, - aMTPHor, aMTPVer, fDistance, - fUpperDistance, fLowerDistance, - fLeftDelta, fRightDelta, bBelow, + aAttribute, aStart, aEnd, + aMTPHor, aMTPVer, fDistance, + fUpperDistance, fLowerDistance, + fLeftDelta, fRightDelta, bBelow, bTextRotation, bTextAutoAngle)); 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 97fdf5d..44b7b44 100644 --- a/main/svx/source/sdr/contact/viewcontactofsdrpage.cxx +++ b/main/svx/source/sdr/contact/viewcontactofsdrpage.cxx @@ -94,7 +94,7 @@ namespace sdr drawinglayer::primitive2d::Primitive2DSequence ViewContactOfPageBackground::createViewIndependentPrimitive2DSequence() const { // 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 aInitColor(aColorConfig.GetColorValue(svtools::DOCCOLOR).nColor); const basegfx::BColor aRGBColor(aInitColor.getBColor()); @@ -339,9 +339,9 @@ namespace sdr 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. + // Changed to 0x000000 as in Writer, before svtools::FONTCOLOR was used. // Added old case as fallback for HighContrast. - basegfx::BColor aRGBBorderColor(0x94 / (double)0xff, 0x95 / (double)0xff, 0x99 / (double)0xff); + basegfx::BColor aRGBBorderColor(0x00 / (double)0xff, 0x00 / (double)0xff, 0x00 / (double)0xff); if(Application::GetSettings().GetStyleSettings().GetHighContrastMode()) { @@ -411,7 +411,7 @@ namespace sdr const basegfx::B2DPolygon aPageBorderPolygon(basegfx::tools::createPolygonFromRect(aPageBorderRange)); // We have only the page information, not the view information. Use the - // svtools::FONTCOLOR or svtools::DOCBOUNDARIES color for initialisation + // svtools::FONTCOLOR or svtools::DOCBOUNDARIES color for initialization const svtools::ColorConfig aColorConfig; Color aBorderColor; diff --git a/main/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx b/main/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx index 72ef856..eebfd6e 100644 --- a/main/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx +++ b/main/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.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,15 +44,15 @@ namespace sdr { namespace contact { // ---------------------------------- // - ViewObjectContactOfSdrMediaObj - // ---------------------------------- - -ViewObjectContactOfSdrMediaObj::ViewObjectContactOfSdrMediaObj( ObjectContact& rObjectContact, + +ViewObjectContactOfSdrMediaObj::ViewObjectContactOfSdrMediaObj( ObjectContact& rObjectContact, ViewContact& rViewContact, const ::avmedia::MediaItem& rMediaItem ) : ViewObjectContactOfSdrObj( rObjectContact, rViewContact ), mpMediaWindow( NULL ) { Window* pWindow = getWindow(); - + if( pWindow ) { mpMediaWindow = new SdrMediaWindow( pWindow, *this ); @@ -91,7 +91,7 @@ Window* ViewObjectContactOfSdrMediaObj::getWindow() const } OutputDevice& rOutDev = pPaintWindow->GetOutputDevice(); - + if(OUTDEV_WINDOW == rOutDev.GetOutDevType()) { pRetval = static_cast< Window* >(&rOutDev); @@ -113,28 +113,28 @@ bool ViewObjectContactOfSdrMediaObj::hasPreferredSize() const Size ViewObjectContactOfSdrMediaObj::getPreferredSize() const { Size aRet; - + if( mpMediaWindow ) aRet = mpMediaWindow->getPreferredSize(); - + return aRet; } // ------------------------------------------------------------------------------ - + void ViewObjectContactOfSdrMediaObj::updateMediaItem( ::avmedia::MediaItem& rItem ) const { if( mpMediaWindow ) - { + { mpMediaWindow->updateMediaItem( rItem ); - // show/hide is now dependent of play state - if(avmedia::MEDIASTATE_STOP == rItem.getState()) - { - mpMediaWindow->hide(); - } - else - { + // show/hide is now dependent of play state + if(avmedia::MEDIASTATE_STOP == rItem.getState()) + { + mpMediaWindow->hide(); + } + else + { basegfx::B2DRange aViewRange(getObjectRange()); aViewRange.transform(GetObjectContact().getViewInformation2D().getViewTransformation()); @@ -143,21 +143,21 @@ void ViewObjectContactOfSdrMediaObj::updateMediaItem( ::avmedia::MediaItem& rIte (sal_Int32)ceil(aViewRange.getMaxX()), (sal_Int32)ceil(aViewRange.getMaxY())); mpMediaWindow->setPosSize(aViewRectangle); - mpMediaWindow->show(); - } - } + mpMediaWindow->show(); + } + } } // ------------------------------------------------------------------------------ - + void ViewObjectContactOfSdrMediaObj::executeMediaItem( const ::avmedia::MediaItem& rItem ) { if( mpMediaWindow ) { ::avmedia::MediaItem aUpdatedItem; - + mpMediaWindow->executeMediaItem( rItem ); - + // query new properties after trying to set the new properties updateMediaItem( aUpdatedItem ); static_cast< ViewContactOfSdrMediaObj& >( GetViewContact() ).mediaPropertiesChanged( aUpdatedItem );