summaryrefslogtreecommitdiffstats
path: root/reportdesign/source/ui/report/dlgedclip.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-03-12 14:53:28 +0200
committerNoel Grandin <noel@peralex.com>2015-03-18 14:23:50 +0200
commitfb14be5f8f74f83ba89e15f891ddf1f753dcc62f (patch)
treebeaa4af08b0c3d75bf6e40b21b96c55e0ac1c60a /reportdesign/source/ui/report/dlgedclip.cxx
parentconvert AccessibleStates to enum class (diff)
downloadcore-fb14be5f8f74f83ba89e15f891ddf1f753dcc62f.tar.gz
core-fb14be5f8f74f83ba89e15f891ddf1f753dcc62f.zip
create new 'enum class' SotClipboardFormatId to unify types
of which there are several. There are some issues here I am unsure of - the SW and SC and CHART2 modules essentially ignore the enum values and assign their own ids Perhaps I should change them to use the common values and create new enum values where necessary? - the sc/qa/ and sq/qa/ and starmath/qa/ code was doing some dodgy stuff. I translated the code to pass down the stuff numeric values to the underlying code, but perhaps further fixing is necessary? Change-Id: Ic06d723e404481e3f1bca67c43b70321b764d923
Diffstat (limited to 'reportdesign/source/ui/report/dlgedclip.cxx')
-rw-r--r--reportdesign/source/ui/report/dlgedclip.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/reportdesign/source/ui/report/dlgedclip.cxx b/reportdesign/source/ui/report/dlgedclip.cxx
index 3099489752f0..f85e21fc77cb 100644
--- a/reportdesign/source/ui/report/dlgedclip.cxx
+++ b/reportdesign/source/ui/report/dlgedclip.cxx
@@ -37,13 +37,13 @@ OReportExchange::OReportExchange(const TSectionElements& _rCopyElements )
{
}
-sal_uInt32 OReportExchange::getDescriptorFormatId()
+SotClipboardFormatId OReportExchange::getDescriptorFormatId()
{
- static sal_uInt32 s_nFormat = (sal_uInt32)-1;
- if ((sal_uInt32)-1 == s_nFormat)
+ static SotClipboardFormatId s_nFormat = static_cast<SotClipboardFormatId>(-1);
+ if (static_cast<SotClipboardFormatId>(-1) == s_nFormat)
{
s_nFormat = SotExchange::RegisterFormatName(OUString("application/x-openoffice;windows_formatname=\"report.ReportObjectsTransfer\""));
- OSL_ENSURE((sal_uInt32)-1 != s_nFormat, "OReportExchange::getDescriptorFormatId: bad exchange id!");
+ OSL_ENSURE(static_cast<SotClipboardFormatId>(-1) != s_nFormat, "OReportExchange::getDescriptorFormatId: bad exchange id!");
}
return s_nFormat;
}
@@ -55,7 +55,7 @@ void OReportExchange::AddSupportedFormats()
bool OReportExchange::GetData( const datatransfer::DataFlavor& _rFlavor, const OUString& /*rDestDoc*/ )
{
- const sal_uInt32 nFormatId = SotExchange::GetFormat(_rFlavor);
+ const SotClipboardFormatId nFormatId = SotExchange::GetFormat(_rFlavor);
return (nFormatId == getDescriptorFormatId()) && SetAny( uno::Any(m_aCopyElements), _rFlavor );
}
@@ -66,7 +66,7 @@ bool OReportExchange::canExtract(const DataFlavorExVector& _rFlavor)
OReportExchange::TSectionElements OReportExchange::extractCopies(const TransferableDataHelper& _rData)
{
- sal_Int32 nKnownFormatId = getDescriptorFormatId();
+ SotClipboardFormatId nKnownFormatId = getDescriptorFormatId();
if ( _rData.HasFormat( nKnownFormatId ) )
{
// extract the any from the transferable