Package com._1c.g5.v8.dt.moxel.ui.editor
Class ClipboardPasteUtil
- java.lang.Object
-
- com._1c.g5.v8.dt.moxel.ui.editor.ClipboardPasteUtil
-
public final class ClipboardPasteUtil extends Object
Utils for pasting from the clipboard
-
-
Field Summary
Fields Modifier and Type Field Description static int
STR_PROPERTIES_SHIFT
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Drawing
copyDrawingFromClipboard(Drawing drawing, SheetAccessor document, SheetAccessor sheet, long mask, int nFirstCol, int nFirstRow, boolean calcParameters, boolean oneLocale)
static Area
getClipboardSheetSelection(MoxelDescriptor descriptor)
Get selection area of clipboard sheet, specified by descriptorstatic SpreadsheetRect
getDrawingsSelectionRect(List<Drawing> drawings)
Get total rect, containing all of the drawings' position rectsstatic Selection
getNormalizedSelection(SheetAccessor sheet, Selection selection, UUID id, int sizeX, int sizeY)
Get normalized selectionstatic List<Selection>
getNormalizedSelectionToPaste(SheetAccessor sheet, List<Selection> selections, UUID id, int sizeX, int sizeY)
Get list of normalized selections for pastingstatic int
getSelectionHeight(Selection selection, SheetAccessor sheet)
Get height of specified selectionstatic int
getSelectionWidth(Selection selection, SheetAccessor sheet)
Get width of specified selectionstatic boolean
isSelectionAcceptableToFill(Area area, Selection selection)
Check if it's possible to fill the selection with specified areastatic boolean
isSelectionsAcceptableToFill(Area sel, List<Selection> selections)
Check if all of the listed selections are acceptable to fillstatic Selection
makeSelectionCopy(Selection selection)
Make copy of specified selectionstatic void
pasteSelectionDrawings(Selection selection, List<Drawing> selectedDrawings, SheetAccessor document, SheetAccessor sheet, List<Drawing> oldDrawings, PositionHolder positionHolder)
Paste selected drawingsstatic void
pasteSheetCells(PasteSpecialOptions pasteOptions, boolean oneLocale, int sizeX, int sizeY, Selection selection, SheetAccessor srcSheet, SheetAccessor dstSheet)
Paste sheet into specified selection.void
postUpdateCellsValues(SheetAccessor sheet, Selection selection)
Post update values of cells in specified selectionstatic void
unmergeSelection(Selection selection, SheetAccessor sheet)
Make correct unmerges into specified selection
-
-
-
Field Detail
-
STR_PROPERTIES_SHIFT
public static final int STR_PROPERTIES_SHIFT
- See Also:
- Constant Field Values
-
-
Method Detail
-
getSelectionHeight
public static int getSelectionHeight(Selection selection, SheetAccessor sheet)
Get height of specified selection- Parameters:
selection
-sheet
-- Returns:
-
getSelectionWidth
public static int getSelectionWidth(Selection selection, SheetAccessor sheet)
Get width of specified selection- Parameters:
selection
-sheet
-- Returns:
-
getNormalizedSelection
public static Selection getNormalizedSelection(SheetAccessor sheet, Selection selection, UUID id, int sizeX, int sizeY)
Get normalized selection- Parameters:
sheet
-selection
-id
-sizeX
-sizeY
-- Returns:
-
getNormalizedSelectionToPaste
public static List<Selection> getNormalizedSelectionToPaste(SheetAccessor sheet, List<Selection> selections, UUID id, int sizeX, int sizeY)
Get list of normalized selections for pasting- Parameters:
sheet
-selections
-id
-sizeX
-sizeY
-- Returns:
-
getClipboardSheetSelection
public static Area getClipboardSheetSelection(MoxelDescriptor descriptor)
Get selection area of clipboard sheet, specified by descriptor- Parameters:
descriptor
-- Returns:
-
makeSelectionCopy
public static Selection makeSelectionCopy(Selection selection)
Make copy of specified selection- Parameters:
selection
-- Returns:
-
isSelectionAcceptableToFill
public static boolean isSelectionAcceptableToFill(Area area, Selection selection)
Check if it's possible to fill the selection with specified area- Parameters:
area
-selection
-- Returns:
-
isSelectionsAcceptableToFill
public static boolean isSelectionsAcceptableToFill(Area sel, List<Selection> selections)
Check if all of the listed selections are acceptable to fill- Parameters:
sel
-selections
-- Returns:
-
pasteSheetCells
public static void pasteSheetCells(PasteSpecialOptions pasteOptions, boolean oneLocale, int sizeX, int sizeY, Selection selection, SheetAccessor srcSheet, SheetAccessor dstSheet)
Paste sheet into specified selection.- Parameters:
pasteOptions
-PasteSpecialOptions
, must not benull
oneLocale
-true
in case of using single language,false
otherwisesizeX
- horizontal size of document being pastedsizeY
- vertical size of document being pastedselection
- paste area, must not benull
srcSheet
- source sheet, must not benull
dstSheet
- destination sheet, must not benull
-
pasteSelectionDrawings
public static void pasteSelectionDrawings(Selection selection, List<Drawing> selectedDrawings, SheetAccessor document, SheetAccessor sheet, List<Drawing> oldDrawings, PositionHolder positionHolder)
Paste selected drawings- Parameters:
selection
-document
-sheet
-
-
getDrawingsSelectionRect
public static SpreadsheetRect getDrawingsSelectionRect(List<Drawing> drawings)
Get total rect, containing all of the drawings' position rects- Parameters:
drawings
-- Returns:
-
unmergeSelection
public static void unmergeSelection(Selection selection, SheetAccessor sheet)
Make correct unmerges into specified selection- Parameters:
selection
-sheet
-
-
copyDrawingFromClipboard
public Drawing copyDrawingFromClipboard(Drawing drawing, SheetAccessor document, SheetAccessor sheet, long mask, int nFirstCol, int nFirstRow, boolean calcParameters, boolean oneLocale)
-
postUpdateCellsValues
public void postUpdateCellsValues(SheetAccessor sheet, Selection selection)
Post update values of cells in specified selection- Parameters:
sheet
-SheetAccessor
selection
-Selection
-
-