diff options
author | Michael Stahl <mstahl@redhat.com> | 2017-10-26 23:15:06 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2017-10-26 23:17:45 +0200 |
commit | 11d2f3d6e1b6c9baf43d8521293c53525108436d (patch) | |
tree | ffe35d5d47713a11c93c3bf11f588eeaf492fc16 /sw | |
parent | 213f7c02d4f3ddbe2f52950575e2559c52d98ac2 (diff) |
vcl: make MapMode constructor explicit
Insert constructor everywhere, except a couple places that apparently
want to compare GetMapUnit().
Change-Id: I1910deb60562e5e949203435e827057f70a3f988
Diffstat (limited to 'sw')
30 files changed, 57 insertions, 57 deletions
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index 87828b3eb23e..5f54e2daf937 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -2948,11 +2948,11 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan if ( !aSz.Width() || !aSz.Height() ) { aSz.Width() = aSz.Height() = 5000; - aSz = OutputDevice::LogicToLogic - ( aSz, MapMode( MapUnit::Map100thMM ), aRefMap ); + aSz = OutputDevice::LogicToLogic(aSz, + MapMode(MapUnit::Map100thMM), MapMode(aRefMap)); } MapMode aMyMap( MapUnit::MapTwip ); - aSz = OutputDevice::LogicToLogic( aSz, aRefMap, aMyMap ); + aSz = OutputDevice::LogicToLogic(aSz, MapMode(aRefMap), aMyMap); SwFormatFrameSize aFrameSz; aFrameSz.SetSize(aSz); aFrameSet.Put(aFrameSz); diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index 1c0c9eeccdf8..51f9a7588cf0 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -2329,8 +2329,8 @@ awt::Size SwWW8ImplReader::MiserableDropDownFormHack(const OUString &rString, static_cast<const SvxFontHeightItem*>(pItem)->GetHeight() ); aTmp <<= ((float)aSize.Height()) / 20.0; - aFont.SetFontSize(OutputDevice::LogicToLogic(aSize, MapUnit::MapTwip, - MapUnit::Map100thMM)); + aFont.SetFontSize(OutputDevice::LogicToLogic(aSize, + MapMode(MapUnit::MapTwip), MapMode(MapUnit::Map100thMM))); } break; diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx index 52249be91ca7..7ee6fac81825 100644 --- a/sw/source/filter/ww8/ww8par4.cxx +++ b/sw/source/filter/ww8/ww8par4.cxx @@ -271,7 +271,7 @@ SwFrameFormat* SwWW8ImplReader::ImportOle(const Graphic* pGrf, pTempSet->Put( aAnchor ); const Size aSizeTwip = OutputDevice::LogicToLogic( - aGraph.GetPrefSize(), aGraph.GetPrefMapMode(), MapUnit::MapTwip ); + aGraph.GetPrefSize(), aGraph.GetPrefMapMode(), MapMode(MapUnit::MapTwip)); pTempSet->Put( SwFormatFrameSize( ATT_FIX_SIZE, aSizeTwip.Width(), aSizeTwip.Height() ) ); @@ -321,7 +321,7 @@ bool SwWW8ImplReader::ImportOleWMF(tools::SvRef<SotStorage> xSrc1,GDIMetaFile &r aFinalSize.Width() = rX; aFinalSize.Height() = rY; aFinalSize = OutputDevice::LogicToLogic( - aFinalSize, MapUnit::MapTwip, rWMF.GetPrefMapMode() ); + aFinalSize, MapMode(MapUnit::MapTwip), rWMF.GetPrefMapMode() ); aOrigSize = rWMF.GetPrefSize(); Fraction aScaleX(aFinalSize.Width(),aOrigSize.Width()); Fraction aScaleY(aFinalSize.Height(),aOrigSize.Height()); @@ -356,7 +356,7 @@ SdrObject* SwWW8ImplReader::ImportOleBase( Graphic& rGraph, { rGraph = *pGrf; const Size aSizeTwip = OutputDevice::LogicToLogic( - rGraph.GetPrefSize(), rGraph.GetPrefMapMode(), MapUnit::MapTwip ); + rGraph.GetPrefSize(), rGraph.GetPrefMapMode(), MapMode(MapUnit::MapTwip)); nX = aSizeTwip.Width(); nY = aSizeTwip.Height(); } @@ -370,7 +370,7 @@ SdrObject* SwWW8ImplReader::ImportOleBase( Graphic& rGraph, { // 03-META stream is not available. Maybe it's a 03-PICT? const Size aSizeTwip = OutputDevice::LogicToLogic( - rGraph.GetPrefSize(), rGraph.GetPrefMapMode(), MapUnit::MapTwip ); + rGraph.GetPrefSize(), rGraph.GetPrefMapMode(), MapMode(MapUnit::MapTwip)); nX = aSizeTwip.Width(); nY = aSizeTwip.Height(); // PICT: no WMF available -> Graphic instead of OLE diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx index a7ea624175c4..78cab08507f0 100644 --- a/sw/source/filter/xml/xmltexti.cxx +++ b/sw/source/filter/xml/xmltexti.cxx @@ -124,7 +124,7 @@ static void lcl_setObjectVisualArea( const uno::Reference< embed::XEmbeddedObjec { // convert the visual area to the objects units MapUnit aObjUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( nAspect ) ); - Size aObjVisSize = OutputDevice::LogicToLogic( aVisSize, aUnit, aObjUnit ); + Size aObjVisSize = OutputDevice::LogicToLogic(aVisSize, MapMode(aUnit), MapMode(aObjUnit)); awt::Size aSz; aSz.Width = aObjVisSize.Width(); aSz.Height = aObjVisSize.Height(); diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 922901abd31d..a603ef992b81 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -1573,7 +1573,7 @@ SwMarkPreview::SwMarkPreview( vcl::Window *pParent, WinBits nWinBits ) : { m_aInitialSize = getPreviewOptionsSize(this); InitColors(); - SetMapMode(MapUnit::MapPixel); + SetMapMode(MapMode(MapUnit::MapPixel)); } VCL_BUILDER_FACTORY_ARGS(SwMarkPreview, 0) diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx index aa6b09aa4304..3782b92bf1c1 100644 --- a/sw/source/ui/dbui/addresslistdialog.cxx +++ b/sw/source/ui/dbui/addresslistdialog.cxx @@ -195,7 +195,7 @@ SwAddressListDialog::SwAddressListDialog(SwMailMergeAddressBlockPage* pParent) m_pTablePB->SetClickHdl(LINK( this, SwAddressListDialog, TableSelectHdl_Impl)); SvSimpleTableContainer *pHeaderTreeContainer = get<SvSimpleTableContainer>("sources"); - Size aSize = pHeaderTreeContainer->LogicToPixel(Size(182 , 102), MapUnit::MapAppFont); + Size aSize = pHeaderTreeContainer->LogicToPixel(Size(182 , 102), MapMode(MapUnit::MapAppFont)); pHeaderTreeContainer->set_width_request(aSize.Width()); pHeaderTreeContainer->set_height_request(aSize.Height()); m_pListLB = VclPtr<SwAddrSourceLB>::Create(*pHeaderTreeContainer); diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx index 9960f0d978b2..199b093a4f8b 100644 --- a/sw/source/ui/dbui/createaddresslistdialog.cxx +++ b/sw/source/ui/dbui/createaddresslistdialog.cxx @@ -152,8 +152,8 @@ void SwAddressControl_Impl::SetData(SwCSVData& rDBData) std::vector< OUString >::iterator aHeaderIter; - long nFTXPos = m_pWindow->LogicToPixel(Point(RSC_SP_CTRL_X, RSC_SP_CTRL_X), MapUnit::MapAppFont).X(); - long nFTHeight = m_pWindow->LogicToPixel(Size(RSC_BS_CHARHEIGHT, RSC_BS_CHARHEIGHT), MapUnit::MapAppFont).Height(); + long nFTXPos = m_pWindow->LogicToPixel(Point(RSC_SP_CTRL_X, RSC_SP_CTRL_X), MapMode(MapUnit::MapAppFont)).X(); + long nFTHeight = m_pWindow->LogicToPixel(Size(RSC_BS_CHARHEIGHT, RSC_BS_CHARHEIGHT), MapMode(MapUnit::MapAppFont)).Height(); long nFTWidth = 0; //determine the width of the FixedTexts @@ -168,12 +168,12 @@ void SwAddressControl_Impl::SetData(SwCSVData& rDBData) //add some pixels nFTWidth += 2; long nEDXPos = nFTWidth + nFTXPos + - m_pWindow->LogicToPixel(Size(RSC_SP_CTRL_DESC_X, RSC_SP_CTRL_DESC_X), MapUnit::MapAppFont).Width(); - long nEDHeight = m_pWindow->LogicToPixel(Size(RSC_CD_TEXTBOX_HEIGHT, RSC_CD_TEXTBOX_HEIGHT), MapUnit::MapAppFont).Height(); + m_pWindow->LogicToPixel(Size(RSC_SP_CTRL_DESC_X, RSC_SP_CTRL_DESC_X), MapMode(MapUnit::MapAppFont)).Width(); + long nEDHeight = m_pWindow->LogicToPixel(Size(RSC_CD_TEXTBOX_HEIGHT, RSC_CD_TEXTBOX_HEIGHT), MapMode(MapUnit::MapAppFont)).Height(); long nEDWidth = m_aWinOutputSize.Width() - nEDXPos - nFTXPos; - m_nLineHeight = nEDHeight + m_pWindow->LogicToPixel(Size(RSC_SP_CTRL_GROUP_Y, RSC_SP_CTRL_GROUP_Y), MapUnit::MapAppFont).Height(); + m_nLineHeight = nEDHeight + m_pWindow->LogicToPixel(Size(RSC_SP_CTRL_GROUP_Y, RSC_SP_CTRL_GROUP_Y), MapMode(MapUnit::MapAppFont)).Height(); - long nEDYPos = m_pWindow->LogicToPixel(Size(RSC_SP_CTRL_DESC_Y, RSC_SP_CTRL_DESC_Y), MapUnit::MapAppFont).Height(); + long nEDYPos = m_pWindow->LogicToPixel(Size(RSC_SP_CTRL_DESC_Y, RSC_SP_CTRL_DESC_Y), MapMode(MapUnit::MapAppFont)).Height(); long nFTYPos = nEDYPos + nEDHeight - nFTHeight; Link<Control&,void> aFocusLink = LINK(this, SwAddressControl_Impl, GotFocusHdl_Impl); @@ -210,7 +210,7 @@ void SwAddressControl_Impl::SetData(SwCSVData& rDBData) { //the m_aWindow has to be at least as high as the ScrollBar and it must include the last Edit sal_Int32 nContentHeight = pLastEdit->GetPosPixel().Y() + nEDHeight + - m_pWindow->LogicToPixel(Size(RSC_SP_CTRL_GROUP_Y, RSC_SP_CTRL_GROUP_Y), MapUnit::MapAppFont).Height(); + m_pWindow->LogicToPixel(Size(RSC_SP_CTRL_GROUP_Y, RSC_SP_CTRL_GROUP_Y), MapMode(MapUnit::MapAppFont)).Height(); if(nContentHeight < m_pScrollBar->GetSizePixel().Height()) { nContentHeight = m_pScrollBar->GetSizePixel().Height(); @@ -362,7 +362,7 @@ bool SwAddressControl_Impl::PreNotify( NotifyEvent& rNEvt ) Size SwAddressControl_Impl::GetOptimalSize() const { - return LogicToPixel(Size(250, 160), MapUnit::MapAppFont); + return LogicToPixel(Size(250, 160), MapMode(MapUnit::MapAppFont)); } void SwAddressControl_Impl::Resize() diff --git a/sw/source/ui/dbui/dbtablepreviewdialog.cxx b/sw/source/ui/dbui/dbtablepreviewdialog.cxx index 347515038357..9676508fa7c6 100644 --- a/sw/source/ui/dbui/dbtablepreviewdialog.cxx +++ b/sw/source/ui/dbui/dbtablepreviewdialog.cxx @@ -37,7 +37,7 @@ SwDBTablePreviewDialog::SwDBTablePreviewDialog(vcl::Window* pParent, uno::Sequen { get(m_pDescriptionFI, "description"); get(m_pBeamerWIN, "beamer"); - Size aSize(LogicToPixel(Size(338, 150), MapUnit::MapAppFont)); + Size aSize(LogicToPixel(Size(338, 150), MapMode(MapUnit::MapAppFont))); m_pBeamerWIN->set_width_request(aSize.Width()); m_pBeamerWIN->set_height_request(aSize.Height()); diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx index df119fba54fc..e166f4d7d3e7 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.cxx +++ b/sw/source/ui/dbui/mmaddressblockpage.cxx @@ -67,14 +67,14 @@ SwMailMergeAddressBlockPage::SwMailMergeAddressBlockPage( SwMailMergeWizard* _pP get(m_pSettingsFI, "settingsft"); get(m_pAddressCB, "address"); get(m_pSettingsWIN, "settingspreview"); - Size aSize(LogicToPixel(Size(164 , 45), MapUnit::MapAppFont)); + Size aSize(LogicToPixel(Size(164 , 45), MapMode(MapUnit::MapAppFont))); m_pSettingsWIN->set_width_request(aSize.Width()); m_pSettingsWIN->set_height_request(aSize.Height()); get(m_pSettingsPB, "settings"); get(m_pHideEmptyParagraphsCB, "hideempty"); get(m_pAssignPB, "assign"); get(m_pPreviewWIN, "addresspreview"); - aSize = LogicToPixel(Size(176, 46), MapUnit::MapAppFont); + aSize = LogicToPixel(Size(176, 46), MapMode(MapUnit::MapAppFont)); m_pPreviewWIN->set_width_request(aSize.Width()); m_pPreviewWIN->set_height_request(aSize.Height()); get(m_pDocumentIndexFI, "documentindex"); @@ -324,7 +324,7 @@ SwSelectAddressBlockDialog::SwSelectAddressBlockDialog( , m_rConfig(rConfig) { get(m_pPreview, "preview"); - Size aSize(m_pPreview->LogicToPixel(Size(192, 100), MapUnit::MapAppFont)); + Size aSize(m_pPreview->LogicToPixel(Size(192, 100), MapMode(MapUnit::MapAppFont))); m_pPreview->set_width_request(aSize.Width()); m_pPreview->set_height_request(aSize.Height()); get(m_pNewPB, "new"); @@ -868,7 +868,7 @@ SwAssignFieldsControl::SwAssignFieldsControl(vcl::Window* pParent, WinBits nBits Size SwAssignFieldsControl::GetOptimalSize() const { - return LogicToPixel(Size(248 , 120), MapUnit::MapAppFont); + return LogicToPixel(Size(248, 120), MapMode(MapUnit::MapAppFont)); } void SwAssignFieldsControl::Init(SwMailMergeConfigItem& rConfigItem) @@ -1173,7 +1173,7 @@ SwAssignFieldsDialog::SwAssignFieldsDialog( get(m_pPreviewFI, "PREVIEW_LABEL"); get(m_pOK, "ok"); get(m_pPreviewWIN, "PREVIEW"); - Size aSize(LogicToPixel(Size(248 , 45), MapUnit::MapAppFont)); + Size aSize(LogicToPixel(Size(248, 45), MapMode(MapUnit::MapAppFont))); m_pPreviewWIN->set_width_request(aSize.Width()); m_pPreviewWIN->set_height_request(aSize.Height()); get(m_pFieldsControl, "FIELDS"); @@ -1328,7 +1328,7 @@ void AddressMultiLineEdit::dispose() Size AddressMultiLineEdit::GetOptimalSize() const { - return LogicToPixel(Size(160, 60), MapUnit::MapAppFont); + return LogicToPixel(Size(160, 60), MapMode(MapUnit::MapAppFont)); } diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx index f5cbf1cea436..24bd60320a62 100644 --- a/sw/source/ui/dbui/mmgreetingspage.cxx +++ b/sw/source/ui/dbui/mmgreetingspage.cxx @@ -429,7 +429,7 @@ SwMailBodyDialog::SwMailBodyDialog(vcl::Window* pParent) : get(m_pBodyFT, "bodyft"); get(m_pBodyMLE, "bodymle"); m_pBodyMLE->SetStyle(m_pBodyMLE->GetStyle() | WB_HSCROLL | WB_VSCROLL | WB_IGNORETAB); - Size aSize(LogicToPixel(Size(180, 50), MapUnit::MapAppFont)); + Size aSize(LogicToPixel(Size(180, 50), MapMode(MapUnit::MapAppFont))); m_pBodyMLE->set_width_request(aSize.Width()); m_pBodyMLE->set_height_request(aSize.Height()); get(m_pOK, "ok"); diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx index cf3e34411655..c37570d6d038 100644 --- a/sw/source/ui/dbui/mmlayoutpage.cxx +++ b/sw/source/ui/dbui/mmlayoutpage.cxx @@ -91,7 +91,7 @@ SwMailMergeLayoutPage::SwMailMergeLayoutPage( SwMailMergeWizard* _pParent) : get(m_pUpPB, "up"); get(m_pDownPB, "down"); get(m_pExampleContainerWIN, "example"); - Size aSize(LogicToPixel(Size(124, 159), MapUnit::MapAppFont)); + Size aSize(LogicToPixel(Size(124, 159), MapMode(MapUnit::MapAppFont))); m_pExampleContainerWIN->set_width_request(aSize.Width()); m_pExampleContainerWIN->set_height_request(aSize.Height()); get(m_pZoomLB, "zoom"); diff --git a/sw/source/ui/dbui/mmoutputtypepage.cxx b/sw/source/ui/dbui/mmoutputtypepage.cxx index 7697ea523cb4..0dd9bedcc917 100644 --- a/sw/source/ui/dbui/mmoutputtypepage.cxx +++ b/sw/source/ui/dbui/mmoutputtypepage.cxx @@ -263,7 +263,7 @@ SwSendMailDialog::SwSendMailDialog(vcl::Window *pParent, SwMailMergeConfigItem& m_nSendCount(0), m_nErrorCount(0) { - Size aSize = m_pContainer->LogicToPixel(Size(226, 80), MapUnit::MapAppFont); + Size aSize = m_pContainer->LogicToPixel(Size(226, 80), MapMode(MapUnit::MapAppFont)); m_pContainer->set_width_request(aSize.Width()); m_pContainer->set_height_request(aSize.Height()); m_pStatus = VclPtr<SvSimpleTable>::Create(*m_pContainer); diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx b/sw/source/ui/dbui/selectdbtabledialog.cxx index 235411a90ed9..e1b5909817ea 100644 --- a/sw/source/ui/dbui/selectdbtabledialog.cxx +++ b/sw/source/ui/dbui/selectdbtabledialog.cxx @@ -102,7 +102,7 @@ SwSelectDBTableDialog::SwSelectDBTableDialog(vcl::Window* pParent, get(m_pPreviewPB, "preview"); SvSimpleTableContainer *pHeaderTreeContainer = get<SvSimpleTableContainer>("table"); - Size aSize = pHeaderTreeContainer->LogicToPixel(Size(238 , 50), MapUnit::MapAppFont); + Size aSize = pHeaderTreeContainer->LogicToPixel(Size(238 , 50), MapMode(MapUnit::MapAppFont)); pHeaderTreeContainer->set_width_request(aSize.Width()); pHeaderTreeContainer->set_height_request(aSize.Height()); m_pTable = VclPtr<SwAddressTable>::Create(*pHeaderTreeContainer); diff --git a/sw/source/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx index 29eea5e17ec5..19a9b1e5d33d 100644 --- a/sw/source/ui/envelp/envlop1.cxx +++ b/sw/source/ui/envelp/envlop1.cxx @@ -54,7 +54,7 @@ SwEnvPreview::SwEnvPreview(vcl::Window* pParent, WinBits nStyle) Size SwEnvPreview::GetOptimalSize() const { - return LogicToPixel(Size(84 , 63), MapUnit::MapAppFont); + return LogicToPixel(Size(84 , 63), MapMode(MapUnit::MapAppFont)); } VCL_BUILDER_FACTORY_ARGS(SwEnvPreview, 0) diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx index 5a4bde52985e..cc8ce3437e28 100644 --- a/sw/source/ui/envelp/labfmt.cxx +++ b/sw/source/ui/envelp/labfmt.cxx @@ -109,7 +109,7 @@ SwLabPreview::SwLabPreview(vcl::Window* pParent) , m_aColsStr(SwResId(STR_COLS)) , m_aRowsStr(SwResId(STR_ROWS)) { - SetMapMode(MapUnit::MapPixel); + SetMapMode(MapMode(MapUnit::MapPixel)); // FIXME RenderContext diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 007108722ae3..fadd507f4f75 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -650,7 +650,7 @@ SwAddStylesDlg_Impl::SwAddStylesDlg_Impl(vcl::Window* pParent, get(m_pRightPB, "right"); OUString sHBFirst = get<FixedText>("notapplied")->GetText(); SvSimpleTableContainer *pHeaderTreeContainer = get<SvSimpleTableContainer>("styles"); - Size aSize = pHeaderTreeContainer->LogicToPixel(Size(273, 164), MapUnit::MapAppFont); + Size aSize = pHeaderTreeContainer->LogicToPixel(Size(273, 164), MapMode(MapUnit::MapAppFont)); pHeaderTreeContainer->set_width_request(aSize.Width()); pHeaderTreeContainer->set_height_request(aSize.Height()); m_pHeaderTree = VclPtr<SwIndexTreeLB>::Create(*pHeaderTreeContainer); diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx index a171fa3693c0..be6c855a8af3 100644 --- a/sw/source/ui/misc/glosbib.cxx +++ b/sw/source/ui/misc/glosbib.cxx @@ -56,7 +56,7 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(vcl::Window * pParent, get(m_pGroupTLB, "group"); const int nAppFontUnits = 130; - long nWidth = LogicToPixel(Size(nAppFontUnits, 0), MapUnit::MapAppFont).Width(); + long nWidth = LogicToPixel(Size(nAppFontUnits, 0), MapMode(MapUnit::MapAppFont)).Width(); m_pPathLB->set_width_request(nWidth); //just has to be something small, real size will be available space m_pGroupTLB->set_width_request(nWidth); diff --git a/sw/source/uibase/app/appenv.cxx b/sw/source/uibase/app/appenv.cxx index 9dd8145a7b0f..447205517e6e 100644 --- a/sw/source/uibase/app/appenv.cxx +++ b/sw/source/uibase/app/appenv.cxx @@ -344,7 +344,7 @@ void SwModule::InsertEnv( SfxRequest& rReq ) // Borders (are put together by Shift-Offset and alignment) Size aPaperSize = pPrt->PixelToLogic( pPrt->GetPaperSizePixel(), - MapUnit::MapTwip); + MapMode(MapUnit::MapTwip)); if ( !aPaperSize.Width() && !aPaperSize.Height() ) aPaperSize = SvxPaperInfo::GetPaperSize(PAPER_A4); if ( aPaperSize.Width() > aPaperSize.Height() ) diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index 1f206ea72bd4..f46c7767e5b8 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -831,7 +831,7 @@ int SwTransferable::PrepareForCopy( bool bIsCut ) // --> OD #i98753# // set size of embedded object at the object description structure - m_aObjDesc.maSize = OutputDevice::LogicToLogic( m_pWrtShell->GetObjSize(), MapUnit::MapTwip, MapUnit::Map100thMM ); + m_aObjDesc.maSize = OutputDevice::LogicToLogic(m_pWrtShell->GetObjSize(), MapMode(MapUnit::MapTwip), MapMode(MapUnit::Map100thMM)); // <-- PrepareOLE( m_aObjDesc ); AddFormat( SotClipboardFormatId::OBJECTDESCRIPTOR ); @@ -979,7 +979,7 @@ int SwTransferable::PrepareForCopy( bool bIsCut ) //Now adjust it. Thus in GetData the first query can still //be answered with delayed rendering. Size aSz( OLESIZE ); - m_aObjDesc.maSize = OutputDevice::LogicToLogic( aSz, MapUnit::MapTwip, MapUnit::Map100thMM ); + m_aObjDesc.maSize = OutputDevice::LogicToLogic(aSz, MapMode(MapUnit::MapTwip), MapMode(MapUnit::Map100thMM)); PrepareOLE( m_aObjDesc ); AddFormat( SotClipboardFormatId::OBJECTDESCRIPTOR ); @@ -1072,7 +1072,7 @@ int SwTransferable::CopyGlossary( SwTextBlocks& rGlossary, const OUString& rStr //Now adjust it. Thus in GetData the first query can still //be answered with delayed rendering. Size aSz( OLESIZE ); - m_aObjDesc.maSize = OutputDevice::LogicToLogic( aSz, MapUnit::MapTwip, MapUnit::Map100thMM ); + m_aObjDesc.maSize = OutputDevice::LogicToLogic(aSz, MapMode(MapUnit::MapTwip), MapMode(MapUnit::Map100thMM)); PrepareOLE( m_aObjDesc ); AddFormat( SotClipboardFormatId::OBJECTDESCRIPTOR ); @@ -1882,7 +1882,7 @@ bool SwTransferable::PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh, { aSize = aObjDesc.maSize; //always 100TH_MM MapUnit aUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( aObjDesc.mnViewAspect ) ); - aSize = OutputDevice::LogicToLogic( aSize, MapUnit::Map100thMM, aUnit ); + aSize = OutputDevice::LogicToLogic(aSize, MapMode(MapUnit::Map100thMM), MapMode(aUnit)); awt::Size aSz; try { @@ -3101,7 +3101,7 @@ void SwTransferable::SetDataForDragAndDrop( const Point& rSttPos ) //be answered with delayed rendering. m_aObjDesc.maDragStartPos = rSttPos; m_aObjDesc.maSize = OutputDevice::LogicToLogic( Size( OLESIZE ), - MapUnit::MapTwip, MapUnit::Map100thMM ); + MapMode(MapUnit::MapTwip), MapMode(MapUnit::Map100thMM)); PrepareOLE( m_aObjDesc ); AddFormat( SotClipboardFormatId::OBJECTDESCRIPTOR ); } diff --git a/sw/source/uibase/docvw/srcedtw.cxx b/sw/source/uibase/docvw/srcedtw.cxx index abbc045031ae..5d6a131bfcbb 100644 --- a/sw/source/uibase/docvw/srcedtw.cxx +++ b/sw/source/uibase/docvw/srcedtw.cxx @@ -988,7 +988,7 @@ void SwSrcEditWindow::SetFont() //font height is stored in point and set in twip aSize.Height() = officecfg::Office::Common::Font::SourceViewFont::FontHeight::get() * 20; - aFont.SetFontSize(m_pOutWin->LogicToPixel(aSize, MapUnit::MapTwip)); + aFont.SetFontSize(m_pOutWin->LogicToPixel(aSize, MapMode(MapUnit::MapTwip))); GetTextEngine()->SetFont( aFont ); m_pOutWin->SetFont(aFont); } diff --git a/sw/source/uibase/ribbar/workctrl.cxx b/sw/source/uibase/ribbar/workctrl.cxx index 71eca1387699..fe285abb58bc 100644 --- a/sw/source/uibase/ribbar/workctrl.cxx +++ b/sw/source/uibase/ribbar/workctrl.cxx @@ -458,7 +458,7 @@ SwZoomBox_Impl::SwZoomBox_Impl(vcl::Window* pParent, sal_uInt16 nSlot) , bRelease(true) { SetHelpId(HID_PVIEW_ZOOM_LB); - SetSizePixel(LogicToPixel(Size(30, 86), MapUnit::MapAppFont)); + SetSizePixel(LogicToPixel(Size(30, 86), MapMode(MapUnit::MapAppFont))); EnableAutocomplete( false ); const char* const aZoomValues[] = { RID_SVXSTR_ZOOM_25 , RID_SVXSTR_ZOOM_50 , @@ -612,7 +612,7 @@ SwJumpToSpecificBox_Impl::SwJumpToSpecificBox_Impl(vcl::Window* pParent, sal_uIn : NumericField(pParent, WB_HIDE | WB_BORDER) , nSlotId(nSlot) { - SetSizePixel(LogicToPixel(Size(16, 12), MapUnit::MapAppFont)); + SetSizePixel(LogicToPixel(Size(16, 12), MapMode(MapUnit::MapAppFont))); } void SwJumpToSpecificBox_Impl::Select() diff --git a/sw/source/uibase/shells/grfshex.cxx b/sw/source/uibase/shells/grfshex.cxx index a8f92194cbb9..1f8f9928a021 100644 --- a/sw/source/uibase/shells/grfshex.cxx +++ b/sw/source/uibase/shells/grfshex.cxx @@ -110,9 +110,9 @@ bool SwTextShell::InsertMediaDlg( SfxRequest const & rReq ) if( aPrefSize.Width() && aPrefSize.Height() ) { if( pWindow ) - aSize = pWindow->PixelToLogic( aPrefSize, MapUnit::MapTwip ); + aSize = pWindow->PixelToLogic(aPrefSize, MapMode(MapUnit::MapTwip)); else - aSize = Application::GetDefaultDevice()->PixelToLogic( aPrefSize, MapUnit::MapTwip ); + aSize = Application::GetDefaultDevice()->PixelToLogic(aPrefSize, MapMode(MapUnit::MapTwip)); } else aSize = Size( 2835, 2835 ); diff --git a/sw/source/uibase/table/chartins.cxx b/sw/source/uibase/table/chartins.cxx index bc778aa90eea..283449964c5f 100644 --- a/sw/source/uibase/table/chartins.cxx +++ b/sw/source/uibase/table/chartins.cxx @@ -70,7 +70,7 @@ Point SwGetChartDialogPos( const vcl::Window *pParentWin, const Size& rDialogSiz pParentWin->OutputToAbsoluteScreenPixel( aObjPixel.BottomRight() ) ); tools::Rectangle aDesktop = pParentWin->GetDesktopRectPixel(); - Size aSpace = pParentWin->LogicToPixel( Size( 8, 12 ), MapUnit::MapAppFont ); + Size aSpace = pParentWin->LogicToPixel(Size(8, 12), MapMode(MapUnit::MapAppFont)); bool bLayoutRTL = ::GetActiveView()->GetWrtShell().IsTableRightToLeft(); bool bCenterHor = false; diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx index 7988493a7579..0c0a78b628bd 100644 --- a/sw/source/uibase/uiview/srcview.cxx +++ b/sw/source/uibase/uiview/srcview.cxx @@ -683,10 +683,10 @@ sal_Int32 SwSrcView::PrintSource( pOutDev->Push(); TextEngine* pTextEngine = aEditWin->GetTextEngine(); - pOutDev->SetMapMode( MapUnit::Map100thMM ); + pOutDev->SetMapMode(MapMode(MapUnit::Map100thMM)); vcl::Font aFont( aEditWin->GetOutWin()->GetFont() ); Size aSize( aFont.GetFontSize() ); - aSize = aEditWin->GetOutWin()->PixelToLogic( aSize, MapUnit::Map100thMM ); + aSize = aEditWin->GetOutWin()->PixelToLogic(aSize, MapMode(MapUnit::Map100thMM)); aFont.SetFontSize( aSize ); aFont.SetColor( COL_BLACK ); pOutDev->SetFont( aFont ); diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx index a85c8ffc2cc0..04cc5e8d57f2 100644 --- a/sw/source/uibase/uiview/viewdraw.cxx +++ b/sw/source/uibase/uiview/viewdraw.cxx @@ -176,9 +176,9 @@ void SwView::ExecDraw(SfxRequest& rReq) if( aPrefSize.Width() && aPrefSize.Height() ) { if( pWin ) - aSize = pWin->PixelToLogic( aPrefSize, MapUnit::MapTwip ); + aSize = pWin->PixelToLogic(aPrefSize, MapMode(MapUnit::MapTwip)); else - aSize = Application::GetDefaultDevice()->PixelToLogic( aPrefSize, MapUnit::MapTwip ); + aSize = Application::GetDefaultDevice()->PixelToLogic(aPrefSize, MapMode(MapUnit::MapTwip)); } else aSize = Size( 2835, 2835 ); diff --git a/sw/source/uibase/uiview/viewport.cxx b/sw/source/uibase/uiview/viewport.cxx index eb3bcbdd8ae3..cdad0962be46 100644 --- a/sw/source/uibase/uiview/viewport.cxx +++ b/sw/source/uibase/uiview/viewport.cxx @@ -953,7 +953,7 @@ void SwView::InnerResizePixel( const Point &rOfst, const Size &rSize, bool ) Size aSize( rSize ); aSize.Width() -= (aBorder.Left() + aBorder.Right()); aSize.Height() -= (aBorder.Top() + aBorder.Bottom()); - Size aObjSizePixel = GetWindow()->LogicToPixel( aObjSize, MapUnit::MapTwip ); + Size aObjSizePixel = GetWindow()->LogicToPixel(aObjSize, MapMode(MapUnit::MapTwip)); SfxViewShell::SetZoomFactor( Fraction( aSize.Width(), aObjSizePixel.Width() ), Fraction( aSize.Height(), aObjSizePixel.Height() ) ); } diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 4c932466493b..d690701a176f 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -897,7 +897,7 @@ void SwContentTree::dispose() Size SwContentTree::GetOptimalSize() const { - return LogicToPixel(Size(110, 112), MapUnit::MapAppFont); + return LogicToPixel(Size(110, 112), MapMode(MapUnit::MapAppFont)); } OUString SwContentTree::GetEntryAltText( SvTreeListEntry* pEntry ) const diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx index 34f7ce07f756..17b29d4f1945 100644 --- a/sw/source/uibase/utlui/glbltree.cxx +++ b/sw/source/uibase/utlui/glbltree.cxx @@ -216,7 +216,7 @@ void SwGlobalTree::dispose() Size SwGlobalTree::GetOptimalSize() const { - return LogicToPixel(Size(110, 112), MapUnit::MapAppFont); + return LogicToPixel(Size(110, 112), MapMode(MapUnit::MapAppFont)); } sal_Int8 SwGlobalTree::ExecuteDrop( const ExecuteDropEvent& rEvt ) diff --git a/sw/source/uibase/utlui/shdwcrsr.cxx b/sw/source/uibase/utlui/shdwcrsr.cxx index 40c6931482fd..8180141cafbb 100644 --- a/sw/source/uibase/utlui/shdwcrsr.cxx +++ b/sw/source/uibase/utlui/shdwcrsr.cxx @@ -73,7 +73,7 @@ void SwShadowCursor::DrawCursor( const Point& rPt, long nHeight, sal_uInt16 nMod pWin->Push(); - pWin->SetMapMode( MapUnit::MapPixel ); + pWin->SetMapMode(MapMode(MapUnit::MapPixel)); pWin->SetRasterOp( RasterOp::Xor ); pWin->SetLineColor( Color( aCol.GetColor() ^ COL_WHITE ) ); diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index 898cbf57ab7d..ac5debe9ec49 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx @@ -647,7 +647,7 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj, MapUnit aUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( nAspect ) ); // TODO/LATER: needs complete VisArea?! - Size aSize( OutputDevice::LogicToLogic( aRect.SVRect(), MapUnit::MapTwip, aUnit ).GetSize() ); + Size aSize( OutputDevice::LogicToLogic(aRect.SVRect(), MapMode(MapUnit::MapTwip), MapMode(aUnit)).GetSize() ); awt::Size aSz; aSz.Width = aSize.Width(); aSz.Height = aSize.Height(); @@ -752,7 +752,7 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj, { const MapMode aTmp( MapUnit::MapTwip ); MapUnit aUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( nAspect ) ); - _aVisArea = OutputDevice::LogicToLogic( _aVisArea, aUnit, aTmp); + _aVisArea = OutputDevice::LogicToLogic(_aVisArea, MapMode(aUnit), aTmp); Size aObjArea; if ( pFlyPrtRect ) aObjArea = pFlyPrtRect->SSize(); |