Skip to content

Commit

Permalink
Remove unused functions.
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Holesovsky <[email protected]>
Change-Id: I79d9a5028a64e30b68b6a9aeb3389dfb7d083bc9
  • Loading branch information
kendy committed Dec 22, 2020
1 parent 2a87c77 commit 08f0e99
Show file tree
Hide file tree
Showing 32 changed files with 1 addition and 592 deletions.
1 change: 0 additions & 1 deletion loleaflet/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,6 @@ LOLEAFLET_JS =\
src/dom/PosAnimation.js \
src/map/anim/Map.PanAnimation.js \
src/dom/PosAnimation.Timer.js \
src/map/anim/Map.FlyTo.js \
src/layer/AnnotationManagerBase.js \
src/layer/AnnotationManager.js \
src/layer/AnnotationManagerImpress.js \
Expand Down
11 changes: 0 additions & 11 deletions loleaflet/src/control/Control.ColumnHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -441,17 +441,6 @@ L.Control.ColumnHeader = L.Control.Header.extend({
this.drawOutline();
},

_colAlphaToNumber: function(alpha) {
var res = 0;
var offset = 'A'.charCodeAt();
for (var i = 0; i < alpha.length; i++) {
var chr = alpha[alpha.length - i - 1];
res += (chr.charCodeAt() - offset + 1) * Math.pow(26, i);
}

return res;
},

_colIndexToAlpha: function(columnNumber) {
var offset = 'A'.charCodeAt();
var dividend = columnNumber;
Expand Down
21 changes: 0 additions & 21 deletions loleaflet/src/control/Control.Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -894,33 +894,12 @@ L.Control.Header.HeaderInfo = L.Class.extend({
return hdrPos + this._docVisStart;
},

getStartOffset: function() {
return 0;
},

isZeroSize: function (i) {
var elem = this._elements[i];
console.assert(elem, 'queried a non existent row/col in the header : ' + i);
return elem.size === 0;
},

hasSplits: function () {
return this._hasSplits;
},

// Index after the split.
getSplitIndex: function () {
return this._splitIndex;
},

getStartIndex: function () {
return this._startIndex;
},

getEndIndex: function () {
return this._endIndex;
},

getMinIndex: function () {
return this._hasSplits ? 0 : this._startIndex;
},
Expand Down
10 changes: 0 additions & 10 deletions loleaflet/src/control/Control.Layers.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,6 @@ L.Control.Layers = L.Control.extend({
return this._container;
},

addBaseLayer: function (layer, name) {
this._addLayer(layer, name);
return this._update();
},

addOverlay: function (layer, name) {
this._addLayer(layer, name, true);
return this._update();
},

removeLayer: function (layer) {
layer.off('add remove', this._onLayerChange, this);

Expand Down
4 changes: 0 additions & 4 deletions loleaflet/src/control/Control.RowHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,6 @@ L.Control.RowHeader = L.Control.Header.extend({
this.updateCurrent(y, slim);
},

_updateRowHeader: function () {
this._map._docLayer.refreshViewData({x: 0, y: this._map._getTopLeftPoint().y, offset: {x: 0, y: undefined}});
},

drawHeaderEntry: function (entry, isOver, isHighlighted, isCurrent) {
if (!entry)
return;
Expand Down
24 changes: 0 additions & 24 deletions loleaflet/src/control/Parts.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,6 @@ L.Map.include({
'broadcast=no');
},

removePreviewUpdate: function (id) {
if (this._docPreviews && this._docPreviews[id]) {
this._docPreviews[id].autoUpdate = false;
}
},

goToPage: function (page) {
var docLayer = this._docLayer;
if (page === 'prev') {
Expand Down Expand Up @@ -411,10 +405,6 @@ L.Map.include({
return this._docLayer.hasAnyHiddenPart();
},

getNumberOfPages: function () {
return this._docLayer._pages;
},

getNumberOfParts: function () {
return this._docLayer._parts;
},
Expand All @@ -423,20 +413,6 @@ L.Map.include({
return this.getNumberOfParts() - this._docLayer.hiddenParts();
},

getHiddenPartNames: function () {
var partNames = this._docLayer._partNames;
var names = [];
for (var i = 0; i < partNames.length; ++i) {
if (this.isHiddenPart(i))
names.push(partNames[i]);
}
return names.join(',');
},

getCurrentPageNumber: function () {
return this._docLayer._currentPage;
},

getCurrentPartNumber: function () {
return this._docLayer._selectedPart;
},
Expand Down
8 changes: 0 additions & 8 deletions loleaflet/src/control/Permission.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,14 +148,6 @@ L.Map.include({
this.dragging.enable();
},

isSelectionEnabled: function () {
return !this.dragging.enabled();
},

getPermission: function () {
return this._permission;
},

isPermissionEditForComments: function() {
return true;
},
Expand Down
14 changes: 0 additions & 14 deletions loleaflet/src/control/Scroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,6 @@ L.Map.include({
this.panBy(new L.Point(x, y), {animate: false});
},

scrollDown: function (y, options) {
this.scroll(0, y, options);
},

scrollRight: function (x, options) {
this.scroll(x, 0, options);
},

scrollOffset: function () {
var center = this.project(this.getCenter());
var centerOffset = center.subtract(this.getSize().divideBy(2));
Expand Down Expand Up @@ -49,10 +41,4 @@ L.Map.include({
this.off('moveend', this._docLayer._updateScrollOffset, this._docLayer);
}
},

fitWidthZoom: function (maxZoom) {
if (this._docLayer) {
this._docLayer._fitWidthZoom(null, maxZoom);
}
}
});
19 changes: 0 additions & 19 deletions loleaflet/src/control/Toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,25 +219,6 @@ L.Map.include({
this.fire('selectbackground', {file: file});
},

cellEnterString: function (string) {
var command = {
'StringName': {
type: 'string',
value: string
},
'DontCommit': {
type: 'boolean',
value: true
}
};

this.sendUnoCommand('.uno:EnterString ', command);
},

renderFont: function (fontName) {
this._socket.sendMessage('renderfont font=' + window.encodeURIComponent(fontName));
},

showHelp: function(id) {
var w;
var iw = window.innerWidth;
Expand Down
5 changes: 0 additions & 5 deletions loleaflet/src/core/LOUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@ L.LOUtil = {
return '#' + ('000000' + color.toString(16)).slice(-6);
},

stringToPoint: function(point) {
var numbers = point.match(/\d+/g);
return L.point(parseInt(numbers[0]), parseInt(numbers[1]));
},

stringToBounds: function(bounds) {
var numbers = bounds.match(/\d+/g);
var topLeft = L.point(parseInt(numbers[0]), parseInt(numbers[1]));
Expand Down
11 changes: 1 addition & 10 deletions loleaflet/src/core/Util.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,6 @@ L.Util = {
return obj.options;
},

// make a URL with GET parameters out of a set of properties/values
getParamString: function (obj, existingUrl, uppercase) {
var params = [];
for (var i in obj) {
params.push(encodeURIComponent(uppercase ? i.toUpperCase() : i) + '=' + encodeURIComponent(obj[i]));
}
return ((!existingUrl || existingUrl.indexOf('?') === -1) ? '?' : '&') + params.join('&');
},

round: function(x, e) {
if (!e) {
return Math.round(x);
Expand Down Expand Up @@ -289,4 +280,4 @@ L.getDpiScaleFactor = L.Util.getDpiScaleFactor;
L.toggleFullScreen = L.Util.toggleFullScreen;
L.isEmpty = L.Util.isEmpty;
L.mm100thToInch = L.Util.mm100thToInch;
L.getTextWidth = L.Util.getTextWidth;
L.getTextWidth = L.Util.getTextWidth;
4 changes: 0 additions & 4 deletions loleaflet/src/dom/DomUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,6 @@ L.DomUtil = {
return el._leaflet_pos;
},

isLandscape: function() {
return window.matchMedia && window.matchMedia('(orientation: landscape)').matches;
},

isPortrait: function() {
return window.matchMedia && window.matchMedia('(orientation: portrait)').matches;
},
Expand Down
9 changes: 0 additions & 9 deletions loleaflet/src/geo/LatLng.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,6 @@ L.LatLng.prototype = {
wrap: function () {
return L.CRS.Earth.wrapLatLng(this);
},

toBounds: function (sizeInMeters) {
var latAccuracy = 180 * sizeInMeters / 40075017,
lngAccuracy = latAccuracy / Math.cos((Math.PI / 180) * this.lat);

return L.latLngBounds(
[this.lat - latAccuracy, this.lng - lngAccuracy],
[this.lat + latAccuracy, this.lng + lngAccuracy]);
}
};


Expand Down
16 changes: 0 additions & 16 deletions loleaflet/src/geo/LatLngBounds.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,6 @@ L.LatLngBounds.prototype = {
return this;
},

// extend the bounds by a percentage
pad: function (bufferRatio) { // (Number) -> LatLngBounds
var sw = this._southWest,
ne = this._northEast,
heightBuffer = Math.abs(sw.lat - ne.lat) * bufferRatio,
widthBuffer = Math.abs(sw.lng - ne.lng) * bufferRatio;

return new L.LatLngBounds(
new L.LatLng(sw.lat - heightBuffer, sw.lng - widthBuffer),
new L.LatLng(ne.lat + heightBuffer, ne.lng + widthBuffer));
},

// extend the bounds by a percentage
padVertically: function (bufferRatio) { // (Number) -> LatLngBounds
var sw = this._southWest,
Expand Down Expand Up @@ -174,10 +162,6 @@ L.LatLngBounds.prototype = {
return latIntersects && lngIntersects;
},

toBBoxString: function () {
return [this.getWest(), this.getSouth(), this.getEast(), this.getNorth()].join(',');
},

equals: function (bounds) { // (LatLngBounds)
if (!bounds) { return false; }

Expand Down
4 changes: 0 additions & 4 deletions loleaflet/src/geometry/LineUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ L.LineUtil = {
return Math.sqrt(this._sqClosestPointOnSegment(p, p1, p2, true));
},

closestPointOnSegment: function (p, p1, p2) {
return this._sqClosestPointOnSegment(p, p1, p2);
},

// Douglas-Peucker simplification, see http://en.wikipedia.org/wiki/Douglas-Peucker_algorithm
_simplifyDP: function (points, sqTolerance) {

Expand Down
11 changes: 0 additions & 11 deletions loleaflet/src/layer/Layer.Popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,6 @@ L.Layer.include({
return this;
},

setPopupContent: function (content) {
if (this._popup) {
this._popup.setContent(content);
}
return this;
},

getPopup: function () {
return this._popup;
},

_openPopup: function (e) {
this._map.openPopup(this._popup, e.latlng);
},
Expand Down
4 changes: 0 additions & 4 deletions loleaflet/src/layer/LayerGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,6 @@ L.LayerGroup = L.Layer.extend({
return this;
},

getLayer: function (id) {
return this._layers[id];
},

getLayers: function () {
var layers = [];

Expand Down
4 changes: 0 additions & 4 deletions loleaflet/src/layer/Popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,6 @@ L.Popup = L.Layer.extend({
return this;
},

getContent: function () {
return this._content;
},

setContent: function (content) {
this._content = content;
this.update();
Expand Down
Loading

0 comments on commit 08f0e99

Please sign in to comment.