LCOV - code coverage report
Current view: top level - cui/source/tabpages - bbdlg.cxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 0 21 0.0 %
Date: 2014-11-03 Functions: 0 4 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             : #include "bbdlg.hxx"
      21             : #include "border.hxx"
      22             : #include "backgrnd.hxx"
      23             : //UUUU
      24             : #include "svx/svxids.hrc"
      25             : #include "cuitabarea.hxx"
      26             : 
      27           0 : SvxBorderBackgroundDlg::SvxBorderBackgroundDlg(vcl::Window *pParent,
      28             :     const SfxItemSet& rCoreSet,
      29             :     bool bEnableSelector,
      30             :     bool bEnableDrawingLayerFillStyles)
      31             :     : SfxTabDialog(pParent,
      32             :         bEnableDrawingLayerFillStyles
      33             :             ? OString("BorderAreaTransparencyDialog")
      34             :             : OString("BorderBackgroundDialog"),
      35             :         bEnableDrawingLayerFillStyles
      36             :             ? OUString("cui/ui/borderareatransparencydialog.ui")
      37             :             : OUString("cui/ui/borderbackgrounddialog.ui"),
      38             :         &rCoreSet)
      39             :     , mbEnableBackgroundSelector(bEnableSelector)
      40             :     , mbEnableDrawingLayerFillStyles(bEnableDrawingLayerFillStyles)
      41             :     , m_nBackgroundPageId(0)
      42             :     , m_nAreaPageId(0)
      43           0 :     , m_nTransparencePageId(0)
      44             : {
      45           0 :     AddTabPage("borders", SvxBorderTabPage::Create, 0 );
      46           0 :     if (mbEnableDrawingLayerFillStyles)
      47             :     {
      48             :         //UUUU Here we want full DrawingLayer FillStyle access, so add Area and Transparency TabPages
      49           0 :         m_nAreaPageId = AddTabPage("area", SvxAreaTabPage::Create, 0);
      50           0 :         m_nTransparencePageId = AddTabPage("transparence", SvxTransparenceTabPage::Create, 0);
      51             :     }
      52             :     else
      53             :     {
      54           0 :         m_nBackgroundPageId = AddTabPage("background", SvxBackgroundTabPage::Create, 0 );
      55             :     }
      56           0 : }
      57             : 
      58           0 : void SvxBorderBackgroundDlg::PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage )
      59             : {
      60           0 :     if (nPageId == m_nBackgroundPageId)
      61             :     {
      62             :         // allow switching between Color/graphic
      63           0 :         if(mbEnableBackgroundSelector)
      64             :         {
      65           0 :             static_cast< SvxBackgroundTabPage& >(rTabPage).ShowSelector();
      66             :         }
      67             :     }
      68             :     //UUUU inits for Area and Transparency TabPages
      69             :     // The selection attribute lists (XPropertyList derivates, e.g. XColorList for
      70             :     // the color table) need to be added as items (e.g. SvxColorTableItem) to make
      71             :     // these pages find the needed attributes for fill style suggestions.
      72             :     // These are added in SwDocStyleSheet::GetItemSet() for the SFX_STYLE_FAMILY_PARA on
      73             :     // demand, but could also be directly added from the DrawModel.
      74           0 :     else if (nPageId == m_nAreaPageId)
      75             :     {
      76             :         SfxItemSet aNew(
      77           0 :             *GetInputSetImpl()->GetPool(),
      78             :             SID_COLOR_TABLE, SID_BITMAP_LIST,
      79             :             SID_OFFER_IMPORT, SID_OFFER_IMPORT,
      80           0 :             0, 0);
      81             : 
      82           0 :         aNew.Put(*GetInputSetImpl());
      83             : 
      84             :         // add flag for direct graphic content selection
      85           0 :         aNew.Put(SfxBoolItem(SID_OFFER_IMPORT, true));
      86             : 
      87           0 :         rTabPage.PageCreated(aNew);
      88             :     }
      89           0 :     else if (nPageId == m_nTransparencePageId)
      90             :     {
      91           0 :         rTabPage.PageCreated(*GetInputSetImpl());
      92             :     }
      93           0 : }
      94             : 
      95             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10