26#include <com/sun/star/beans/PropertyAttribute.hpp>
27#include <com/sun/star/style/ParagraphAdjust.hpp>
28#include <com/sun/star/drawing/FillStyle.hpp>
29#include <com/sun/star/drawing/LineStyle.hpp>
30#include <com/sun/star/chart2/RelativePosition.hpp>
31#include <com/sun/star/awt/Size.hpp>
40using namespace ::com::sun::star::beans::PropertyAttribute;
42using ::com::sun::star::beans::Property;
43using ::osl::MutexGuard;
50 PROP_TITLE_PARA_ADJUST,
51 PROP_TITLE_PARA_LAST_LINE_ADJUST,
52 PROP_TITLE_PARA_LEFT_MARGIN,
53 PROP_TITLE_PARA_RIGHT_MARGIN,
54 PROP_TITLE_PARA_TOP_MARGIN,
55 PROP_TITLE_PARA_BOTTOM_MARGIN,
56 PROP_TITLE_PARA_IS_HYPHENATION,
59 PROP_TITLE_TEXT_ROTATION,
60 PROP_TITLE_TEXT_STACKED,
63 PROP_TITLE_REF_PAGE_SIZE
66void lcl_AddPropertiesToVector(
67 std::vector< Property > & rOutProperties )
69 rOutProperties.emplace_back(
"ParaAdjust",
70 PROP_TITLE_PARA_ADJUST,
72 beans::PropertyAttribute::BOUND
73 | beans::PropertyAttribute::MAYBEDEFAULT );
75 rOutProperties.emplace_back(
"ParaLastLineAdjust",
76 PROP_TITLE_PARA_LAST_LINE_ADJUST,
78 beans::PropertyAttribute::BOUND
79 | beans::PropertyAttribute::MAYBEDEFAULT );
81 rOutProperties.emplace_back(
"ParaLeftMargin",
82 PROP_TITLE_PARA_LEFT_MARGIN,
84 beans::PropertyAttribute::BOUND
85 | beans::PropertyAttribute::MAYBEDEFAULT );
87 rOutProperties.emplace_back(
"ParaRightMargin",
88 PROP_TITLE_PARA_RIGHT_MARGIN,
90 beans::PropertyAttribute::BOUND
91 | beans::PropertyAttribute::MAYBEDEFAULT );
93 rOutProperties.emplace_back(
"ParaTopMargin",
94 PROP_TITLE_PARA_TOP_MARGIN,
96 beans::PropertyAttribute::BOUND
97 | beans::PropertyAttribute::MAYBEDEFAULT );
99 rOutProperties.emplace_back(
"ParaBottomMargin",
100 PROP_TITLE_PARA_BOTTOM_MARGIN,
102 beans::PropertyAttribute::BOUND
103 | beans::PropertyAttribute::MAYBEDEFAULT );
105 rOutProperties.emplace_back(
"ParaIsHyphenation",
106 PROP_TITLE_PARA_IS_HYPHENATION,
108 beans::PropertyAttribute::BOUND
109 | beans::PropertyAttribute::MAYBEDEFAULT );
112 rOutProperties.emplace_back(
"Visible",
115 beans::PropertyAttribute::BOUND
116 | beans::PropertyAttribute::MAYBEDEFAULT );
118 rOutProperties.emplace_back(
"TextRotation",
119 PROP_TITLE_TEXT_ROTATION,
121 beans::PropertyAttribute::BOUND
122 | beans::PropertyAttribute::MAYBEDEFAULT );
123 rOutProperties.emplace_back(
"StackCharacters",
124 PROP_TITLE_TEXT_STACKED,
126 beans::PropertyAttribute::BOUND
127 | beans::PropertyAttribute::MAYBEDEFAULT );
129 rOutProperties.emplace_back(
"RelativePosition",
132 beans::PropertyAttribute::BOUND
133 | beans::PropertyAttribute::MAYBEVOID );
135 rOutProperties.emplace_back(
"ReferencePageSize",
136 PROP_TITLE_REF_PAGE_SIZE,
138 beans::PropertyAttribute::BOUND
139 | beans::PropertyAttribute::MAYBEVOID );
153 css::style::ParagraphAdjust_CENTER );
156 ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( aTmp, PROP_TITLE_PARA_LEFT_MARGIN, 0 );
157 ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( aTmp, PROP_TITLE_PARA_RIGHT_MARGIN, 0 );
158 ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( aTmp, PROP_TITLE_PARA_TOP_MARGIN, 0 );
159 ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( aTmp, PROP_TITLE_PARA_BOTTOM_MARGIN, 0 );
164 ::chart::PropertyHelper::setPropertyValueDefault< double >( aTmp, PROP_TITLE_TEXT_ROTATION, 0.0 );
172 return aStaticDefaults;
177 static ::cppu::OPropertyArrayHelper aPropHelper = []()
180 lcl_AddPropertiesToVector( aProperties );
206 CloneHelper::CloneRefSequence<chart2::XFormattedString>(
255 tPropertyValueMap::const_iterator aFound( rStaticDefaults.find(
nHandle ) );
256 if( aFound == rStaticDefaults.end() )
259 rAny = (*aFound).second;
264 return StaticTitleInfoHelper();
272 return xPropertySetInfo;
311 return "com.sun.star.comp.chart2.Title";
322 "com.sun.star.chart2.Title",
323 "com.sun.star.style.ParagraphProperties",
324 "com.sun.star.beans.PropertySet",
325 "com.sun.star.layout.LayoutElement" };
336extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
338 css::uno::Sequence<css::uno::Any>
const &)
340 return cppu::acquire(new ::chart::Title);
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * com_sun_star_comp_chart2_Title_get_implementation(css::uno::XComponentContext *, css::uno::Sequence< css::uno::Any > const &)
PropertiesInfo aProperties
This helper class serves as forwarder of modify events.
css::uno::Sequence< css::uno::Reference< css::chart2::XFormattedString > > m_aStrings
virtual void firePropertyChangeEvent() override
implement this method in derived classes to get called when properties change.
virtual void GetDefaultValue(sal_Int32 nHandle, css::uno::Any &rAny) const override
implement this method to provide default values for all properties supporting defaults.
virtual css::uno::Sequence< css::uno::Reference< css::chart2::XFormattedString > > SAL_CALL getText() override
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
The InfoHelper table contains all property names and types of this object.
virtual OUString SAL_CALL getImplementationName() override
XServiceInfo declarations.
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual ~Title() override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual void SAL_CALL setText(const css::uno::Sequence< css::uno::Reference< css::chart2::XFormattedString > > &Strings) override
virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() override
rtl::Reference< ModifyEventForwarder > m_xModifyEventForwarder
virtual void SAL_CALL modified(const css::lang::EventObject &aEvent) override
virtual void SAL_CALL removeModifyListener(const css::uno::Reference< css::util::XModifyListener > &aListener) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void SAL_CALL addModifyListener(const css::uno::Reference< css::util::XModifyListener > &aListener) override
mutable::osl::Mutex m_aMutex
static css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL createPropertySetInfo(IPropertyArrayHelper &rProperties)
void SAL_CALL disposing()
OOO_DLLPUBLIC_CHARTTOOLS void AddDefaultsToMap(::chart::tPropertyValueMap &rOutMap)
OOO_DLLPUBLIC_CHARTTOOLS void AddPropertiesToVector(std::vector< css::beans::Property > &rOutProperties)
void removeListenerFromAllElements(const Container &rContainer, const css::uno::Reference< css::util::XModifyListener > &xListener)
void addListenerToAllElements(const Container &rContainer, const css::uno::Reference< css::util::XModifyListener > &xListener)
void setPropertyValueDefault(tPropertyValueMap &rOutMap, tPropertyValueMapKey key, const Value &value)
Calls setPropertyValue() but asserts that the given property hasn't been set before.
void setPropertyValue(tPropertyValueMap &rOutMap, tPropertyValueMapKey key, const Value &value)
Set a property to a certain value in the given map.
::cppu::WeakImplHelper< css::chart2::XTitle, css::lang::XServiceInfo, css::util::XCloneable, css::util::XModifyBroadcaster, css::util::XModifyListener > Title_Base
std::unordered_map< tPropertyValueMapKey, css::uno::Any > tPropertyValueMap
DstType sequenceToContainer(const css::uno::Sequence< SrcType > &i_Sequence)
css::uno::Sequence< DstElementType > containerToSequence(const SrcType &i_Container)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
IMPLEMENT_FORWARD_XTYPEPROVIDER2(ChildWindowPane, ChildWindowPaneInterfaceBase, Pane)
IMPLEMENT_FORWARD_XINTERFACE2(ChildWindowPane, ChildWindowPaneInterfaceBase, Pane)