LCOV - code coverage report
Current view: top level - sd/source/ui/framework/configuration - ConfigurationTracer.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 0 2 0.0 %
Date: 2015-06-13 12:38:46 Functions: 0 1 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 "ConfigurationTracer.hxx"
      21             : 
      22             : #include <cstdio>
      23             : #include "sal/log.hxx"
      24             : 
      25             : using namespace ::com::sun::star::uno;
      26             : using namespace ::com::sun::star::drawing::framework;
      27             : 
      28             : namespace sd { namespace framework {
      29             : 
      30           0 : void ConfigurationTracer::TraceConfiguration (
      31             :     const Reference<XConfiguration>& rxConfiguration,
      32             :     const char* pMessage)
      33             : {
      34             : #ifdef DEBUG
      35             :     SAL_INFO("sd.ui","" << pMessage << " at " << rxConfiguration.get() << " {");
      36             :     if (rxConfiguration.is())
      37             :     {
      38             :         TraceBoundResources(rxConfiguration, NULL, 0);
      39             :     }
      40             :     else
      41             :     {
      42             :         SAL_INFO("sd.ui","    empty");
      43             :     }
      44             :     SAL_INFO("sd.ui","}");
      45             : #else
      46             :     (void)rxConfiguration;
      47             :     (void)pMessage;
      48             : #endif
      49           0 : }
      50             : 
      51             : #ifdef DEBUG
      52             : void ConfigurationTracer::TraceBoundResources (
      53             :     const Reference<XConfiguration>& rxConfiguration,
      54             :     const Reference<XResourceId>& rxResourceId,
      55             :     const int nIndentation)
      56             : {
      57             :     Sequence<Reference<XResourceId> > aResourceList (
      58             :         rxConfiguration->getResources(rxResourceId, OUString(), AnchorBindingMode_DIRECT));
      59             :     const OUString sIndentation ("    ");
      60             :     for (sal_Int32 nIndex=0; nIndex<aResourceList.getLength(); ++nIndex)
      61             :     {
      62             :         OUString sLine (aResourceList[nIndex]->getResourceURL());
      63             :         for (int i=0; i<nIndentation; ++i)
      64             :             sLine = sIndentation + sLine;
      65             :         SAL_INFO("sd.ui","" << OUStringToOString(sLine, RTL_TEXTENCODING_UTF8).getStr());
      66             :         TraceBoundResources(rxConfiguration, aResourceList[nIndex], nIndentation+1);
      67             :     }
      68             : }
      69             : #endif
      70             : 
      71             : } } // end of namespace sd::framework
      72             : 
      73             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11