convert GA_ constants to enum class
Change-Id: I51a197ed530c0a0e432620af23070c90a89a9ac3
This commit is contained in:
@@ -1333,7 +1333,7 @@ void FmXFormShell::checkControlConversionSlotsForCurrentSelection( Menu& rMenu )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void FmXFormShell::LoopGrids(sal_Int16 nWhat)
|
void FmXFormShell::LoopGrids(LoopGridsSync nSync, LoopGridsFlags nFlags)
|
||||||
{
|
{
|
||||||
if ( impl_checkDisposed() )
|
if ( impl_checkDisposed() )
|
||||||
return;
|
return;
|
||||||
@@ -1357,15 +1357,15 @@ void FmXFormShell::LoopGrids(sal_Int16 nWhat)
|
|||||||
if (!::comphelper::hasProperty(FM_PROP_CURSORCOLOR, xModelSet) || !::comphelper::hasProperty(FM_PROP_ALWAYSSHOWCURSOR, xModelSet) || !::comphelper::hasProperty(FM_PROP_DISPLAYSYNCHRON, xModelSet))
|
if (!::comphelper::hasProperty(FM_PROP_CURSORCOLOR, xModelSet) || !::comphelper::hasProperty(FM_PROP_ALWAYSSHOWCURSOR, xModelSet) || !::comphelper::hasProperty(FM_PROP_DISPLAYSYNCHRON, xModelSet))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
switch (nWhat & GA_SYNC_MASK)
|
switch (nSync)
|
||||||
{
|
{
|
||||||
case GA_DISABLE_SYNC:
|
case LoopGridsSync::DISABLE_SYNC:
|
||||||
{
|
{
|
||||||
sal_Bool bB(sal_False);
|
sal_Bool bB(sal_False);
|
||||||
xModelSet->setPropertyValue(FM_PROP_DISPLAYSYNCHRON, Any(&bB,cppu::UnoType<bool>::get()));
|
xModelSet->setPropertyValue(FM_PROP_DISPLAYSYNCHRON, Any(&bB,cppu::UnoType<bool>::get()));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case GA_FORCE_SYNC:
|
case LoopGridsSync::FORCE_SYNC:
|
||||||
{
|
{
|
||||||
Any aOldVal( xModelSet->getPropertyValue(FM_PROP_DISPLAYSYNCHRON) );
|
Any aOldVal( xModelSet->getPropertyValue(FM_PROP_DISPLAYSYNCHRON) );
|
||||||
sal_Bool bB(sal_True);
|
sal_Bool bB(sal_True);
|
||||||
@@ -1373,15 +1373,15 @@ void FmXFormShell::LoopGrids(sal_Int16 nWhat)
|
|||||||
xModelSet->setPropertyValue(FM_PROP_DISPLAYSYNCHRON, aOldVal);
|
xModelSet->setPropertyValue(FM_PROP_DISPLAYSYNCHRON, aOldVal);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case GA_ENABLE_SYNC:
|
case LoopGridsSync::ENABLE_SYNC:
|
||||||
{
|
{
|
||||||
sal_Bool bB(sal_True);
|
sal_Bool bB(sal_True);
|
||||||
xModelSet->setPropertyValue(FM_PROP_DISPLAYSYNCHRON, Any(&bB,cppu::UnoType<bool>::get()));
|
xModelSet->setPropertyValue(FM_PROP_DISPLAYSYNCHRON, Any(&bB,cppu::UnoType<bool>::get()));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nWhat & GA_DISABLE_ROCTRLR)
|
if (nFlags & LoopGridsFlags::DISABLE_ROCTRLR)
|
||||||
{
|
{
|
||||||
sal_Bool bB(sal_False);
|
sal_Bool bB(sal_False);
|
||||||
xModelSet->setPropertyValue(FM_PROP_ALWAYSSHOWCURSOR, Any(&bB,cppu::UnoType<bool>::get()));
|
xModelSet->setPropertyValue(FM_PROP_ALWAYSSHOWCURSOR, Any(&bB,cppu::UnoType<bool>::get()));
|
||||||
@@ -1391,12 +1391,6 @@ void FmXFormShell::LoopGrids(sal_Int16 nWhat)
|
|||||||
else
|
else
|
||||||
xModelSet->setPropertyValue(FM_PROP_CURSORCOLOR, Any()); // this should be the default
|
xModelSet->setPropertyValue(FM_PROP_CURSORCOLOR, Any()); // this should be the default
|
||||||
}
|
}
|
||||||
else if (nWhat & GA_ENABLE_ROCTRLR)
|
|
||||||
{
|
|
||||||
sal_Bool bB(sal_True);
|
|
||||||
xModelSet->setPropertyValue(FM_PROP_ALWAYSSHOWCURSOR, Any(&bB,cppu::UnoType<bool>::get()));
|
|
||||||
xModelSet->setPropertyValue(FM_PROP_CURSORCOLOR, makeAny(sal_Int32(COL_LIGHTRED)));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1568,7 +1562,7 @@ void FmXFormShell::ExecuteSearch()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// um eventuelle GridControls, die ich kenne, kuemmern
|
// um eventuelle GridControls, die ich kenne, kuemmern
|
||||||
LoopGrids(GA_DISABLE_SYNC /*| GA_ENABLE_ROCTRLR*/);
|
LoopGrids(LoopGridsSync::DISABLE_SYNC);
|
||||||
|
|
||||||
// jetzt bin ich reif fuer den Dialog
|
// jetzt bin ich reif fuer den Dialog
|
||||||
// wenn die potentiellen Deadlocks, die durch die Benutzung des Solar-Mutex in MTs VCLX...-Klasen entstehen, irgendwann mal
|
// wenn die potentiellen Deadlocks, die durch die Benutzung des Solar-Mutex in MTs VCLX...-Klasen entstehen, irgendwann mal
|
||||||
@@ -1589,7 +1583,7 @@ void FmXFormShell::ExecuteSearch()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GridControls wieder restaurieren
|
// GridControls wieder restaurieren
|
||||||
LoopGrids(GA_ENABLE_SYNC | GA_DISABLE_ROCTRLR);
|
LoopGrids(LoopGridsSync::ENABLE_SYNC, LoopGridsFlags::DISABLE_ROCTRLR);
|
||||||
|
|
||||||
m_pShell->GetFormView()->UnMarkAll(m_pShell->GetFormView()->GetSdrPageView());
|
m_pShell->GetFormView()->UnMarkAll(m_pShell->GetFormView()->GetSdrPageView());
|
||||||
// da ich in OnFoundData (fals ich dort war) Controls markiert habe
|
// da ich in OnFoundData (fals ich dort war) Controls markiert habe
|
||||||
@@ -2231,7 +2225,7 @@ IMPL_LINK(FmXFormShell, OnFoundData, FmFoundRecordInformation*, pfriWhere)
|
|||||||
OSL_FAIL("Can position on bookmark!");
|
OSL_FAIL("Can position on bookmark!");
|
||||||
}
|
}
|
||||||
|
|
||||||
LoopGrids(GA_FORCE_SYNC);
|
LoopGrids(LoopGridsSync::FORCE_SYNC);
|
||||||
|
|
||||||
// und zum Feld (dazu habe ich vor dem Start des Suchens die XVclComponent-Interfaces eingesammelt)
|
// und zum Feld (dazu habe ich vor dem Start des Suchens die XVclComponent-Interfaces eingesammelt)
|
||||||
SAL_WARN_IF(static_cast<size_t>(pfriWhere->nFieldPos) >=
|
SAL_WARN_IF(static_cast<size_t>(pfriWhere->nFieldPos) >=
|
||||||
|
@@ -57,6 +57,7 @@
|
|||||||
#include <unotools/configitem.hxx>
|
#include <unotools/configitem.hxx>
|
||||||
#include "formcontrolling.hxx"
|
#include "formcontrolling.hxx"
|
||||||
#include "fmdocumentclassification.hxx"
|
#include "fmdocumentclassification.hxx"
|
||||||
|
#include <o3tl/typed_flags_set.hxx>
|
||||||
|
|
||||||
#include <queue>
|
#include <queue>
|
||||||
#include <set>
|
#include <set>
|
||||||
@@ -69,12 +70,20 @@ typedef std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::form::X
|
|||||||
// catch database exceptions if they occur
|
// catch database exceptions if they occur
|
||||||
#define DO_SAFE(statement) try { statement; } catch( const Exception& ) { OSL_FAIL("unhandled exception (I tried to move a cursor (or something like that).)"); }
|
#define DO_SAFE(statement) try { statement; } catch( const Exception& ) { OSL_FAIL("unhandled exception (I tried to move a cursor (or something like that).)"); }
|
||||||
|
|
||||||
#define GA_DISABLE_SYNC 1
|
enum class LoopGridsSync {
|
||||||
#define GA_FORCE_SYNC 2
|
DISABLE_SYNC = 1,
|
||||||
#define GA_ENABLE_SYNC 3
|
FORCE_SYNC = 2,
|
||||||
#define GA_SYNC_MASK 3
|
ENABLE_SYNC = 3
|
||||||
#define GA_DISABLE_ROCTRLR 4
|
};
|
||||||
#define GA_ENABLE_ROCTRLR 8
|
enum class LoopGridsFlags
|
||||||
|
{
|
||||||
|
NONE = 0,
|
||||||
|
DISABLE_ROCTRLR = 4
|
||||||
|
};
|
||||||
|
namespace o3tl
|
||||||
|
{
|
||||||
|
template<> struct typed_flags<LoopGridsFlags> : is_typed_flags<LoopGridsFlags, 0x04> {};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// flags for controlling the behaviour when calling loadForms
|
// flags for controlling the behaviour when calling loadForms
|
||||||
@@ -463,7 +472,7 @@ private:
|
|||||||
DECL_DLLPRIVATE_LINK(OnFirstTimeActivation, void*);
|
DECL_DLLPRIVATE_LINK(OnFirstTimeActivation, void*);
|
||||||
DECL_DLLPRIVATE_LINK(OnFormsCreated, FmFormPage*);
|
DECL_DLLPRIVATE_LINK(OnFormsCreated, FmFormPage*);
|
||||||
|
|
||||||
SAL_DLLPRIVATE void LoopGrids(sal_Int16 nWhat);
|
SAL_DLLPRIVATE void LoopGrids(LoopGridsSync nSync, LoopGridsFlags nWhat = LoopGridsFlags::NONE);
|
||||||
|
|
||||||
// Invalidierung von Slots
|
// Invalidierung von Slots
|
||||||
SAL_DLLPRIVATE void InvalidateSlot( sal_Int16 nId, bool bWithId );
|
SAL_DLLPRIVATE void InvalidateSlot( sal_Int16 nId, bool bWithId );
|
||||||
|
Reference in New Issue
Block a user