Class: Axlsx::PictureLocking

Inherits:
Object
  • Object
show all
Defined in:
lib/axlsx/drawing/picture_locking.rb

Overview

The picture locking class defines the locking properties for pictures in your workbook.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ PictureLocking

Creates a new PictureLocking object

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • noGrp (Boolean)
  • noSelect (Boolean)
  • noRot (Boolean)
  • noChangeAspect (Boolean)
  • noMove (Boolean)
  • noResize (Boolean)
  • noEditPoints (Boolean)
  • noAdjustHandles (Boolean)
  • noChangeArrowheads (Boolean)
  • noChangeShapeType (Boolean)


28
29
30
31
32
33
# File 'lib/axlsx/drawing/picture_locking.rb', line 28

def initialize(options={})
  @noChangeAspect = true
  options.each do |o|
    self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}="
  end
end

Instance Attribute Details

#noAdjustHandlesObject

Returns the value of attribute noAdjustHandles.



13
14
15
# File 'lib/axlsx/drawing/picture_locking.rb', line 13

def noAdjustHandles
  @noAdjustHandles
end

#noChangeArrowheadsObject

Returns the value of attribute noChangeArrowheads.



14
15
16
# File 'lib/axlsx/drawing/picture_locking.rb', line 14

def noChangeArrowheads
  @noChangeArrowheads
end

#noChangeAspectObject

Returns the value of attribute noChangeAspect.



9
10
11
# File 'lib/axlsx/drawing/picture_locking.rb', line 9

def noChangeAspect
  @noChangeAspect
end

#noChangeShapeTypeObject

Returns the value of attribute noChangeShapeType.



15
16
17
# File 'lib/axlsx/drawing/picture_locking.rb', line 15

def noChangeShapeType
  @noChangeShapeType
end

#noEditPointsObject

Returns the value of attribute noEditPoints.



12
13
14
# File 'lib/axlsx/drawing/picture_locking.rb', line 12

def noEditPoints
  @noEditPoints
end

#noGrpObject

Returns the value of attribute noGrp.



6
7
8
# File 'lib/axlsx/drawing/picture_locking.rb', line 6

def noGrp
  @noGrp
end

#noMoveObject

Returns the value of attribute noMove.



10
11
12
# File 'lib/axlsx/drawing/picture_locking.rb', line 10

def noMove
  @noMove
end

#noResizeObject

Returns the value of attribute noResize.



11
12
13
# File 'lib/axlsx/drawing/picture_locking.rb', line 11

def noResize
  @noResize
end

#noRotObject

Returns the value of attribute noRot.



8
9
10
# File 'lib/axlsx/drawing/picture_locking.rb', line 8

def noRot
  @noRot
end

#noSelectObject

Returns the value of attribute noSelect.



7
8
9
# File 'lib/axlsx/drawing/picture_locking.rb', line 7

def noSelect
  @noSelect
end

Instance Method Details

#to_xml(xml) ⇒ String

Serializes the picture locking

Parameters:

  • xml (Nokogiri::XML::Builder)

    The document builder instance this objects xml will be added to.

Returns:

  • (String)


68
69
70
# File 'lib/axlsx/drawing/picture_locking.rb', line 68

def to_xml(xml)
  xml[:a].picLocks(self.instance_values)      
end