23#include <osl/diagnose.h>
24#include <com/sun/star/uno/Any.hxx>
25#include <com/sun/star/uno/Sequence.hxx>
39#define PROPERTYHANDLE_VISIBLE_IMPRESSVIEW 0
41#define PROPERTYHANDLE_VISIBLE_OUTLINEVIEW 1
43#define PROPERTYHANDLE_VISIBLE_NOTESVIEW 2
45#define PROPERTYHANDLE_VISIBLE_HANDOUTVIEW 3
47#define PROPERTYHANDLE_VISIBLE_SLIDESORTERVIEW 4
49#define PROPERTYHANDLE_VISIBLE_DRAWVIEW 5
53 static std::mutex theSvtSlideSorterBarOptionsMutex;
54 return theSvtSlideSorterBarOptionsMutex;
76 virtual void Notify(
const Sequence< OUString >& seqPropertyNames )
override;
82 void Load(
const Sequence< OUString >& rPropertyNames );
130 , m_seqPropertyNames(GetPropertyNames())
131 , m_bVisibleImpressView( false )
132 , m_bVisibleOutlineView( false )
133 , m_bVisibleNotesView( false )
134 , m_bVisibleHandoutView( false )
135 , m_bVisibleSlideSorterView( false )
136 , m_bVisibleDrawView( false )
146 "SvtSlideSorterBarOptions_Impl::SvtSlideSorterBarOptions_Impl()\nI miss some values of configuration keys!\n" );
149 for( sal_Int32 nProperty=0; nProperty<seqValues.getLength(); ++nProperty )
151 if (!seqValues[nProperty].hasValue())
158 OSL_FAIL(
"Wrong type of \"SlideSorterBar\\VisibleImpressView\"!" );
164 OSL_FAIL(
"Wrong type of \"SlideSorterBar\\VisibleOutlineView\"!" );
170 OSL_FAIL(
"Wrong type of \"SlideSorterBar\\VisibleNotesView\"!" );
176 OSL_FAIL(
"Wrong type of \"SlideSorterBar\\VisibleHandoutView\"!" );
182 OSL_FAIL(
"Wrong type of \"SlideSorterBar\\VisibleSlideSorterView\"!" );
188 OSL_FAIL(
"Wrong type of \"SlideSorterBar\\VisibleDrawView\"!" );
208 Sequence< Any > seqValues = GetProperties( rPropertyNames );
213 DBG_ASSERT( !(rPropertyNames.getLength()!=seqValues.getLength()),
214 "SvtSlideSorterBarOptions_Impl::SvtSlideSorterBarOptions_Impl()\nI miss some values of configuration keys!\n" );
217 for( sal_Int32 nProperty=0; nProperty<seqValues.getLength(); ++nProperty )
219 if (!seqValues[nProperty].hasValue())
226 OSL_FAIL(
"Wrong type of \"SlideSorterBar\\VisibleImpressView\"!" );
232 OSL_FAIL(
"Wrong type of \"SlideSorterBar\\VisibleOutlineView\"!" );
238 OSL_FAIL(
"Wrong type of \"SlideSorterBar\\VisibleNotesView\"!" );
244 OSL_FAIL(
"Wrong type of \"SlideSorterBar\\VisibleHandoutView\"!" );
250 OSL_FAIL(
"Wrong type of \"SlideSorterBar\\VisibleSlideSorterView\"!" );
257 OSL_FAIL(
"Wrong type of \"SlideSorterBar\\VisibleDrawView\"!" );
266 Load( rPropertyNames );
273 Sequence< Any > seqValues (
nCount );
274 auto seqValuesRange = asNonConstRange(seqValues);
275 for( sal_Int32 nProperty=0; nProperty<
nCount; ++nProperty )
340 std::weak_ptr<SvtSlideSorterBarOptions_Impl> g_pSlideSorterBarOptions;
348 m_pImpl = g_pSlideSorterBarOptions.lock();
351 m_pImpl = std::make_shared<SvtSlideSorterBarOptions_Impl>();
352 g_pSlideSorterBarOptions =
m_pImpl;
366 static const bool bRunningUnitTest = getenv(
"LO_TESTNAME");
377 return m_pImpl->m_bVisibleOutlineView;
387 return m_pImpl->m_bVisibleNotesView;
397 return m_pImpl->m_bVisibleHandoutView;
417 return m_pImpl->m_bVisibleDrawView;
static Sequence< OUString > GetPropertyNames()
return list of key names of our configuration management which represent our module tree
bool m_bVisibleOutlineView
bool m_bVisibleImpressView
void SetVisibleDrawView(bool bVisible)
void SetVisibleSlideSorterView(bool bVisible)
void SetVisibleOutlineView(bool bVisible)
void SetVisibleImpressView(bool bVisible)
Sequence< OUString > m_seqPropertyNames
virtual void Notify(const Sequence< OUString > &seqPropertyNames) override
called for notify of configmanager
SvtSlideSorterBarOptions_Impl()
void Load(const Sequence< OUString > &rPropertyNames)
loads required data from the configuration.
bool m_bVisibleSlideSorterView
void SetVisibleNotesView(bool bVisible)
~SvtSlideSorterBarOptions_Impl() override
void SetVisibleHandoutView(bool bVisible)
void SetVisibleViewImpl(bool &bVisibleView, bool bVisible)
virtual void ImplCommit() final override
bool m_bVisibleHandoutView
void SetVisibleSlideSorterView(bool bVisible)
void SetVisibleImpressView(bool bVisible)
void SetVisibleHandoutView(bool bVisible)
bool GetVisibleSlideSorterView() const
std::shared_ptr< SvtSlideSorterBarOptions_Impl > m_pImpl
bool GetVisibleHandoutView() const
void SetVisibleDrawView(bool bVisible)
bool GetVisibleDrawView() const
bool GetVisibleOutlineView() const
bool GetVisibleNotesView() const
void SetVisibleOutlineView(bool bVisible)
void SetVisibleNotesView(bool bVisible)
virtual ~SvtSlideSorterBarOptions() override
bool GetVisibleImpressView() const
SvtSlideSorterBarOptions()
#define DBG_ASSERT(sCon, aError)
sal_Int32 findValue(const css::uno::Sequence< T1 > &_rList, const T2 &_rValue)
static std::mutex & GetInitMutex()
#define PROPERTYHANDLE_VISIBLE_IMPRESSVIEW
#define PROPERTYHANDLE_VISIBLE_OUTLINEVIEW
constexpr OUStringLiteral PROPERTYNAME_VISIBLE_DRAWVIEW
constexpr OUStringLiteral PROPERTYNAME_VISIBLE_IMPRESSVIEW
constexpr OUStringLiteral PROPERTYNAME_VISIBLE_HANDOUTVIEW
#define PROPERTYHANDLE_VISIBLE_HANDOUTVIEW
constexpr OUStringLiteral PROPERTYNAME_VISIBLE_NOTESVIEW
constexpr OUStringLiteral ROOTNODE_SLIDESORTERBAR
#define PROPERTYHANDLE_VISIBLE_NOTESVIEW
#define PROPERTYHANDLE_VISIBLE_SLIDESORTERVIEW
#define PROPERTYHANDLE_VISIBLE_DRAWVIEW
constexpr OUStringLiteral PROPERTYNAME_VISIBLE_SLIDESORTERVIEW
constexpr OUStringLiteral PROPERTYNAME_VISIBLE_OUTLINEVIEW