LibreOffice Module svl (master) 1
Functions
itemset.cxx File Reference
#include <string.h>
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <libxml/xmlwriter.h>
#include <sal/log.hxx>
#include <svl/itemset.hxx>
#include <svl/itempool.hxx>
#include <svl/itemiter.hxx>
#include <svl/setitem.hxx>
#include <svl/whiter.hxx>
#include <items_helper.hxx>
Include dependency graph for itemset.cxx:

Go to the source code of this file.

Functions

static void MergeItem_Impl (SfxItemPool *_pPool, sal_uInt16 &rCount, const SfxPoolItem **ppFnd1, const SfxPoolItem *pFnd2, bool bIgnoreDefaults)
 Decision table for MergeValue(s) More...
 

Function Documentation

◆ MergeItem_Impl()

static void MergeItem_Impl ( SfxItemPool _pPool,
sal_uInt16 &  rCount,
const SfxPoolItem **  ppFnd1,
const SfxPoolItem pFnd2,
bool  bIgnoreDefaults 
)
static

Decision table for MergeValue(s)

Principles:

  1. If the Which value in the 1st set is "unknown", there's never any action
  2. If the Which value in the 2nd set is "unknown", it's made the "default"
  3. For comparisons the values of the "default" Items are take into account

1st Item 2nd Item Values bIgnoreDefs Remove Assign Add

set set == sal_False - - - default set == sal_False - - - dontcare set == sal_False - - - unknown set == sal_False - - - set default == sal_False - - - default default == sal_False - - - dontcare default == sal_False - - - unknown default == sal_False - - - set dontcare == sal_False 1st Item -1 - default dontcare == sal_False - -1 - dontcare dontcare == sal_False - - - unknown dontcare == sal_False - - - set unknown == sal_False 1st Item -1 - default unknown == sal_False - - - dontcare unknown == sal_False - - - unknown unknown == sal_False - - -

set set != sal_False 1st Item -1 - default set != sal_False - -1 - dontcare set != sal_False - - - unknown set != sal_False - - - set default != sal_False 1st Item -1 - default default != sal_False - - - dontcare default != sal_False - - - unknown default != sal_False - - - set dontcare != sal_False 1st Item -1 - default dontcare != sal_False - -1 - dontcare dontcare != sal_False - - - unknown dontcare != sal_False - - - set unknown != sal_False 1st Item -1 - default unknown != sal_False - - - dontcare unknown != sal_False - - - unknown unknown != sal_False - - -

set set == sal_True - - - default set == sal_True - 2nd Item 2nd Item dontcare set == sal_True - - - unknown set == sal_True - - - set default == sal_True - - - default default == sal_True - - - dontcare default == sal_True - - - unknown default == sal_True - - - set dontcare == sal_True - - - default dontcare == sal_True - -1 - dontcare dontcare == sal_True - - - unknown dontcare == sal_True - - - set unknown == sal_True - - - default unknown == sal_True - - - dontcare unknown == sal_True - - - unknown unknown == sal_True - - -

set set != sal_True 1st Item -1 - default set != sal_True - 2nd Item 2nd Item dontcare set != sal_True - - - unknown set != sal_True - - - set default != sal_True - - - default default != sal_True - - - dontcare default != sal_True - - - unknown default != sal_True - - - set dontcare != sal_True 1st Item -1 - default dontcare != sal_True - -1 - dontcare dontcare != sal_True - - - unknown dontcare != sal_True - - - set unknown != sal_True - - - default unknown != sal_True - - - dontcare unknown != sal_True - - - unknown unknown != sal_True - - -

Definition at line 1038 of file itemset.cxx.

References SfxItemPool::GetDefaultItem(), INVALID_POOL_ITEM, IsInvalidItem(), SfxItemPool::Put(), SfxItemPool::Remove(), and SfxPoolItem::Which().

Referenced by SfxItemSet::MergeValue(), and SfxItemSet::MergeValues().