| 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 "ChartTypePanel.hxx" |
| 21 |
#include <TimerTriggeredControllerLock.hxx> |
| 22 |
|
| 23 |
#include <ChartController.hxx> |
| 24 |
#include <ChartModel.hxx> |
| 25 |
#include <ChartResourceGroups.hxx> |
| 26 |
#include <ChartTypeDialogController.hxx> |
| 27 |
#include <ChartTypeManager.hxx> |
| 28 |
#include <ChartTypeTemplate.hxx> |
| 29 |
#include <Diagram.hxx> |
| 30 |
#include <unonames.hxx> |
| 31 |
|
| 32 |
#include <svtools/valueset.hxx> |
| 33 |
#include <comphelper/diagnose_ex.hxx> |
| 34 |
|
| 35 |
using namespace css; |
| 36 |
using namespace css::uno; |
| 37 |
|
| 38 |
namespace chart::sidebar |
| 39 |
{ |
| 40 |
ChartTypePanel::ChartTypePanel(weld::Widget* pParent, ::chart::ChartController* pController) |
| 41 |
: PanelLayout(pParent, u"ChartTypePanel"_ustr, u"modules/schart/ui/sidebartype.ui"_ustr) |
| 42 |
, mxListener(new ChartSidebarModifyListener(this)) |
| 43 |
, mbModelValid(true) |
| 44 |
, m_pDim3DLookResourceGroup(new Dim3DLookResourceGroup(m_xBuilder.get())) |
| 45 |
, m_pStackingResourceGroup(new StackingResourceGroup(m_xBuilder.get())) |
| 46 |
, m_pSplineResourceGroup( |
| 47 |
new SplineResourceGroup(m_xBuilder.get(), pController->GetChartFrame())) |
| 48 |
, m_pGeometryResourceGroup(new GeometryResourceGroup(m_xBuilder.get())) |
| 49 |
, m_pSortByXValuesResourceGroup(new SortByXValuesResourceGroup(m_xBuilder.get())) |
| 50 |
, m_xChartModel(pController->getChartModel()) |
| 51 |
, m_aChartTypeDialogControllerList(0) |
| 52 |
, m_pCurrentMainType(nullptr) |
| 53 |
, m_nChangingCalls(0) |
| 54 |
, m_aTimerTriggeredControllerLock(m_xChartModel) |
| 55 |
, m_xMainTypeList(m_xBuilder->weld_combo_box(u"cmb_chartType"_ustr)) |
| 56 |
, m_xSubTypeList(new ValueSet(m_xBuilder->weld_scrolled_window(u"subtypewin"_ustr, true))) |
| 57 |
, m_xSubTypeListWin(new weld::CustomWeld(*m_xBuilder, u"subtype"_ustr, *m_xSubTypeList)) |
| 58 |
{ |
| 59 |
Size aSize(m_xSubTypeList->GetDrawingArea()->get_ref_device().LogicToPixel( |
| 60 |
Size(120, 40), MapMode(MapUnit::MapAppFont))); |
| 61 |
m_xSubTypeListWin->set_size_request(aSize.Width(), aSize.Height()); |
| 62 |
|
| 63 |
m_xMainTypeList->connect_changed(LINK(this, ChartTypePanel, SelectMainTypeHdl)); |
| 64 |
m_xSubTypeList->SetSelectHdl(LINK(this, ChartTypePanel, SelectSubTypeHdl)); |
| 65 |
|
| 66 |
m_xSubTypeList->SetStyle(m_xSubTypeList->GetStyle() | WB_ITEMBORDER | WB_DOUBLEBORDER |
| 67 |
| WB_NAMEFIELD | WB_FLATVALUESET | WB_3DLOOK); |
| 68 |
m_xSubTypeList->SetColCount(4); |
| 69 |
m_xSubTypeList->SetLineCount(1); |
| 70 |
|
| 71 |
bool bEnableComplexChartTypes = true; |
| 72 |
uno::Reference<beans::XPropertySet> xProps(static_cast<cppu::OWeakObject*>(m_xChartModel.get()), |
| 73 |
uno::UNO_QUERY); |
| 74 |
if (xProps.is()) |
| 75 |
{ |
| 76 |
try |
| 77 |
{ |
| 78 |
xProps->getPropertyValue(u"EnableComplexChartTypes"_ustr) >>= bEnableComplexChartTypes; |
| 79 |
} |
| 80 |
catch (const uno::Exception&) |
| 81 |
{ |
| 82 |
TOOLS_WARN_EXCEPTION("chart2", ""); |
| 83 |
} |
| 84 |
} |
| 85 |
|
| 86 |
m_aChartTypeDialogControllerList.push_back(std::make_unique<ColumnChartDialogController>()); |
| 87 |
m_aChartTypeDialogControllerList.push_back(std::make_unique<BarChartDialogController>()); |
| 88 |
m_aChartTypeDialogControllerList.push_back(std::make_unique<PieChartDialogController>()); |
| 89 |
m_aChartTypeDialogControllerList.push_back(std::make_unique<OfPieChartDialogController>()); |
| 90 |
m_aChartTypeDialogControllerList.push_back(std::make_unique<AreaChartDialogController>()); |
| 91 |
m_aChartTypeDialogControllerList.push_back(std::make_unique<LineChartDialogController>()); |
| 92 |
if (bEnableComplexChartTypes) |
| 93 |
{ |
| 94 |
m_aChartTypeDialogControllerList.push_back(std::make_unique<XYChartDialogController>()); |
| 95 |
m_aChartTypeDialogControllerList.push_back(std::make_unique<BubbleChartDialogController>()); |
| 96 |
} |
| 97 |
m_aChartTypeDialogControllerList.push_back(std::make_unique<NetChartDialogController>()); |
| 98 |
if (bEnableComplexChartTypes) |
| 99 |
{ |
| 100 |
m_aChartTypeDialogControllerList.push_back(std::make_unique<StockChartDialogController>()); |
| 101 |
} |
| 102 |
m_aChartTypeDialogControllerList.push_back( |
| 103 |
std::make_unique<CombiColumnLineChartDialogController>()); |
| 104 |
|
| 105 |
for (auto const& elem : m_aChartTypeDialogControllerList) |
| 106 |
{ |
| 107 |
m_xMainTypeList->append(u""_ustr, elem->getName(), elem->getImage()); |
| 108 |
elem->setChangeListener(this); |
| 109 |
} |
| 110 |
|
| 111 |
m_pDim3DLookResourceGroup->setChangeListener(this); |
| 112 |
m_pStackingResourceGroup->setChangeListener(this); |
| 113 |
m_pSplineResourceGroup->setChangeListener(this); |
| 114 |
m_pGeometryResourceGroup->setChangeListener(this); |
| 115 |
m_pSortByXValuesResourceGroup->setChangeListener(this); |
| 116 |
|
| 117 |
Initialize(); |
| 118 |
} |
| 119 |
|
| 120 |
ChartTypePanel::~ChartTypePanel() |
| 121 |
{ |
| 122 |
doUpdateModel(nullptr); |
| 123 |
|
| 124 |
//delete all dialog controller |
| 125 |
m_aChartTypeDialogControllerList.clear(); |
| 126 |
|
| 127 |
//delete all resource helpers |
| 128 |
m_pDim3DLookResourceGroup.reset(); |
| 129 |
m_pStackingResourceGroup.reset(); |
| 130 |
m_pSplineResourceGroup.reset(); |
| 131 |
m_pGeometryResourceGroup.reset(); |
| 132 |
m_pSortByXValuesResourceGroup.reset(); |
| 133 |
m_xSubTypeListWin.reset(); |
| 134 |
m_xSubTypeList.reset(); |
| 135 |
|
| 136 |
m_xSubTypeListWin.reset(); |
| 137 |
m_xSubTypeList.reset(); |
| 138 |
m_xMainTypeList.reset(); |
| 139 |
} |
| 140 |
|
| 141 |
IMPL_LINK_NOARG(ChartTypePanel, SelectMainTypeHdl, weld::ComboBox&, void) { selectMainType(); } |
| 142 |
|
| 143 |
IMPL_LINK_NOARG(ChartTypePanel, SelectSubTypeHdl, ValueSet*, void) |
| 144 |
{ |
| 145 |
if (m_pCurrentMainType) |
| 146 |
{ |
| 147 |
ChartTypeParameter aParameter(getCurrentParameter()); |
| 148 |
m_pCurrentMainType->adjustParameterToSubType(aParameter); |
| 149 |
fillAllControls(aParameter, false); |
| 150 |
commitToModel(aParameter); |
| 151 |
} |
| 152 |
} |
| 153 |
|
| 154 |
void ChartTypePanel::Initialize() |
| 155 |
{ |
| 156 |
if (!m_xChartModel.is()) |
| 157 |
return; |
| 158 |
rtl::Reference<::chart::ChartTypeManager> xChartTypeManager = m_xChartModel->getTypeManager(); |
| 159 |
rtl::Reference<Diagram> xDiagram = m_xChartModel->getFirstChartDiagram(); |
| 160 |
Diagram::tTemplateWithServiceName aTemplate; |
| 161 |
if (xDiagram) |
| 162 |
aTemplate = xDiagram->getTemplate(xChartTypeManager); |
| 163 |
OUString aServiceName(aTemplate.sServiceName); |
| 164 |
|
| 165 |
bool bFound = false; |
| 166 |
|
| 167 |
sal_uInt16 nM = 0; |
| 168 |
for (auto const& elem : m_aChartTypeDialogControllerList) |
| 169 |
{ |
| 170 |
if (elem->isSubType(aServiceName)) |
| 171 |
{ |
| 172 |
bFound = true; |
| 173 |
|
| 174 |
m_xMainTypeList->set_active(nM); |
| 175 |
showAllControls(*elem); |
| 176 |
uno::Reference<beans::XPropertySet> xTemplateProps( |
| 177 |
static_cast<cppu::OWeakObject*>(aTemplate.xChartTypeTemplate.get()), |
| 178 |
uno::UNO_QUERY); |
| 179 |
ChartTypeParameter aParameter |
| 180 |
= elem->getChartTypeParameterForService(aServiceName, xTemplateProps); |
| 181 |
m_pCurrentMainType = getSelectedMainType(); |
| 182 |
|
| 183 |
//set ThreeDLookScheme |
| 184 |
aParameter.eThreeDLookScheme = xDiagram->detectScheme(); |
| 185 |
if (!aParameter.b3DLook |
| 186 |
&& aParameter.eThreeDLookScheme != ThreeDLookScheme::ThreeDLookScheme_Realistic) |
| 187 |
aParameter.eThreeDLookScheme = ThreeDLookScheme::ThreeDLookScheme_Realistic; |
| 188 |
|
| 189 |
try |
| 190 |
{ |
| 191 |
xDiagram->getPropertyValue(CHART_UNONAME_SORT_BY_XVALUES) |
| 192 |
>>= aParameter.bSortByXValues; |
| 193 |
} |
| 194 |
catch (const uno::Exception&) |
| 195 |
{ |
| 196 |
DBG_UNHANDLED_EXCEPTION("chart2"); |
| 197 |
} |
| 198 |
|
| 199 |
fillAllControls(aParameter); |
| 200 |
if (m_pCurrentMainType) |
| 201 |
m_pCurrentMainType->fillExtraControls(m_xChartModel, xTemplateProps); |
| 202 |
break; |
| 203 |
} |
| 204 |
++nM; |
| 205 |
} |
| 206 |
|
| 207 |
if (!bFound) |
| 208 |
{ |
| 209 |
m_xSubTypeList->Hide(); |
| 210 |
m_pDim3DLookResourceGroup->showControls(false); |
| 211 |
m_pStackingResourceGroup->showControls(false); |
| 212 |
m_pSplineResourceGroup->showControls(false); |
| 213 |
m_pGeometryResourceGroup->showControls(false); |
| 214 |
m_pSortByXValuesResourceGroup->showControls(false); |
| 215 |
} |
| 216 |
} |
| 217 |
|
| 218 |
void ChartTypePanel::updateData() |
| 219 |
{ |
| 220 |
// Chart Type related |
| 221 |
if (!m_xChartModel.is()) |
| 222 |
return; |
| 223 |
rtl::Reference<::chart::ChartTypeManager> xChartTypeManager = m_xChartModel->getTypeManager(); |
| 224 |
rtl::Reference<Diagram> xDiagram = m_xChartModel->getFirstChartDiagram(); |
| 225 |
Diagram::tTemplateWithServiceName aTemplate; |
| 226 |
if (xDiagram) |
| 227 |
aTemplate = xDiagram->getTemplate(xChartTypeManager); |
| 228 |
OUString aServiceName(aTemplate.sServiceName); |
| 229 |
|
| 230 |
//sal_uInt16 nM = 0; |
| 231 |
for (auto const& elem : m_aChartTypeDialogControllerList) |
| 232 |
{ |
| 233 |
if (elem->isSubType(aServiceName)) |
| 234 |
{ |
| 235 |
//m_pMainTypeList->SelectEntryPos(nM); |
| 236 |
//m_pMainTypeList->select_entry_region(nM, nM); |
| 237 |
break; |
| 238 |
} |
| 239 |
//++nM; |
| 240 |
} |
| 241 |
} |
| 242 |
|
| 243 |
void ChartTypePanel::DataChanged(const DataChangedEvent& rEvent) |
| 244 |
{ |
| 245 |
PanelLayout::DataChanged(rEvent); |
| 246 |
updateData(); |
| 247 |
} |
| 248 |
|
| 249 |
void ChartTypePanel::HandleContextChange(const vcl::EnumContext& rContext) |
| 250 |
{ |
| 251 |
if (maContext == rContext) |
| 252 |
{ |
| 253 |
// Nothing to do. |
| 254 |
return; |
| 255 |
} |
| 256 |
|
| 257 |
maContext = rContext; |
| 258 |
updateData(); |
| 259 |
} |
| 260 |
|
| 261 |
void ChartTypePanel::modelInvalid() { mbModelValid = false; } |
| 262 |
|
| 263 |
void ChartTypePanel::doUpdateModel(const rtl::Reference<::chart::ChartModel>& xModel) |
| 264 |
{ |
| 265 |
if (mbModelValid) |
| 266 |
{ |
| 267 |
m_xChartModel->removeModifyListener(mxListener); |
| 268 |
} |
| 269 |
|
| 270 |
m_xChartModel = xModel; |
| 271 |
mbModelValid = m_xChartModel.is(); |
| 272 |
|
| 273 |
if (!mbModelValid) |
| 274 |
return; |
| 275 |
|
| 276 |
m_xChartModel->addModifyListener(mxListener); |
| 277 |
} |
| 278 |
|
| 279 |
void ChartTypePanel::updateModel(css::uno::Reference<css::frame::XModel> xModel) |
| 280 |
{ |
| 281 |
::chart::ChartModel* pModel = dynamic_cast<::chart::ChartModel*>(xModel.get()); |
| 282 |
assert(!xModel || pModel); |
| 283 |
doUpdateModel(pModel); |
| 284 |
} |
| 285 |
|
| 286 |
rtl::Reference<::chart::ChartTypeTemplate> ChartTypePanel::getCurrentTemplate() const |
| 287 |
{ |
| 288 |
if (m_pCurrentMainType && m_xChartModel.is()) |
| 289 |
{ |
| 290 |
ChartTypeParameter aParameter(getCurrentParameter()); |
| 291 |
m_pCurrentMainType->adjustParameterToSubType(aParameter); |
| 292 |
rtl::Reference<::chart::ChartTypeManager> xChartTypeManager |
| 293 |
= m_xChartModel->getTypeManager(); |
| 294 |
return m_pCurrentMainType->getCurrentTemplate(aParameter, xChartTypeManager); |
| 295 |
} |
| 296 |
return nullptr; |
| 297 |
} |
| 298 |
|
| 299 |
ChartTypeDialogController* ChartTypePanel::getSelectedMainType() |
| 300 |
{ |
| 301 |
ChartTypeDialogController* pTypeController = nullptr; |
| 302 |
auto nM = static_cast<std::vector<ChartTypeDialogController*>::size_type>( |
| 303 |
m_xMainTypeList->get_active()); |
| 304 |
if (nM < m_aChartTypeDialogControllerList.size()) |
| 305 |
pTypeController = m_aChartTypeDialogControllerList[nM].get(); |
| 306 |
return pTypeController; |
| 307 |
} |
| 308 |
|
| 309 |
void ChartTypePanel::showAllControls(ChartTypeDialogController& rTypeController) |
| 310 |
{ |
| 311 |
m_xMainTypeList->show(); |
| 312 |
m_xSubTypeList->Show(); |
| 313 |
|
| 314 |
bool bShow = rTypeController.shouldShow_3DLookControl(); |
| 315 |
m_pDim3DLookResourceGroup->showControls(bShow); |
| 316 |
bShow = rTypeController.shouldShow_StackingControl(); |
| 317 |
m_pStackingResourceGroup->showControls(bShow); |
| 318 |
bShow = rTypeController.shouldShow_SplineControl(); |
| 319 |
m_pSplineResourceGroup->showControls(bShow); |
| 320 |
bShow = rTypeController.shouldShow_GeometryControl(); |
| 321 |
m_pGeometryResourceGroup->showControls(bShow); |
| 322 |
bShow = rTypeController.shouldShow_SortByXValuesResourceGroup(); |
| 323 |
m_pSortByXValuesResourceGroup->showControls(bShow); |
| 324 |
rTypeController.showExtraControls(m_xBuilder.get()); |
| 325 |
} |
| 326 |
|
| 327 |
void ChartTypePanel::fillAllControls(const ChartTypeParameter& rParameter, |
| 328 |
bool bAlsoResetSubTypeList) |
| 329 |
{ |
| 330 |
m_nChangingCalls++; |
| 331 |
if (m_pCurrentMainType && bAlsoResetSubTypeList) |
| 332 |
{ |
| 333 |
m_pCurrentMainType->fillSubTypeList(*m_xSubTypeList, rParameter); |
| 334 |
} |
| 335 |
m_xSubTypeList->SelectItem(static_cast<sal_uInt16>(rParameter.nSubTypeIndex)); |
| 336 |
m_pDim3DLookResourceGroup->fillControls(rParameter); |
| 337 |
m_pStackingResourceGroup->fillControls(rParameter); |
| 338 |
m_pSplineResourceGroup->fillControls(rParameter); |
| 339 |
m_pGeometryResourceGroup->fillControls(rParameter); |
| 340 |
m_pSortByXValuesResourceGroup->fillControls(rParameter); |
| 341 |
m_nChangingCalls--; |
| 342 |
} |
| 343 |
|
| 344 |
ChartTypeParameter ChartTypePanel::getCurrentParameter() const |
| 345 |
{ |
| 346 |
ChartTypeParameter aParameter; |
| 347 |
aParameter.nSubTypeIndex = static_cast<sal_Int32>(m_xSubTypeList->GetSelectedItemId()); |
| 348 |
m_pDim3DLookResourceGroup->fillParameter(aParameter); |
| 349 |
m_pStackingResourceGroup->fillParameter(aParameter); |
| 350 |
m_pSplineResourceGroup->fillParameter(aParameter); |
| 351 |
m_pGeometryResourceGroup->fillParameter(aParameter); |
| 352 |
m_pSortByXValuesResourceGroup->fillParameter(aParameter); |
| 353 |
return aParameter; |
| 354 |
} |
| 355 |
|
| 356 |
void ChartTypePanel::stateChanged() |
| 357 |
{ |
| 358 |
if (m_nChangingCalls) |
| 359 |
return; |
| 360 |
m_nChangingCalls++; |
| 361 |
|
| 362 |
ChartTypeParameter aParameter(getCurrentParameter()); |
| 363 |
if (m_pCurrentMainType) |
| 364 |
{ |
| 365 |
m_pCurrentMainType->adjustParameterToSubType(aParameter); |
| 366 |
m_pCurrentMainType->adjustSubTypeAndEnableControls(aParameter); |
| 367 |
} |
| 368 |
commitToModel(aParameter); |
| 369 |
|
| 370 |
//detect the new ThreeDLookScheme |
| 371 |
rtl::Reference<Diagram> xDiagram = m_xChartModel->getFirstChartDiagram(); |
| 372 |
aParameter.eThreeDLookScheme = xDiagram->detectScheme(); |
| 373 |
try |
| 374 |
{ |
| 375 |
xDiagram->getPropertyValue(CHART_UNONAME_SORT_BY_XVALUES) >>= aParameter.bSortByXValues; |
| 376 |
} |
| 377 |
catch (const uno::Exception&) |
| 378 |
{ |
| 379 |
DBG_UNHANDLED_EXCEPTION("chart2"); |
| 380 |
} |
| 381 |
//the controls have to be enabled/disabled accordingly |
| 382 |
fillAllControls(aParameter); |
| 383 |
|
| 384 |
m_nChangingCalls--; |
| 385 |
} |
| 386 |
|
| 387 |
void ChartTypePanel::commitToModel(const ChartTypeParameter& rParameter) |
| 388 |
{ |
| 389 |
if (!m_pCurrentMainType) |
| 390 |
return; |
| 391 |
|
| 392 |
m_aTimerTriggeredControllerLock.startTimer(); |
| 393 |
uno::Reference<beans::XPropertySet> xTemplateProps( |
| 394 |
static_cast<cppu::OWeakObject*>(getCurrentTemplate().get()), uno::UNO_QUERY); |
| 395 |
m_pCurrentMainType->commitToModel(rParameter, m_xChartModel, xTemplateProps); |
| 396 |
} |
| 397 |
|
| 398 |
void ChartTypePanel::selectMainType() |
| 399 |
{ |
| 400 |
ChartTypeParameter aParameter(getCurrentParameter()); |
| 401 |
|
| 402 |
if (m_pCurrentMainType) |
| 403 |
{ |
| 404 |
m_pCurrentMainType->adjustParameterToSubType(aParameter); |
| 405 |
m_pCurrentMainType->hideExtraControls(); |
| 406 |
} |
| 407 |
|
| 408 |
m_pCurrentMainType = getSelectedMainType(); |
| 409 |
if (!m_pCurrentMainType) |
| 410 |
return; |
| 411 |
|
| 412 |
showAllControls(*m_pCurrentMainType); |
| 413 |
|
| 414 |
m_pCurrentMainType->adjustParameterToMainType(aParameter); |
| 415 |
commitToModel(aParameter); |
| 416 |
//detect the new ThreeDLookScheme |
| 417 |
aParameter.eThreeDLookScheme = m_xChartModel->getFirstChartDiagram()->detectScheme(); |
| 418 |
if (!aParameter.b3DLook |
| 419 |
&& aParameter.eThreeDLookScheme != ThreeDLookScheme::ThreeDLookScheme_Realistic) |
| 420 |
aParameter.eThreeDLookScheme = ThreeDLookScheme::ThreeDLookScheme_Realistic; |
| 421 |
|
| 422 |
rtl::Reference<Diagram> xDiagram = m_xChartModel->getFirstChartDiagram(); |
| 423 |
try |
| 424 |
{ |
| 425 |
xDiagram->getPropertyValue(CHART_UNONAME_SORT_BY_XVALUES) >>= aParameter.bSortByXValues; |
| 426 |
} |
| 427 |
catch (const uno::Exception&) |
| 428 |
{ |
| 429 |
DBG_UNHANDLED_EXCEPTION("chart2"); |
| 430 |
} |
| 431 |
|
| 432 |
fillAllControls(aParameter); |
| 433 |
uno::Reference<beans::XPropertySet> xTemplateProps( |
| 434 |
static_cast<cppu::OWeakObject*>(getCurrentTemplate().get()), uno::UNO_QUERY); |
| 435 |
m_pCurrentMainType->fillExtraControls(m_xChartModel, xTemplateProps); |
| 436 |
} |
| 437 |
} // end of namespace ::chart::sidebar |
| 438 |
|
| 439 |
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |