LibreOffice Module sw (master) 1
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
sw::util::SetLayer Class Reference

Make setting a drawing object's layer in a Writer document easy. More...

#include <writerhelper.hxx>

Collaboration diagram for sw::util::SetLayer:
[legend]

Public Member Functions

void SendObjectToHell (SdrObject &rObject) const
 Make Object live in the bottom drawing layer. More...
 
void SendObjectToHeaven (SdrObject &rObject) const
 Make Object lives in the top layer. More...
 
 SetLayer (const SwDoc &rDoc)
 Normal constructor. More...
 

Private Types

enum  Layer {
  eHeaven ,
  eHell
}
 

Private Member Functions

void SetObjectLayer (SdrObject &rObject, Layer eLayer) const
 

Private Attributes

SdrLayerID mnHeavenLayer
 
SdrLayerID mnHellLayer
 
SdrLayerID mnFormLayer
 

Detailed Description

Make setting a drawing object's layer in a Writer document easy.

Word has the simple concept of a drawing object either in the foreground and in the background. We have an additional complexity that form components live in a separate layer, which seems unnecessarily complicated. So in the winword filter we set the object's layer through this class with either SendObjectToHell for the bottom layer and SendObjectToHeaven for the top and we don't worry about the odd form layer design wrinkle.

Definition at line 473 of file writerhelper.hxx.

Member Enumeration Documentation

◆ Layer

Enumerator
eHeaven 
eHell 

Definition at line 477 of file writerhelper.hxx.

Constructor & Destructor Documentation

◆ SetLayer()

sw::util::SetLayer::SetLayer ( const SwDoc rDoc)
explicit

Normal constructor.

Parameters
rDocThe Writer document whose drawing layers we will be inserting objects into

Definition at line 372 of file writerhelper.cxx.

Member Function Documentation

◆ SendObjectToHeaven()

void sw::util::SetLayer::SendObjectToHeaven ( SdrObject rObject) const

Make Object lives in the top layer.

Parameters
rObjectThe object to be set to the top layer

Definition at line 346 of file writerhelper.cxx.

References eHeaven, and SetObjectLayer().

Referenced by wwZOrderer::InsertDrawingObject(), wwZOrderer::InsertTextLayerObject(), and SwWW8ImplReader::Read_GrafLayer().

◆ SendObjectToHell()

void sw::util::SetLayer::SendObjectToHell ( SdrObject rObject) const

Make Object live in the bottom drawing layer.

Parameters
rObjectThe object to be set to the bottom layer

Definition at line 341 of file writerhelper.cxx.

References eHell, and SetObjectLayer().

Referenced by wwZOrderer::InsertDrawingObject(), and SwWW8ImplReader::Read_GrafLayer().

◆ SetObjectLayer()

void sw::util::SetLayer::SetObjectLayer ( SdrObject rObject,
Layer  eLayer 
) const
private

Member Data Documentation

◆ mnFormLayer

SdrLayerID sw::util::SetLayer::mnFormLayer
private

Definition at line 476 of file writerhelper.hxx.

Referenced by SetObjectLayer().

◆ mnHeavenLayer

SdrLayerID sw::util::SetLayer::mnHeavenLayer
private

Definition at line 476 of file writerhelper.hxx.

Referenced by SetObjectLayer().

◆ mnHellLayer

SdrLayerID sw::util::SetLayer::mnHellLayer
private

Definition at line 476 of file writerhelper.hxx.

Referenced by SetObjectLayer().


The documentation for this class was generated from the following files: