예제 #1
0
파일: Headers.cpp 프로젝트: KDE/koffice
void KCColumnHeader::mouseDoubleClickEvent(QMouseEvent*)
{
    if (!m_cellToolIsActive)
        return;
    register KCSheet * const sheet = m_pView->activeSheet();
    if (!sheet)
        return;

    if (!m_pView->koDocument()->isReadWrite() || sheet->isProtected())
        return;

    AdjustColumnRowManipulator* command = new AdjustColumnRowManipulator();
    command->setSheet(sheet);
    command->setAdjustColumn(true);
    command->add(*m_pView->selection());
    command->execute();
}
예제 #2
0
void ColumnHeader::mouseDoubleClick(KoPointerEvent*)
{
    if (!m_cellToolIsActive)
        return;
    register Sheet * const sheet = m_pCanvas->activeSheet();
    if (!sheet)
        return;

    if (sheet->isProtected())
        return;

    AdjustColumnRowManipulator* command = new AdjustColumnRowManipulator();
    command->setSheet(sheet);
    command->setAdjustColumn(true);
    command->add(*m_pCanvas->selection());
    command->execute();
}