-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-
-// File: SketcherPrs_DimensionStyleListener.cpp
-// Created: 31 March 2016
-// Author: Natalia ERMOLAEVA
+// Copyright (C) 2014-2019 CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
#include "SketcherPrs_DimensionStyleListener.h"
+#include <Prs3d_DimensionAspect.hxx>
#include "SketcherPrs_Tools.h"
#include <Events_Loop.h>
#include <AIS_Dimension.hxx>
#include <TCollection_ExtendedString.hxx>
-#ifndef WNT
- #define COMPILATION_CORRECTION
-#endif
+//#ifndef WNT
+// #define COMPILATION_CORRECTION
+//#endif
// it is not possible to use 0x2211 as summ symbol because it is not supported by
// debian Linux platform
aLoop->removeListener(this);
}
-void SketcherPrs_DimensionStyleListener::processEvent(const std::shared_ptr<Events_Message>& theMessage)
+void SketcherPrs_DimensionStyleListener::processEvent(
+ const std::shared_ptr<Events_Message>& theMessage)
{
const Events_ID kParameterStyleEvent = SketcherPrs_ParameterStyleMessage::eventId();
if (theMessage->eventID() == kParameterStyleEvent) {
aCustomValue = theTextValue.c_str();
else {
// format value string using "sprintf"
- TCollection_AsciiString aFormatStr = theDimension->Attributes()->DimensionAspect()->ValueStringFormat();
+ TCollection_AsciiString aFormatStr =
+ theDimension->Attributes()->DimensionAspect()->ValueStringFormat();
char aFmtBuffer[256];
sprintf (aFmtBuffer, aFormatStr.ToCString(), theDoubleValue);
aCustomValue = TCollection_ExtendedString (aFmtBuffer);
}
else {
// format value string using "sprintf"
- TCollection_AsciiString aFormatStr = theDimension->Attributes()->DimensionAspect()->ValueStringFormat();
+ TCollection_AsciiString aFormatStr =
+ theDimension->Attributes()->DimensionAspect()->ValueStringFormat();
char aFmtBuffer[256];
sprintf (aFmtBuffer, aFormatStr.ToCString(), theDoubleValue);
aCustomValue = TCollection_ExtendedString (aFmtBuffer);