LCOV - code coverage report
Current view: top level - sc/source/ui/dbgui - sortdlg.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 0 33 0.0 %
Date: 2015-06-13 12:38:46 Functions: 0 9 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #undef SC_DLLIMPLEMENTATION
      21             : 
      22             : #include <vcl/msgbox.hxx>
      23             : #include "tpsort.hxx"
      24             : #include "sortdlg.hxx"
      25             : #include "scresid.hxx"
      26             : 
      27           0 : ScSortDlg::ScSortDlg(vcl::Window* pParent, const SfxItemSet* pArgSet)
      28             :     : SfxTabDialog(pParent, "SortDialog", "modules/scalc/ui/sortdialog.ui", pArgSet)
      29             :     , bIsHeaders(false)
      30           0 :     , bIsByRows(false)
      31             : {
      32           0 :     AddTabPage("criteria", ScTabPageSortFields::Create, 0);
      33           0 :     AddTabPage("options", ScTabPageSortOptions::Create, 0);
      34           0 : }
      35             : 
      36           0 : ScSortWarningDlg::ScSortWarningDlg(vcl::Window* pParent,
      37             :     const OUString& rExtendText, const OUString& rCurrentText)
      38           0 :     : ModalDialog(pParent, "SortWarning", "modules/scalc/ui/sortwarning.ui")
      39             : {
      40           0 :     get( aFtText, "sorttext" );
      41           0 :     get( aBtnExtSort, "extend" );
      42           0 :     get( aBtnCurSort, "current" );
      43             : 
      44           0 :     OUString sTextName = aFtText->GetText();
      45           0 :     sTextName = sTextName.replaceFirst("%1", rExtendText);
      46           0 :     sTextName = sTextName.replaceFirst("%2", rCurrentText);
      47           0 :     aFtText->SetText( sTextName );
      48             : 
      49           0 :     aBtnExtSort->SetClickHdl( LINK( this, ScSortWarningDlg, BtnHdl ) );
      50           0 :     aBtnCurSort->SetClickHdl( LINK( this, ScSortWarningDlg, BtnHdl ) );
      51           0 : }
      52             : 
      53           0 : ScSortWarningDlg::~ScSortWarningDlg()
      54             : {
      55           0 :     disposeOnce();
      56           0 : }
      57             : 
      58           0 : void ScSortWarningDlg::dispose()
      59             : {
      60           0 :     aFtText.clear();
      61           0 :     aBtnExtSort.clear();
      62           0 :     aBtnCurSort.clear();
      63           0 :     ModalDialog::dispose();
      64           0 : }
      65             : 
      66           0 : IMPL_LINK( ScSortWarningDlg, BtnHdl, PushButton*, pBtn )
      67             : {
      68           0 :     if ( pBtn == aBtnExtSort )
      69             :     {
      70           0 :         EndDialog( BTN_EXTEND_RANGE );
      71             :     }
      72           0 :     else if( pBtn == aBtnCurSort )
      73             :     {
      74           0 :         EndDialog( BTN_CURRENT_SELECTION );
      75             :     }
      76           0 :     return 0;
      77           0 : }
      78             : 
      79             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11