summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basic/source/inc/runtime.hxx6
-rw-r--r--basic/source/runtime/methods.cxx8
-rw-r--r--cui/source/inc/paragrph.hxx12
-rw-r--r--cui/source/tabpages/paragrph.cxx324
-rw-r--r--dbaccess/source/filter/xml/xmlExport.cxx8
-rw-r--r--dbaccess/source/filter/xml/xmlExport.hxx2
-rw-r--r--dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx10
-rw-r--r--dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx4
-rw-r--r--desktop/source/deployment/dp_log.cxx8
-rw-r--r--extensions/source/propctrlr/propertycontrolextender.cxx26
-rw-r--r--extensions/source/propctrlr/propertycontrolextender.hxx3
-rw-r--r--formula/source/ui/dlg/formula.cxx16
12 files changed, 209 insertions, 218 deletions
diff --git a/basic/source/inc/runtime.hxx b/basic/source/inc/runtime.hxx
index f202a2acaa08..662a7d696859 100644
--- a/basic/source/inc/runtime.hxx
+++ b/basic/source/inc/runtime.hxx
@@ -32,12 +32,14 @@
#include <cmath>
#include <vector>
#include <memory>
+#include <optional>
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/container/XEnumeration.hpp>
#include <com/sun/star/container/XIndexAccess.hpp>
#include <unotools/localedatawrapper.hxx>
#include <o3tl/deleter.hxx>
#include <o3tl/typed_flags_set.hxx>
+#include <tools/wldcrd.hxx>
class SbiInstance; // active StarBASIC process
class SbiRuntime; // active StarBASIC procedure instance
@@ -99,8 +101,6 @@ namespace o3tl
template<> struct typed_flags<SbAttributes> : is_typed_flags<SbAttributes, 0x13> {};
}
-class WildCard;
-
class SbiRTLData
{
public:
@@ -110,7 +110,7 @@ public:
short nCurDirPos;
OUString sFullNameToBeChecked;
- std::unique_ptr<WildCard> pWildCard;
+ std::optional<WildCard> moWildCard;
css::uno::Sequence< OUString > aDirSeq;
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 8d50c6cc3409..3e0194f5783f 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -2490,7 +2490,7 @@ static OUString implSetupWildcard(const OUString& rFileParam, SbiRTLData& rRTLDa
static const char cWild1 = '*';
static const char cWild2 = '?';
- rRTLData.pWildCard.reset();
+ rRTLData.moWildCard.reset();
rRTLData.sFullNameToBeChecked.clear();
OUString aFileParam = rFileParam;
@@ -2544,7 +2544,7 @@ static OUString implSetupWildcard(const OUString& rFileParam, SbiRTLData& rRTLDa
// invalid anyway because it was not accepted by OSL before
if (aPureFileName != "*")
{
- rRTLData.pWildCard = std::make_unique<WildCard>(aPureFileName);
+ rRTLData.moWildCard.emplace(aPureFileName);
}
return aPathStr;
}
@@ -2553,9 +2553,9 @@ static bool implCheckWildcard(std::u16string_view rName, SbiRTLData const& rRTLD
{
bool bMatch = true;
- if (rRTLData.pWildCard)
+ if (rRTLData.moWildCard)
{
- bMatch = rRTLData.pWildCard->Matches(rName);
+ bMatch = rRTLData.moWildCard->Matches(rName);
}
return bMatch;
}
diff --git a/cui/source/inc/paragrph.hxx b/cui/source/inc/paragrph.hxx
index c61e988d04f5..688602f122dc 100644
--- a/cui/source/inc/paragrph.hxx
+++ b/cui/source/inc/paragrph.hxx
@@ -52,17 +52,17 @@ private:
// indentation
bool m_bSplitLRSpace = false; ///< which items to use?
- std::unique_ptr<SvxRelativeField> m_xLeftIndent;
+ SvxRelativeField m_aLeftIndent;
- std::unique_ptr<SvxRelativeField> m_xRightIndent;
+ SvxRelativeField m_aRightIndent;
std::unique_ptr<weld::Label> m_xFLineLabel;
- std::unique_ptr<SvxRelativeField> m_xFLineIndent;
+ SvxRelativeField m_aFLineIndent;
std::unique_ptr<weld::CheckButton> m_xAutoCB;
// distance
- std::unique_ptr<SvxRelativeField> m_xTopDist;
- std::unique_ptr<SvxRelativeField> m_xBottomDist;
+ SvxRelativeField m_aTopDist;
+ SvxRelativeField m_aBottomDist;
std::unique_ptr<weld::CheckButton> m_xContextualCB;
// line spacing
@@ -240,7 +240,7 @@ private:
std::unique_ptr<weld::Label> m_xMinWordLabel;
std::unique_ptr<weld::SpinButton> m_xMinWordLength;
std::unique_ptr<weld::Label> m_xHyphenZoneLabel;
- std::unique_ptr<SvxRelativeField> m_xHyphenZone;
+ SvxRelativeField m_aHyphenZone;
// pagebreak
std::unique_ptr<weld::CheckButton> m_xPageBreakBox;
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index 04a4ad8c82ea..a873f0f8a584 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -167,34 +167,34 @@ void SvxStdParagraphTabPage::ELRLoseFocus()
FieldUnit eUnit =
MapToFieldUnit( pPool->GetMetric( GetWhich( SID_ATTR_LRSPACE ) ) );
- sal_Int64 nL = m_xLeftIndent->denormalize(m_xLeftIndent->get_value(eUnit));
- sal_Int64 nR = m_xRightIndent->denormalize(m_xRightIndent->get_value(eUnit));
- OUString aTmp = m_xFLineIndent->get_text();
+ sal_Int64 nL = m_aLeftIndent.denormalize(m_aLeftIndent.get_value(eUnit));
+ sal_Int64 nR = m_aRightIndent.denormalize(m_aRightIndent.get_value(eUnit));
+ OUString aTmp = m_aFLineIndent.get_text();
- if (m_xLeftIndent->get_min(FieldUnit::NONE) < 0)
- m_xFLineIndent->set_min(-99999, FieldUnit::MM);
+ if (m_aLeftIndent.get_min(FieldUnit::NONE) < 0)
+ m_aFLineIndent.set_min(-99999, FieldUnit::MM);
else
- m_xFLineIndent->set_min(m_xFLineIndent->normalize(-nL), eUnit);
+ m_aFLineIndent.set_min(m_aFLineIndent.normalize(-nL), eUnit);
// Check only for concrete width (Shell)
sal_Int64 nTmp = nWidth - nL - nR - MM50;
- m_xFLineIndent->set_max(m_xFLineIndent->normalize(nTmp), eUnit);
+ m_aFLineIndent.set_max(m_aFLineIndent.normalize(nTmp), eUnit);
if (aTmp.isEmpty())
- m_xFLineIndent->set_text(OUString());
+ m_aFLineIndent.set_text(OUString());
// maximum left right
- aTmp = m_xLeftIndent->get_text();
+ aTmp = m_aLeftIndent.get_text();
nTmp = nWidth - nR - MM50;
- m_xLeftIndent->set_max(m_xLeftIndent->normalize(nTmp), eUnit);
+ m_aLeftIndent.set_max(m_aLeftIndent.normalize(nTmp), eUnit);
if ( aTmp.isEmpty() )
- m_xLeftIndent->set_text(OUString());
- aTmp = m_xRightIndent->get_text();
+ m_aLeftIndent.set_text(OUString());
+ aTmp = m_aRightIndent.get_text();
nTmp = nWidth - nL - MM50;
- m_xRightIndent->set_max(m_xRightIndent->normalize(nTmp), eUnit);
+ m_aRightIndent.set_max(m_aRightIndent.normalize(nTmp), eUnit);
if ( aTmp.isEmpty() )
- m_xRightIndent->set_text(OUString());
+ m_aRightIndent.set_text(OUString());
UpdateExample_Impl();
}
@@ -267,7 +267,7 @@ bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* rOutSet )
}
}
- if ( m_xTopDist->get_value_changed_from_saved() || m_xBottomDist->get_value_changed_from_saved()
+ if ( m_aTopDist.get_value_changed_from_saved() || m_aBottomDist.get_value_changed_from_saved()
|| m_xContextualCB->get_state_changed_from_saved())
{
nWhich = GetWhich( SID_ATTR_ULSPACE );
@@ -282,23 +282,23 @@ bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* rOutSet )
const SvxULSpaceItem& rOldItem =
static_cast<const SvxULSpaceItem&>(GetItemSet().GetParent()->Get( nWhich ));
- if ( m_xTopDist->IsRelative() )
+ if ( m_aTopDist.IsRelative() )
aMargin.SetUpper( rOldItem.GetUpper(),
- static_cast<sal_uInt16>(m_xTopDist->get_value(FieldUnit::NONE)) );
+ static_cast<sal_uInt16>(m_aTopDist.get_value(FieldUnit::NONE)) );
else
- aMargin.SetUpper( static_cast<sal_uInt16>(m_xTopDist->GetCoreValue(eUnit)) );
+ aMargin.SetUpper( static_cast<sal_uInt16>(m_aTopDist.GetCoreValue(eUnit)) );
- if ( m_xBottomDist->IsRelative() )
+ if ( m_aBottomDist.IsRelative() )
aMargin.SetLower( rOldItem.GetLower(),
- static_cast<sal_uInt16>(m_xBottomDist->get_value(FieldUnit::NONE)) );
+ static_cast<sal_uInt16>(m_aBottomDist.get_value(FieldUnit::NONE)) );
else
- aMargin.SetLower( static_cast<sal_uInt16>(m_xBottomDist->GetCoreValue(eUnit)) );
+ aMargin.SetLower( static_cast<sal_uInt16>(m_aBottomDist.GetCoreValue(eUnit)) );
}
else
{
- aMargin.SetUpper(static_cast<sal_uInt16>(m_xTopDist->GetCoreValue(eUnit)));
- aMargin.SetLower(static_cast<sal_uInt16>(m_xBottomDist->GetCoreValue(eUnit)));
+ aMargin.SetUpper(static_cast<sal_uInt16>(m_aTopDist.GetCoreValue(eUnit)));
+ aMargin.SetLower(static_cast<sal_uInt16>(m_aBottomDist.GetCoreValue(eUnit)));
}
aMargin.SetContextValue(m_xContextualCB->get_active());
@@ -311,7 +311,7 @@ bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* rOutSet )
}
bool bNullTab = false;
- if (m_bSplitLRSpace && m_xLeftIndent->get_value_changed_from_saved())
+ if (m_bSplitLRSpace && m_aLeftIndent.get_value_changed_from_saved())
{
nWhich = GetWhich(SID_ATTR_PARA_LEFTSPACE);
MapUnit const eUnit = pPool->GetMetric(nWhich);
@@ -325,19 +325,19 @@ bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* rOutSet )
const SvxTextLeftMarginItem & rOldItem(
static_cast<const SvxTextLeftMarginItem&>(GetItemSet().GetParent()->Get(nWhich)));
- if (m_xLeftIndent->IsRelative())
+ if (m_aLeftIndent.IsRelative())
{
item.SetTextLeft(rOldItem.GetTextLeft(),
- static_cast<sal_uInt16>(m_xLeftIndent->get_value(FieldUnit::NONE)));
+ static_cast<sal_uInt16>(m_aLeftIndent.get_value(FieldUnit::NONE)));
}
else
{
- item.SetTextLeft(m_xLeftIndent->GetCoreValue(eUnit));
+ item.SetTextLeft(m_aLeftIndent.GetCoreValue(eUnit));
}
}
else
{
- item.SetTextLeft(m_xLeftIndent->GetCoreValue(eUnit));
+ item.SetTextLeft(m_aLeftIndent.GetCoreValue(eUnit));
}
if (!pOld || *static_cast<const SvxTextLeftMarginItem*>(pOld) != item
|| SfxItemState::DONTCARE == GetItemSet().GetItemState(nWhich))
@@ -347,7 +347,7 @@ bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* rOutSet )
}
}
- if (m_bSplitLRSpace && m_xRightIndent->get_value_changed_from_saved())
+ if (m_bSplitLRSpace && m_aRightIndent.get_value_changed_from_saved())
{
nWhich = GetWhich(SID_ATTR_PARA_RIGHTSPACE);
MapUnit const eUnit = pPool->GetMetric(nWhich);
@@ -361,19 +361,19 @@ bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* rOutSet )
const SvxRightMarginItem & rOldItem(
static_cast<const SvxRightMarginItem&>(GetItemSet().GetParent()->Get(nWhich)));
- if (m_xRightIndent->IsRelative())
+ if (m_aRightIndent.IsRelative())
{
item.SetRight(rOldItem.GetRight(),
- static_cast<sal_uInt16>(m_xRightIndent->get_value(FieldUnit::NONE)));
+ static_cast<sal_uInt16>(m_aRightIndent.get_value(FieldUnit::NONE)));
}
else
{
- item.SetRight(m_xRightIndent->GetCoreValue(eUnit));
+ item.SetRight(m_aRightIndent.GetCoreValue(eUnit));
}
}
else
{
- item.SetRight(m_xRightIndent->GetCoreValue(eUnit));
+ item.SetRight(m_aRightIndent.GetCoreValue(eUnit));
}
if (!pOld || *static_cast<const SvxRightMarginItem*>(pOld) != item
|| SfxItemState::DONTCARE == GetItemSet().GetItemState(nWhich))
@@ -383,7 +383,7 @@ bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* rOutSet )
}
}
- if (m_bSplitLRSpace && (m_xFLineIndent->get_value_changed_from_saved()
+ if (m_bSplitLRSpace && (m_aFLineIndent.get_value_changed_from_saved()
|| m_xAutoCB->get_state_changed_from_saved()))
{
nWhich = GetWhich(SID_ATTR_PARA_FIRSTLINESPACE);
@@ -398,19 +398,19 @@ bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* rOutSet )
const SvxFirstLineIndentItem & rOldItem(
static_cast<const SvxFirstLineIndentItem&>(GetItemSet().GetParent()->Get(nWhich)));
- if (m_xFLineIndent->IsRelative())
+ if (m_aFLineIndent.IsRelative())
{
item.SetTextFirstLineOffset(rOldItem.GetTextFirstLineOffset(),
- static_cast<sal_uInt16>(m_xFLineIndent->get_value(FieldUnit::NONE)));
+ static_cast<sal_uInt16>(m_aFLineIndent.get_value(FieldUnit::NONE)));
}
else
{
- item.SetTextFirstLineOffset(static_cast<sal_uInt16>(m_xFLineIndent->GetCoreValue(eUnit)));
+ item.SetTextFirstLineOffset(static_cast<sal_uInt16>(m_aFLineIndent.GetCoreValue(eUnit)));
}
}
else
{
- item.SetTextFirstLineOffset(static_cast<sal_uInt16>(m_xFLineIndent->GetCoreValue(eUnit)));
+ item.SetTextFirstLineOffset(static_cast<sal_uInt16>(m_aFLineIndent.GetCoreValue(eUnit)));
}
item.SetAutoFirst(m_xAutoCB->get_active());
if (item.GetTextFirstLineOffset() < 0)
@@ -427,9 +427,9 @@ bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* rOutSet )
}
if (!m_bSplitLRSpace &&
- (m_xLeftIndent->get_value_changed_from_saved() ||
- m_xFLineIndent->get_value_changed_from_saved() ||
- m_xRightIndent->get_value_changed_from_saved() ||
+ (m_aLeftIndent.get_value_changed_from_saved() ||
+ m_aFLineIndent.get_value_changed_from_saved() ||
+ m_aRightIndent.get_value_changed_from_saved() ||
m_xAutoCB->get_state_changed_from_saved()))
{
nWhich = GetWhich( SID_ATTR_LRSPACE );
@@ -444,29 +444,29 @@ bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* rOutSet )
const SvxLRSpaceItem& rOldItem =
static_cast<const SvxLRSpaceItem&>(GetItemSet().GetParent()->Get( nWhich ));
- if (m_xLeftIndent->IsRelative())
+ if (m_aLeftIndent.IsRelative())
aMargin.SetTextLeft( rOldItem.GetTextLeft(),
- static_cast<sal_uInt16>(m_xLeftIndent->get_value(FieldUnit::NONE)) );
+ static_cast<sal_uInt16>(m_aLeftIndent.get_value(FieldUnit::NONE)) );
else
- aMargin.SetTextLeft(m_xLeftIndent->GetCoreValue(eUnit));
+ aMargin.SetTextLeft(m_aLeftIndent.GetCoreValue(eUnit));
- if ( m_xRightIndent->IsRelative() )
+ if ( m_aRightIndent.IsRelative() )
aMargin.SetRight( rOldItem.GetRight(),
- static_cast<sal_uInt16>(m_xRightIndent->get_value(FieldUnit::NONE)) );
+ static_cast<sal_uInt16>(m_aRightIndent.get_value(FieldUnit::NONE)) );
else
- aMargin.SetRight(m_xRightIndent->GetCoreValue(eUnit));
+ aMargin.SetRight(m_aRightIndent.GetCoreValue(eUnit));
- if ( m_xFLineIndent->IsRelative() )
+ if ( m_aFLineIndent.IsRelative() )
aMargin.SetTextFirstLineOffset( rOldItem.GetTextFirstLineOffset(),
- static_cast<sal_uInt16>(m_xFLineIndent->get_value(FieldUnit::NONE)) );
+ static_cast<sal_uInt16>(m_aFLineIndent.get_value(FieldUnit::NONE)) );
else
- aMargin.SetTextFirstLineOffset(static_cast<sal_uInt16>(m_xFLineIndent->GetCoreValue(eUnit)));
+ aMargin.SetTextFirstLineOffset(static_cast<sal_uInt16>(m_aFLineIndent.GetCoreValue(eUnit)));
}
else
{
- aMargin.SetTextLeft(m_xLeftIndent->GetCoreValue(eUnit));
- aMargin.SetRight(m_xRightIndent->GetCoreValue(eUnit));
- aMargin.SetTextFirstLineOffset(static_cast<sal_uInt16>(m_xFLineIndent->GetCoreValue(eUnit)));
+ aMargin.SetTextLeft(m_aLeftIndent.GetCoreValue(eUnit));
+ aMargin.SetRight(m_aRightIndent.GetCoreValue(eUnit));
+ aMargin.SetTextFirstLineOffset(static_cast<sal_uInt16>(m_aFLineIndent.GetCoreValue(eUnit)));
}
aMargin.SetAutoFirst(m_xAutoCB->get_active());
if ( aMargin.GetTextFirstLineOffset() < 0 )
@@ -537,19 +537,19 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet* rSet )
if(SvtCJKOptions::IsAsianTypographyEnabled() && bApplyCharUnit )
eFUnit = FieldUnit::CHAR;
- m_xLeftIndent->SetFieldUnit(eFUnit);
- m_xRightIndent->SetFieldUnit(eFUnit);
- m_xFLineIndent->SetFieldUnit(eFUnit);
+ m_aLeftIndent.SetFieldUnit(eFUnit);
+ m_aRightIndent.SetFieldUnit(eFUnit);
+ m_aFLineIndent.SetFieldUnit(eFUnit);
if ( eFUnit == FieldUnit::CHAR )
{
- m_xTopDist->SetFieldUnit(FieldUnit::LINE);
- m_xBottomDist->SetFieldUnit(FieldUnit::LINE);
+ m_aTopDist.SetFieldUnit(FieldUnit::LINE);
+ m_aBottomDist.SetFieldUnit(FieldUnit::LINE);
SetFieldUnit(*m_xLineDistAtMetricBox, FieldUnit::POINT);
}
else
{
- m_xTopDist->SetFieldUnit(eFUnit);
- m_xBottomDist->SetFieldUnit(eFUnit);
+ m_aTopDist.SetFieldUnit(eFUnit);
+ m_aBottomDist.SetFieldUnit(eFUnit);
SetFieldUnit(*m_xLineDistAtMetricBox, eFUnit);
}
@@ -572,24 +572,24 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet* rSet )
{
if (rOldLeftMargin.GetPropLeft() != 100)
{
- m_xLeftIndent->SetRelative( true );
- m_xLeftIndent->set_value(rOldLeftMargin.GetPropLeft(), FieldUnit::NONE);
+ m_aLeftIndent.SetRelative( true );
+ m_aLeftIndent.set_value(rOldLeftMargin.GetPropLeft(), FieldUnit::NONE);
}
else
{
- m_xLeftIndent->SetRelative(false);
- m_xLeftIndent->SetFieldUnit(eFUnit);
- m_xLeftIndent->SetMetricValue(rOldLeftMargin.GetTextLeft(), eUnit);
+ m_aLeftIndent.SetRelative(false);
+ m_aLeftIndent.SetFieldUnit(eFUnit);
+ m_aLeftIndent.SetMetricValue(rOldLeftMargin.GetTextLeft(), eUnit);
}
}
else
{
- m_xLeftIndent->SetMetricValue(rOldLeftMargin.GetTextLeft(), eUnit);
+ m_aLeftIndent.SetMetricValue(rOldLeftMargin.GetTextLeft(), eUnit);
}
}
else if (m_bSplitLRSpace)
{
- m_xLeftIndent->set_text(OUString());
+ m_aLeftIndent.set_text(OUString());
}
if (m_bSplitLRSpace && SfxItemState::DEFAULT <= eItemStateRM)
@@ -603,24 +603,24 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet* rSet )
{
if (rOldRightMargin.GetPropRight() != 100)
{
- m_xRightIndent->SetRelative( true );
- m_xRightIndent->set_value(rOldRightMargin.GetPropRight(), FieldUnit::NONE);
+ m_aRightIndent.SetRelative( true );
+ m_aRightIndent.set_value(rOldRightMargin.GetPropRight(), FieldUnit::NONE);
}
else
{
- m_xRightIndent->SetRelative(false);
- m_xRightIndent->SetFieldUnit(eFUnit);
- m_xRightIndent->SetMetricValue(rOldRightMargin.GetRight(), eUnit);
+ m_aRightIndent.SetRelative(false);
+ m_aRightIndent.SetFieldUnit(eFUnit);
+ m_aRightIndent.SetMetricValue(rOldRightMargin.GetRight(), eUnit);
}
}
else
{
- m_xRightIndent->SetMetricValue(rOldRightMargin.GetRight(), eUnit);
+ m_aRightIndent.SetMetricValue(rOldRightMargin.GetRight(), eUnit);
}
}
else if (m_bSplitLRSpace)
{
- m_xRightIndent->set_text(OUString());
+ m_aRightIndent.set_text(OUString());
}
if (m_bSplitLRSpace && SfxItemState::DEFAULT <= eItemStateFL)
@@ -634,28 +634,28 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet* rSet )
{
if (rOldFirstLine.GetPropTextFirstLineOffset() != 100)
{
- m_xFLineIndent->SetRelative(true);
- m_xFLineIndent->set_value(rOldFirstLine.GetPropTextFirstLineOffset(), FieldUnit::NONE);
+ m_aFLineIndent.SetRelative(true);
+ m_aFLineIndent.set_value(rOldFirstLine.GetPropTextFirstLineOffset(), FieldUnit::NONE);
}
else
{
- m_xFLineIndent->SetRelative(false);
- m_xFLineIndent->set_min(-9999, FieldUnit::NONE);
- m_xFLineIndent->SetFieldUnit(eFUnit);
- m_xFLineIndent->SetMetricValue(rOldFirstLine.GetTextFirstLineOffset(), eUnit);
+ m_aFLineIndent.SetRelative(false);
+ m_aFLineIndent.set_min(-9999, FieldUnit::NONE);
+ m_aFLineIndent.SetFieldUnit(eFUnit);
+ m_aFLineIndent.SetMetricValue(rOldFirstLine.GetTextFirstLineOffset(), eUnit);
}
m_xAutoCB->set_active(rOldFirstLine.IsAutoFirst());
}
else
{
- m_xFLineIndent->SetMetricValue(rOldFirstLine.GetTextFirstLineOffset(), eUnit);
+ m_aFLineIndent.SetMetricValue(rOldFirstLine.GetTextFirstLineOffset(), eUnit);
m_xAutoCB->set_active(rOldFirstLine.IsAutoFirst());
}
AutoHdl_Impl(*m_xAutoCB);
}
else if (m_bSplitLRSpace)
{
- m_xFLineIndent->set_text(OUString());
+ m_aFLineIndent.set_text(OUString());
}
sal_uInt16 _nWhich = GetWhich( SID_ATTR_LRSPACE );
@@ -672,39 +672,39 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet* rSet )
if ( rOldItem.GetPropLeft() != 100 )
{
- m_xLeftIndent->SetRelative( true );
- m_xLeftIndent->set_value(rOldItem.GetPropLeft(), FieldUnit::NONE);
+ m_aLeftIndent.SetRelative( true );
+ m_aLeftIndent.set_value(rOldItem.GetPropLeft(), FieldUnit::NONE);
}
else
{
- m_xLeftIndent->SetRelative(false);
- m_xLeftIndent->SetFieldUnit(eFUnit);
- m_xLeftIndent->SetMetricValue(rOldItem.GetTextLeft(), eUnit);
+ m_aLeftIndent.SetRelative(false);
+ m_aLeftIndent.SetFieldUnit(eFUnit);
+ m_aLeftIndent.SetMetricValue(rOldItem.GetTextLeft(), eUnit);
}
if ( rOldItem.GetPropRight() != 100 )
{
- m_xRightIndent->SetRelative( true );
- m_xRightIndent->set_value(rOldItem.GetPropRight(), FieldUnit::NONE);
+ m_aRightIndent.SetRelative( true );
+ m_aRightIndent.set_value(rOldItem.GetPropRight(), FieldUnit::NONE);
}
else
{
- m_xRightIndent->SetRelative(false);
- m_xRightIndent->SetFieldUnit(eFUnit);
- m_xRightIndent->SetMetricValue(rOldItem.GetRight(), eUnit);
+ m_aRightIndent.SetRelative(false);
+ m_aRightIndent.SetFieldUnit(eFUnit);
+ m_aRightIndent.SetMetricValue(rOldItem.GetRight(), eUnit);
}
if ( rOldItem.GetPropTextFirstLineOffset() != 100 )
{
- m_xFLineIndent->SetRelative(true);
- m_xFLineIndent->set_value(rOldItem.GetPropTextFirstLineOffset(), FieldUnit::NONE);
+ m_aFLineIndent.SetRelative(true);
+ m_aFLineIndent.set_value(rOldItem.GetPropTextFirstLineOffset(), FieldUnit::NONE);
}
else
{
- m_xFLineIndent->SetRelative(false);
- m_xFLineIndent->set_min(-9999, FieldUnit::NONE);
- m_xFLineIndent->SetFieldUnit(eFUnit);
- m_xFLineIndent->SetMetricValue(rOldItem.GetTextFirstLineOffset(), eUnit);
+ m_aFLineIndent.SetRelative(false);
+ m_aFLineIndent.set_min(-9999, FieldUnit::NONE);
+ m_aFLineIndent.SetFieldUnit(eFUnit);
+ m_aFLineIndent.SetMetricValue(rOldItem.GetTextFirstLineOffset(), eUnit);
}
m_xAutoCB->set_active(rOldItem.IsAutoFirst());
}
@@ -713,18 +713,18 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet* rSet )
const SvxLRSpaceItem& rSpace =
static_cast<const SvxLRSpaceItem&>(rSet->Get( _nWhich ));
- m_xLeftIndent->SetMetricValue(rSpace.GetTextLeft(), eUnit);
- m_xRightIndent->SetMetricValue(rSpace.GetRight(), eUnit);
- m_xFLineIndent->SetMetricValue(rSpace.GetTextFirstLineOffset(), eUnit);
+ m_aLeftIndent.SetMetricValue(rSpace.GetTextLeft(), eUnit);
+ m_aRightIndent.SetMetricValue(rSpace.GetRight(), eUnit);
+ m_aFLineIndent.SetMetricValue(rSpace.GetTextFirstLineOffset(), eUnit);
m_xAutoCB->set_active(rSpace.IsAutoFirst());
}
AutoHdl_Impl(*m_xAutoCB);
}
else if (!m_bSplitLRSpace)
{
- m_xLeftIndent->set_text(OUString());
- m_xRightIndent->set_text(OUString());
- m_xFLineIndent->set_text(OUString());
+ m_aLeftIndent.set_text(OUString());
+ m_aRightIndent.set_text(OUString());
+ m_aFLineIndent.set_text(OUString());
}
_nWhich = GetWhich( SID_ATTR_ULSPACE );
@@ -741,45 +741,45 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet* rSet )
if ( rOldItem.GetPropUpper() != 100 )
{
- m_xTopDist->SetRelative( true );
- m_xTopDist->set_value(rOldItem.GetPropUpper(), FieldUnit::NONE);
+ m_aTopDist.SetRelative( true );
+ m_aTopDist.set_value(rOldItem.GetPropUpper(), FieldUnit::NONE);
}
else
{
- m_xTopDist->SetRelative(false);
+ m_aTopDist.SetRelative(false);
if (eFUnit == FieldUnit::CHAR)
- m_xTopDist->SetFieldUnit(FieldUnit::LINE);
+ m_aTopDist.SetFieldUnit(FieldUnit::LINE);
else
- m_xTopDist->SetFieldUnit(eFUnit);
- m_xTopDist->SetMetricValue(rOldItem.GetUpper(), eUnit);
+ m_aTopDist.SetFieldUnit(eFUnit);
+ m_aTopDist.SetMetricValue(rOldItem.GetUpper(), eUnit);
}
if ( rOldItem.GetPropLower() != 100 )
{
- m_xBottomDist->SetRelative( true );
- m_xBottomDist->set_value(rOldItem.GetPropLower(), FieldUnit::NONE);
+ m_aBottomDist.SetRelative( true );
+ m_aBottomDist.set_value(rOldItem.GetPropLower(), FieldUnit::NONE);
}
else
{
- m_xBottomDist->SetRelative(false);
+ m_aBottomDist.SetRelative(false);
if (eFUnit == FieldUnit::CHAR)
- m_xBottomDist->SetFieldUnit(FieldUnit::LINE);
+ m_aBottomDist.SetFieldUnit(FieldUnit::LINE);
else
- m_xBottomDist->SetFieldUnit(eFUnit);
- m_xBottomDist->SetMetricValue(rOldItem.GetLower(), eUnit);
+ m_aBottomDist.SetFieldUnit(eFUnit);
+ m_aBottomDist.SetMetricValue(rOldItem.GetLower(), eUnit);
}
}
else
{
- m_xTopDist->SetMetricValue(rOldItem.GetUpper(), eUnit);
- m_xBottomDist->SetMetricValue(rOldItem.GetLower(), eUnit);
+ m_aTopDist.SetMetricValue(rOldItem.GetUpper(), eUnit);
+ m_aBottomDist.SetMetricValue(rOldItem.GetLower(), eUnit);
}
m_xContextualCB->set_active(rOldItem.GetContext());
}
else
{
- m_xTopDist->set_text(OUString());
- m_xBottomDist->set_text(OUString());
+ m_aTopDist.set_text(OUString());
+ m_aBottomDist.set_text(OUString());
}
_nWhich = GetWhich( SID_ATTR_PARA_LINESPACE );
@@ -812,15 +812,15 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet* rSet )
void SvxStdParagraphTabPage::ChangesApplied()
{
- m_xLeftIndent->save_value();
- m_xRightIndent->save_value();
- m_xFLineIndent->save_value();
+ m_aLeftIndent.save_value();
+ m_aRightIndent.save_value();
+ m_aFLineIndent.save_value();
m_xLineDist->save_value();
m_xLineDistAtPercentBox->save_value();
m_xLineDistAtMetricBox->save_value();
m_xRegisterCB->save_state();
- m_xTopDist->save_value();
- m_xBottomDist->save_value();
+ m_aTopDist.save_value();
+ m_aBottomDist.save_value();
m_xContextualCB->save_state();
m_xAutoCB->save_state();
}
@@ -829,11 +829,11 @@ void SvxStdParagraphTabPage::EnableRelativeMode()
{
DBG_ASSERT( GetItemSet().GetParent(), "RelativeMode, but no parent-set!" );
- m_xLeftIndent->EnableRelativeMode( 0, 999 );
- m_xFLineIndent->EnableRelativeMode( 0, 999 );
- m_xRightIndent->EnableRelativeMode( 0, 999 );
- m_xTopDist->EnableRelativeMode( 0, 999 );
- m_xBottomDist->EnableRelativeMode( 0, 999 );
+ m_aLeftIndent.EnableRelativeMode( 0, 999 );
+ m_aFLineIndent.EnableRelativeMode( 0, 999 );
+ m_aRightIndent.EnableRelativeMode( 0, 999 );
+ m_aTopDist.EnableRelativeMode( 0, 999 );
+ m_aBottomDist.EnableRelativeMode( 0, 999 );
bRelativeMode = true;
}
@@ -888,13 +888,13 @@ SvxStdParagraphTabPage::SvxStdParagraphTabPage(weld::Container* pPage, weld::Dia
, nWidth(11905 /*567 * 50*/)
, nMinFixDist(0)
, bRelativeMode(false)
- , m_xLeftIndent(new SvxRelativeField(m_xBuilder->weld_metric_spin_button("spinED_LEFTINDENT", FieldUnit::CM)))
- , m_xRightIndent(new SvxRelativeField(m_xBuilder->weld_metric_spin_button("spinED_RIGHTINDENT", FieldUnit::CM)))
+ , m_aLeftIndent(m_xBuilder->weld_metric_spin_button("spinED_LEFTINDENT", FieldUnit::CM))
+ , m_aRightIndent(m_xBuilder->weld_metric_spin_button("spinED_RIGHTINDENT", FieldUnit::CM))
, m_xFLineLabel(m_xBuilder->weld_label("labelFT_FLINEINDENT"))
- , m_xFLineIndent(new SvxRelativeField(m_xBuilder->weld_metric_spin_button("spinED_FLINEINDENT", FieldUnit::CM)))
+ , m_aFLineIndent(m_xBuilder->weld_metric_spin_button("spinED_FLINEINDENT", FieldUnit::CM))
, m_xAutoCB(m_xBuilder->weld_check_button("checkCB_AUTO"))
- , m_xTopDist(new SvxRelativeField(m_xBuilder->weld_metric_spin_button("spinED_TOPDIST", FieldUnit::CM)))
- , m_xBottomDist(new SvxRelativeField(m_xBuilder->weld_metric_spin_button("spinED_BOTTOMDIST", FieldUnit::CM)))
+ , m_aTopDist(m_xBuilder->weld_metric_spin_button("spinED_TOPDIST", FieldUnit::CM))
+ , m_aBottomDist(m_xBuilder->weld_metric_spin_button("spinED_BOTTOMDIST", FieldUnit::CM))
, m_xContextualCB(m_xBuilder->weld_check_button("checkCB_CONTEXTUALSPACING"))
, m_xLineDist(m_xBuilder->weld_combo_box("comboLB_LINEDIST"))
, m_xLineDistAtPercentBox(m_xBuilder->weld_metric_spin_button("spinED_LINEDISTPERCENT", FieldUnit::PERCENT))
@@ -912,7 +912,7 @@ SvxStdParagraphTabPage::SvxStdParagraphTabPage(weld::Container* pPage, weld::Dia
m_xLineDistAtMetricBox->hide();
Init_Impl();
- m_xFLineIndent->set_min(-9999, FieldUnit::NONE); // is set to 0 on default
+ m_aFLineIndent.set_min(-9999, FieldUnit::NONE); // is set to 0 on default
}
SvxStdParagraphTabPage::~SvxStdParagraphTabPage()
@@ -921,10 +921,10 @@ SvxStdParagraphTabPage::~SvxStdParagraphTabPage()
void SvxStdParagraphTabPage::EnableNegativeMode()
{
- m_xLeftIndent->set_min(-9999, FieldUnit::NONE);
- m_xRightIndent->set_min(-9999, FieldUnit::NONE);
- m_xRightIndent->EnableNegativeMode();
- m_xLeftIndent->EnableNegativeMode();
+ m_aLeftIndent.set_min(-9999, FieldUnit::NONE);
+ m_aRightIndent.set_min(-9999, FieldUnit::NONE);
+ m_aRightIndent.EnableNegativeMode();
+ m_aLeftIndent.EnableNegativeMode();
}
void SvxStdParagraphTabPage::SetLineSpacing_Impl
@@ -1082,31 +1082,31 @@ void SvxStdParagraphTabPage::Init_Impl()
m_xLineDist->connect_changed(LINK(this, SvxStdParagraphTabPage, LineDistHdl_Impl));
Link<weld::MetricSpinButton&,void> aLink2 = LINK(this, SvxStdParagraphTabPage, ELRLoseFocusHdl);
- m_xFLineIndent->connect_value_changed(aLink2);
- m_xLeftIndent->connect_value_changed(aLink2);
- m_xRightIndent->connect_value_changed(aLink2);
+ m_aFLineIndent.connect_value_changed(aLink2);
+ m_aLeftIndent.connect_value_changed(aLink2);
+ m_aRightIndent.connect_value_changed(aLink2);
Link<weld::MetricSpinButton&,void> aLink = LINK(this, SvxStdParagraphTabPage, ModifyHdl_Impl);
- m_xTopDist->connect_value_changed(aLink);
- m_xBottomDist->connect_value_changed(aLink);
+ m_aTopDist.connect_value_changed(aLink);
+ m_aBottomDist.connect_value_changed(aLink);
m_xAutoCB->connect_toggled(LINK(this, SvxStdParagraphTabPage, AutoHdl_Impl));
SfxItemPool* pPool = GetItemSet().GetPool();
DBG_ASSERT( pPool, "Where is the pool?" );
FieldUnit eUnit = MapToFieldUnit( pPool->GetMetric( GetWhich( SID_ATTR_LRSPACE ) ) );
- m_xTopDist->set_max( m_xTopDist->normalize( MAX_DURCH ), eUnit );
- m_xBottomDist->set_max( m_xBottomDist->normalize( MAX_DURCH ), eUnit );
+ m_aTopDist.set_max( m_aTopDist.normalize( MAX_DURCH ), eUnit );
+ m_aBottomDist.set_max( m_aBottomDist.normalize( MAX_DURCH ), eUnit );
m_xLineDistAtMetricBox->set_max( m_xLineDistAtMetricBox->normalize( MAX_DURCH ), eUnit );
}
void SvxStdParagraphTabPage::UpdateExample_Impl()
{
- m_aExampleWin.SetFirstLineOffset( static_cast<short>(m_xFLineIndent->denormalize( m_xFLineIndent->get_value( FieldUnit::TWIP ) )) );
- m_aExampleWin.SetLeftMargin( static_cast<tools::Long>(m_xLeftIndent->denormalize( m_xLeftIndent->get_value( FieldUnit::TWIP ) ) ) );
- m_aExampleWin.SetRightMargin( static_cast<tools::Long>(m_xRightIndent->denormalize( m_xRightIndent->get_value( FieldUnit::TWIP ) ) ) );
- m_aExampleWin.SetUpper( static_cast<sal_uInt16>(m_xTopDist->denormalize( m_xTopDist->get_value( FieldUnit::TWIP ) )) );
- m_aExampleWin.SetLower( static_cast<sal_uInt16>(m_xBottomDist->denormalize( m_xBottomDist->get_value( FieldUnit::TWIP ) )) );
+ m_aExampleWin.SetFirstLineOffset( static_cast<short>(m_aFLineIndent.denormalize( m_aFLineIndent.get_value( FieldUnit::TWIP ) )) );
+ m_aExampleWin.SetLeftMargin( static_cast<tools::Long>(m_aLeftIndent.denormalize( m_aLeftIndent.get_value( FieldUnit::TWIP ) ) ) );
+ m_aExampleWin.SetRightMargin( static_cast<tools::Long>(m_aRightIndent.denormalize( m_aRightIndent.get_value( FieldUnit::TWIP ) ) ) );
+ m_aExampleWin.SetUpper( static_cast<sal_uInt16>(m_aTopDist.denormalize( m_aTopDist.get_value( FieldUnit::TWIP ) )) );
+ m_aExampleWin.SetLower( static_cast<sal_uInt16>(m_aBottomDist.denormalize( m_aBottomDist.get_value( FieldUnit::TWIP ) )) );
int nPos = m_xLineDist->get_active();
@@ -1140,7 +1140,7 @@ IMPL_LINK(SvxStdParagraphTabPage, AutoHdl_Impl, weld::Toggleable&, rBox, void)
{
bool bEnable = !rBox.get_active();
m_xFLineLabel->set_sensitive(bEnable);
- m_xFLineIndent->set_sensitive(bEnable);
+ m_aFLineIndent.set_sensitive(bEnable);
}
void SvxStdParagraphTabPage::EnableAutoFirstLine()
@@ -1605,7 +1605,7 @@ bool SvxExtParagraphTabPage::FillItemSet( SfxItemSet* rOutSet )
m_xExtHyphenAfterBox->get_value_changed_from_saved() ||
m_xMaxHyphenEdit->get_value_changed_from_saved() ||
m_xMinWordLength->get_value_changed_from_saved() ||
- m_xHyphenZone->get_value_changed_from_saved() )
+ m_aHyphenZone.get_value_changed_from_saved() )
{
SvxHyphenZoneItem aHyphen(
static_cast<const SvxHyphenZoneItem&>(GetItemSet().Get( _nWhich )) );
@@ -1624,7 +1624,7 @@ bool SvxExtParagraphTabPage::FillItemSet( SfxItemSet* rOutSet )
SfxItemPool* pPool = GetItemSet().GetPool();
DBG_ASSERT( pPool, "Where is the pool?" );
MapUnit eUnit = pPool->GetMetric( _nWhich );
- aHyphen.GetTextHyphenZone() = static_cast<sal_uInt16>(m_xHyphenZone->GetCoreValue(eUnit));
+ aHyphen.GetTextHyphenZone() = static_cast<sal_uInt16>(m_aHyphenZone.GetCoreValue(eUnit));
if ( !pOld ||
*static_cast<const SvxHyphenZoneItem*>(pOld) != aHyphen ||
@@ -1845,8 +1845,8 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* rSet )
m_xExtHyphenAfterBox->set_value(rHyphen.GetMinTrail());
m_xMaxHyphenEdit->set_value(rHyphen.GetMaxHyphens());
m_xMinWordLength->set_value(rHyphen.GetMinWordLength());
- m_xHyphenZone->SetFieldUnit(eFUnit);
- m_xHyphenZone->SetMetricValue(rHyphen.GetTextHyphenZone(), MapUnit::MapTwip);
+ m_aHyphenZone.SetFieldUnit(eFUnit);
+ m_aHyphenZone.SetMetricValue(rHyphen.GetTextHyphenZone(), MapUnit::MapTwip);
}
else
{
@@ -1866,7 +1866,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* rSet )
m_xMinWordLabel->set_sensitive(bEnable);
m_xMinWordLength->set_sensitive(bEnable);
m_xHyphenZoneLabel->set_sensitive(bEnable);
- m_xHyphenZone->set_sensitive(bEnable);
+ m_aHyphenZone.set_sensitive(bEnable);
switch (rSet->GetItemState(SID_ATTR_PARA_PAGENUM))
{
@@ -2131,7 +2131,7 @@ void SvxExtParagraphTabPage::ChangesApplied()
DBG_ASSERT( pPool, "Where is the pool?" );
FieldUnit eUnit =
MapToFieldUnit( pPool->GetMetric( GetWhich( SID_ATTR_PARA_HYPHENZONE ) ) );
- m_xHyphenZone->set_value(m_xHyphenZone->get_value(eUnit), eUnit);
+ m_aHyphenZone.set_value(m_aHyphenZone.get_value(eUnit), eUnit);
m_xPageBreakBox->save_state();
m_xBreakPositionLB->save_value();
m_xBreakTypeLB->save_value();
@@ -2185,7 +2185,7 @@ SvxExtParagraphTabPage::SvxExtParagraphTabPage(weld::Container* pPage, weld::Dia
, m_xMinWordLabel(m_xBuilder->weld_label("labelMinLen"))
, m_xMinWordLength(m_xBuilder->weld_spin_button("spinMinLen"))
, m_xHyphenZoneLabel(m_xBuilder->weld_label("labelHyphenZone"))
- , m_xHyphenZone(new SvxRelativeField(m_xBuilder->weld_metric_spin_button("spinHyphenZone", FieldUnit::CM)))
+ , m_aHyphenZone(m_xBuilder->weld_metric_spin_button("spinHyphenZone", FieldUnit::CM))
//Page break
, m_xPageBreakBox(m_xBuilder->weld_check_button("checkInsert"))
, m_xBreakTypeFT(m_xBuilder->weld_label("labelType"))
@@ -2256,7 +2256,7 @@ SvxExtParagraphTabPage::SvxExtParagraphTabPage(weld::Container* pPage, weld::Dia
m_xMinWordLabel->set_sensitive(false);
m_xMinWordLength->set_sensitive(false);
m_xHyphenZoneLabel->set_sensitive(false);
- m_xHyphenZone->set_sensitive(false);
+ m_aHyphenZone.set_sensitive(false);
m_xPageNumBox->set_sensitive(false);
m_xPagenumEdit->set_sensitive(false);
// no column break in HTML
@@ -2393,7 +2393,7 @@ void SvxExtParagraphTabPage::HyphenClickHdl()
m_xMinWordLabel->set_sensitive(bEnable);
m_xMinWordLength->set_sensitive(bEnable);
m_xHyphenZoneLabel->set_sensitive(bEnable);
- m_xHyphenZone->set_sensitive(bEnable);
+ m_aHyphenZone.set_sensitive(bEnable);
m_xHyphenBox->set_state(bEnable ? TRISTATE_TRUE : TRISTATE_FALSE);
}
diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx
index aeb2d82bbd03..47b71fc82140 100644
--- a/dbaccess/source/filter/xml/xmlExport.cxx
+++ b/dbaccess/source/filter/xml/xmlExport.cxx
@@ -417,7 +417,7 @@ void ODBExport::exportDataSource()
aSettingsMap.emplace(eToken,sValue);
}
if ( bAutoIncrementEnabled && !(aAutoIncrement.first.isEmpty() && aAutoIncrement.second.isEmpty()) )
- m_aAutoIncrement.reset( new TStringPair(aAutoIncrement));
+ m_oAutoIncrement = aAutoIncrement;
if ( aDelimiter.bUsed )
m_aDelimiter.reset( new TDelimiter( aDelimiter ) );
@@ -699,10 +699,10 @@ void ODBExport::exportDelimiter()
void ODBExport::exportAutoIncrement()
{
- if (m_aAutoIncrement)
+ if (m_oAutoIncrement)
{
- AddAttribute(XML_NAMESPACE_DB, XML_ADDITIONAL_COLUMN_STATEMENT,m_aAutoIncrement->second);
- AddAttribute(XML_NAMESPACE_DB, XML_ROW_RETRIEVING_STATEMENT,m_aAutoIncrement->first);
+ AddAttribute(XML_NAMESPACE_DB, XML_ADDITIONAL_COLUMN_STATEMENT,m_oAutoIncrement->second);
+ AddAttribute(XML_NAMESPACE_DB, XML_ROW_RETRIEVING_STATEMENT,m_oAutoIncrement->first);
SvXMLElementExport aElem(*this,XML_NAMESPACE_DB, XML_AUTO_INCREMENT, true, true);
}
}
diff --git a/dbaccess/source/filter/xml/xmlExport.hxx b/dbaccess/source/filter/xml/xmlExport.hxx
index 4cded949d419..e35800efd298 100644
--- a/dbaccess/source/filter/xml/xmlExport.hxx
+++ b/dbaccess/source/filter/xml/xmlExport.hxx
@@ -83,7 +83,7 @@ class ODBExport : public SvXMLExport
}
};
- std::unique_ptr< TStringPair > m_aAutoIncrement;
+ std::optional< TStringPair > m_oAutoIncrement;
std::unique_ptr< TDelimiter > m_aDelimiter;
std::vector< TypedPropertyValue > m_aDataSourceSettings;
std::vector< XMLPropertyState > m_aCurrentPropertyStates;
diff --git a/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx b/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx
index 7e6c4f111e5f..9f110d472017 100644
--- a/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx
+++ b/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx
@@ -28,9 +28,9 @@ using namespace dbaui;
OTableFieldDescWin::OTableFieldDescWin(weld::Container* pParent, OTableDesignView* pView)
: OChildWindow(pParent, "dbaccess/ui/fielddescpanel.ui", "FieldDescPanel")
- , m_xHelpBar(new OTableDesignHelpBar(m_xBuilder->weld_text_view("textview")))
+ , m_aHelpBar(m_xBuilder->weld_text_view("textview"))
, m_xBox(m_xBuilder->weld_container("box"))
- , m_xFieldControl(new OTableFieldControl(m_xBox.get(), m_xHelpBar.get(), pView))
+ , m_xFieldControl(new OTableFieldControl(m_xBox.get(), &m_aHelpBar, pView))
, m_xHeader(m_xBuilder->weld_label("header"))
, m_eChildFocus(NONE)
{
@@ -39,13 +39,13 @@ OTableFieldDescWin::OTableFieldDescWin(weld::Container* pParent, OTableDesignVie
m_xFieldControl->SetHelpId(HID_TAB_DESIGN_FIELDCONTROL);
- m_xHelpBar->connect_focus_in(LINK(this, OTableFieldDescWin, HelpFocusIn));
+ m_aHelpBar.connect_focus_in(LINK(this, OTableFieldDescWin, HelpFocusIn));
m_xFieldControl->connect_focus_in(LINK(this, OTableFieldDescWin, FieldFocusIn));
}
bool OTableFieldDescWin::HasChildPathFocus() const
{
- return m_xFieldControl->HasChildPathFocus() || m_xHelpBar->HasFocus();
+ return m_xFieldControl->HasChildPathFocus() || m_aHelpBar.HasFocus();
}
OTableFieldDescWin::~OTableFieldDescWin()
@@ -81,7 +81,7 @@ IClipboardTest* OTableFieldDescWin::getActiveChild() const
pTest = m_xFieldControl.get();
break;
default:
- pTest = m_xHelpBar.get();
+ pTest = const_cast<OTableDesignHelpBar*>(&m_aHelpBar);
break;
}
return pTest;
diff --git a/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx b/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx
index 9f15c1e1b90b..f14e468c561e 100644
--- a/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx
+++ b/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx
@@ -21,10 +21,10 @@
#include <IClipBoardTest.hxx>
#include <ChildWindow.hxx>
#include "TableFieldControl.hxx"
+#include <TableDesignHelpBar.hxx>
namespace dbaui
{
- class OTableDesignHelpBar;
class OTableDesignView;
class OFieldDescription;
@@ -38,7 +38,7 @@ namespace dbaui
NONE
};
private:
- std::unique_ptr<OTableDesignHelpBar> m_xHelpBar;
+ OTableDesignHelpBar m_aHelpBar;
std::unique_ptr<weld::Container> m_xBox;
std::unique_ptr<OTableFieldControl> m_xFieldControl;
std::unique_ptr<weld::Label> m_xHeader;
diff --git a/desktop/source/deployment/dp_log.cxx b/desktop/source/deployment/dp_log.cxx
index 9cdf8d071a99..5d75422cf0d5 100644
--- a/desktop/source/deployment/dp_log.cxx
+++ b/desktop/source/deployment/dp_log.cxx
@@ -40,7 +40,7 @@ namespace {
class ProgressLogImpl : public cppu::BaseMutex, public t_log_helper
{
- std::unique_ptr<comphelper::EventLogger> m_logger;
+ comphelper::EventLogger m_logger;
protected:
virtual void SAL_CALL disposing() override;
@@ -77,9 +77,9 @@ ProgressLogImpl::ProgressLogImpl(
Sequence<Any> const & /* args */,
Reference<XComponentContext> const & xContext )
: t_log_helper( m_aMutex )
-{
// Use the logger created by unopkg app
- m_logger.reset(new comphelper::EventLogger(xContext, "unopkg"));
+ , m_logger(xContext, "unopkg")
+{
}
// XServiceInfo
@@ -122,7 +122,7 @@ void ProgressLogImpl::update( Any const & Status )
logLevel = LogLevel::SEVERE;
buf.append( ::comphelper::anyToString(Status) );
}
- m_logger->log(logLevel, buf.makeStringAndClear());
+ m_logger.log(logLevel, buf.makeStringAndClear());
}
diff --git a/extensions/source/propctrlr/propertycontrolextender.cxx b/extensions/source/propctrlr/propertycontrolextender.cxx
index 060a184872a2..d30331365831 100644
--- a/extensions/source/propctrlr/propertycontrolextender.cxx
+++ b/extensions/source/propctrlr/propertycontrolextender.cxx
@@ -42,26 +42,16 @@ namespace pcr
namespace KeyFunction = ::com::sun::star::awt::KeyFunction;
- //= PropertyControlExtender_Data
-
- struct PropertyControlExtender_Data
- {
- Reference< XPropertyControl > xControl;
- Reference< XWindow > xControlWindow;
- };
-
-
//= PropertyControlExtender
PropertyControlExtender::PropertyControlExtender( const Reference< XPropertyControl >& _rxObservedControl )
- :m_pData( new PropertyControlExtender_Data )
{
try
{
- m_pData->xControl.set( _rxObservedControl, UNO_SET_THROW );
- m_pData->xControlWindow.set( m_pData->xControl->getControlWindow(), UNO_SET_THROW );
- m_pData->xControlWindow->addKeyListener( this );
+ mxControl.set( _rxObservedControl, UNO_SET_THROW );
+ mxControlWindow.set( mxControl->getControlWindow(), UNO_SET_THROW );
+ mxControlWindow->addKeyListener( this );
}
catch( const Exception& )
{
@@ -77,7 +67,7 @@ namespace pcr
void SAL_CALL PropertyControlExtender::keyPressed( const KeyEvent& _event )
{
- OSL_ENSURE( _event.Source == m_pData->xControlWindow, "PropertyControlExtender::keyPressed: where does this come from?" );
+ OSL_ENSURE( _event.Source == mxControlWindow, "PropertyControlExtender::keyPressed: where does this come from?" );
if ( ( _event.KeyFunc != KeyFunction::DELETE )
|| ( _event.Modifiers != 0 )
)
@@ -85,7 +75,7 @@ namespace pcr
try
{
- Reference< XPropertyControl > xControl( m_pData->xControl, UNO_SET_THROW );
+ Reference< XPropertyControl > xControl( mxControl, UNO_SET_THROW );
// reset the value
xControl->setValue( Any() );
@@ -112,10 +102,10 @@ namespace pcr
void SAL_CALL PropertyControlExtender::disposing( const EventObject& Source )
{
- OSL_ENSURE( Source.Source == m_pData->xControlWindow, "PropertyControlExtender::disposing: where does this come from?" );
+ OSL_ENSURE( Source.Source == mxControlWindow, "PropertyControlExtender::disposing: where does this come from?" );
(void)Source.Source;
- m_pData->xControlWindow.clear();
- m_pData->xControl.clear();
+ mxControlWindow.clear();
+ mxControl.clear();
}
diff --git a/extensions/source/propctrlr/propertycontrolextender.hxx b/extensions/source/propctrlr/propertycontrolextender.hxx
index ed7c4a06c448..e376223ebf35 100644
--- a/extensions/source/propctrlr/propertycontrolextender.hxx
+++ b/extensions/source/propctrlr/propertycontrolextender.hxx
@@ -53,7 +53,8 @@ namespace pcr
virtual ~PropertyControlExtender() override;
private:
- std::unique_ptr< PropertyControlExtender_Data > m_pData;
+ css::uno::Reference< css::inspection::XPropertyControl > mxControl;
+ css::uno::Reference< css::awt::XWindow > mxControlWindow;
};
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx
index 139c9ab4795c..038fc2b63cf9 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -124,7 +124,7 @@ public:
mutable uno::Reference< sheet::XFormulaOpCodeMapper> m_xOpCodeMapper;
uno::Sequence< sheet::FormulaToken > m_aTokenList;
::std::unique_ptr<FormulaTokenArray> m_pTokenArray;
- ::std::unique_ptr<FormulaTokenArrayPlainIterator> m_pTokenArrayIterator;
+ ::std::optional<FormulaTokenArrayPlainIterator> m_oTokenArrayIterator;
mutable uno::Sequence< sheet::FormulaOpCodeMapEntry > m_aSpecialOpCodes;
mutable uno::Sequence< sheet::FormulaToken > m_aSeparatorsOpCodes;
mutable uno::Sequence< sheet::FormulaOpCodeMapEntry > m_aFunctionOpCodes;
@@ -522,7 +522,7 @@ void FormulaDlg_Impl::UpdateValues( bool bForceRecalcStruct )
assert( 0 <= nPos && nPos < m_pHelper->getCurrentFormula().getLength());
OUStringBuffer aBuf;
const FormulaToken* pToken = nullptr;
- for (pToken = m_pTokenArrayIterator->First(); pToken; pToken = m_pTokenArrayIterator->Next())
+ for (pToken = m_oTokenArrayIterator->First(); pToken; pToken = m_oTokenArrayIterator->Next())
{
pCompiler->CreateStringFromToken( aBuf, pToken);
if (nPos < aBuf.getLength())
@@ -637,7 +637,7 @@ void FormulaDlg_Impl::MakeTree(StructPage* _pTree, weld::TreeIter* pParent, cons
pEntry = xEntry.get();
}
- MakeTree(_pTree, pEntry, _pToken, m_pTokenArrayIterator->PrevRPN(), nParas);
+ MakeTree(_pTree, pEntry, _pToken, m_oTokenArrayIterator->PrevRPN(), nParas);
if (bCalcSubformula)
{
@@ -663,8 +663,8 @@ void FormulaDlg_Impl::MakeTree(StructPage* _pTree, weld::TreeIter* pParent, cons
}
--Count;
- m_pTokenArrayIterator->NextRPN(); /* TODO: what's this to be? ThisRPN()? */
- MakeTree( _pTree, pParent, _pToken, m_pTokenArrayIterator->PrevRPN(), Count);
+ m_oTokenArrayIterator->NextRPN(); /* TODO: what's this to be? ThisRPN()? */
+ MakeTree( _pTree, pParent, _pToken, m_oTokenArrayIterator->PrevRPN(), Count);
}
else
{
@@ -729,7 +729,7 @@ void FormulaDlg_Impl::MakeTree(StructPage* _pTree, weld::TreeIter* pParent, cons
_pTree->InsertEntry(aResult, pParent, STRUCT_END, 0, _pToken, *xEntry);
}
--Count;
- MakeTree( _pTree, pParent, _pToken, m_pTokenArrayIterator->PrevRPN(), Count);
+ MakeTree( _pTree, pParent, _pToken, m_oTokenArrayIterator->PrevRPN(), Count);
}
}
catch (const uno::Exception&)
@@ -741,7 +741,7 @@ void FormulaDlg_Impl::MakeTree(StructPage* _pTree, weld::TreeIter* pParent, cons
void FormulaDlg_Impl::fillTree(StructPage* _pTree)
{
InitFormulaOpCodeMapper();
- FormulaToken* pToken = m_pTokenArrayIterator->LastRPN();
+ FormulaToken* pToken = m_oTokenArrayIterator->LastRPN();
if ( pToken != nullptr)
{
@@ -765,7 +765,7 @@ void FormulaDlg_Impl::UpdateTokenArray( const OUString& rStrExp)
}
InitFormulaOpCodeMapper();
m_pTokenArray = m_pHelper->convertToTokenArray(m_aTokenList);
- m_pTokenArrayIterator.reset(new FormulaTokenArrayPlainIterator(*m_pTokenArray));
+ m_oTokenArrayIterator.emplace(*m_pTokenArray);
const sal_Int32 nLen = static_cast<sal_Int32>(m_pTokenArray->GetLen());
FormulaToken** pTokens = m_pTokenArray->GetArray();
if ( pTokens && nLen == m_aTokenList.getLength() )