Skip to content

Commit

Permalink
Bug 1540062 - Get rid of nsIPlaintextEditor.setWrapColumn. r=masayuki
Browse files Browse the repository at this point in the history
No one (m-c, c-c and bluegriffon) uses nsIPlaintextEditor.setWrapColumn from
script. It is used from C++ only.

Differential Revision: https://phabricator.services.mozilla.com/D25363
  • Loading branch information
makotokato committed Mar 29, 2019
1 parent 55f9fcb commit 49146a1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 14 deletions.
6 changes: 0 additions & 6 deletions editor/libeditor/TextEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1597,12 +1597,6 @@ TextEditor::SetWrapWidth(int32_t aWrapColumn) {
true);
}

NS_IMETHODIMP
TextEditor::SetWrapColumn(int32_t aWrapColumn) {
mWrapColumn = aWrapColumn;
return NS_OK;
}

NS_IMETHODIMP
TextEditor::GetNewlineHandling(int32_t* aNewlineHandling) {
NS_ENSURE_ARG_POINTER(aNewlineHandling);
Expand Down
8 changes: 8 additions & 0 deletions editor/libeditor/TextEditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,14 @@ class TextEditor : public EditorBase, public nsIPlaintextEditor {
return NS_OK;
}

/**
* Similar to the setter for wrapWidth, but just sets the editor
* internal state without actually changing the content being edited
* to wrap at that column. This should only be used by callers who
* are sure that their content is already set up correctly.
*/
void SetWrapColumn(int32_t aWrapColumn) { mWrapColumn = aWrapColumn; }

protected: // May be called by friends.
/****************************************************************************
* Some classes like TextEditRules, HTMLEditRules, WSRunObject which are
Expand Down
8 changes: 0 additions & 8 deletions editor/nsIPlaintextEditor.idl
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,6 @@ interface nsIPlaintextEditor : nsISupports
*/
attribute long wrapWidth;

/**
* Similar to the setter for wrapWidth, but just sets the editor
* internal state without actually changing the content being edited
* to wrap at that column. This should only be used by callers who
* are sure that their content is already set up correctly.
*/
void setWrapColumn(in long aWrapColumn);

/** Get and set newline handling.
*
* Values are the constants defined above.
Expand Down

0 comments on commit 49146a1

Please sign in to comment.