Diff of /win32/ScintillaWin.cxx [b8341c] .. [982cc1]  Maximize  Restore

  Switch to unified view

a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx
...
...
195
    HRGN hRgnUpdate;
195
    HRGN hRgnUpdate;
196
196
197
    bool hasOKText;
197
    bool hasOKText;
198
198
199
    CLIPFORMAT cfColumnSelect;
199
    CLIPFORMAT cfColumnSelect;
200
  CLIPFORMAT cfColumnSelectBorland;
200
    CLIPFORMAT cfLineSelect;
201
    CLIPFORMAT cfLineSelect;
201
202
202
    HRESULT hrOle;
203
    HRESULT hrOle;
203
    DropSource ds;
204
    DropSource ds;
204
    DataObject dob;
205
    DataObject dob;
...
...
313
314
314
    friend class DropSource;
315
    friend class DropSource;
315
    friend class DataObject;
316
    friend class DataObject;
316
    friend class DropTarget;
317
    friend class DropTarget;
317
    bool DragIsRectangularOK(CLIPFORMAT fmt) const {
318
    bool DragIsRectangularOK(CLIPFORMAT fmt) const {
318
        return drag.rectangular && (fmt == cfColumnSelect);
319
        return drag.rectangular && ((fmt == cfColumnSelect) || (fmt == cfColumnSelectBorland));
319
    }
320
    }
320
321
321
private:
322
private:
322
    // For use in creating a system caret
323
    // For use in creating a system caret
323
    bool HasCaretSizeChanged() const;
324
    bool HasCaretSizeChanged() const;
...
...
345
    hRgnUpdate = 0;
346
    hRgnUpdate = 0;
346
347
347
    hasOKText = false;
348
    hasOKText = false;
348
349
349
    // There does not seem to be a real standard for indicating that the clipboard
350
    // There does not seem to be a real standard for indicating that the clipboard
350
    // contains a rectangular selection, so copy Developer Studio.
351
    // contains a rectangular selection, so copy Developer Studio and Borland Delphi.
351
    cfColumnSelect = static_cast<CLIPFORMAT>(
352
    cfColumnSelect = static_cast<CLIPFORMAT>(
352
        ::RegisterClipboardFormat(TEXT("MSDEVColumnSelect")));
353
        ::RegisterClipboardFormat(TEXT("MSDEVColumnSelect")));
354
  cfColumnSelectBorland = static_cast<CLIPFORMAT>(
355
      ::RegisterClipboardFormat(TEXT("Borland IDE Block Type")));
353
356
354
    // Likewise for line-copy (copies a full line when no text is selected)
357
    // Likewise for line-copy (copies a full line when no text is selected)
355
    cfLineSelect = static_cast<CLIPFORMAT>(
358
    cfLineSelect = static_cast<CLIPFORMAT>(
356
        ::RegisterClipboardFormat(TEXT("MSDEVLineSelect")));
359
        ::RegisterClipboardFormat(TEXT("MSDEVLineSelect")));
357
360
...
...
1695
    bool isLine = SelectionEmpty() && (::IsClipboardFormatAvailable(cfLineSelect) != 0);
1698
    bool isLine = SelectionEmpty() && (::IsClipboardFormatAvailable(cfLineSelect) != 0);
1696
    ClearSelection(multiPasteMode == SC_MULTIPASTE_EACH);
1699
    ClearSelection(multiPasteMode == SC_MULTIPASTE_EACH);
1697
    SelectionPosition selStart = sel.IsRectangular() ?
1700
    SelectionPosition selStart = sel.IsRectangular() ?
1698
        sel.Rectangular().Start() :
1701
        sel.Rectangular().Start() :
1699
        sel.Range(sel.Main()).Start();
1702
        sel.Range(sel.Main()).Start();
1700
  bool isRectangular = ::IsClipboardFormatAvailable(cfColumnSelect) != 0;
1703
  bool isRectangular = ((::IsClipboardFormatAvailable(cfColumnSelect) != 0) || (::IsClipboardFormatAvailable(cfColumnSelectBorland) != 0));
1701
1704
1702
    // Always use CF_UNICODETEXT if available
1705
    // Always use CF_UNICODETEXT if available
1703
    GlobalMemory memUSelection(::GetClipboardData(CF_UNICODETEXT));
1706
    GlobalMemory memUSelection(::GetClipboardData(CF_UNICODETEXT));
1704
    if (memUSelection) {
1707
    if (memUSelection) {
1705
        wchar_t *uptr = static_cast<wchar_t *>(memUSelection.ptr);
1708
        wchar_t *uptr = static_cast<wchar_t *>(memUSelection.ptr);
...
...
2242
        }
2245
        }
2243
    }
2246
    }
2244
2247
2245
    if (selectedText.rectangular) {
2248
    if (selectedText.rectangular) {
2246
        ::SetClipboardData(cfColumnSelect, 0);
2249
        ::SetClipboardData(cfColumnSelect, 0);
2250
      GlobalMemory borlandColumn;
2251
      borlandColumn.Allocate(1);
2252
      if (borlandColumn) {
2253
          static_cast<BYTE *>(borlandColumn.ptr)[0] = 0x02;
2254
          borlandColumn.SetClip(cfColumnSelectBorland);
2255
      }
2247
    }
2256
    }
2248
2257
2249
    if (selectedText.lineCopy) {
2258
    if (selectedText.lineCopy) {
2250
        ::SetClipboardData(cfLineSelect, 0);
2259
        ::SetClipboardData(cfLineSelect, 0);
2251
    }
2260
    }

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks