[Libreoffice-commits] core.git: 2 commits - dbaccess/source desktop/qa desktop/source sw/qa
Xisco Fauli (via logerrit)
logerrit at kemper.freedesktop.org
Thu Oct 22 06:08:15 UTC 2020
dbaccess/source/ui/app/AppDetailPageHelper.cxx | 4
dbaccess/source/ui/app/AppIconControl.cxx | 2
dbaccess/source/ui/app/AppIconControl.hxx | 4
dbaccess/source/ui/app/DocumentInfoPreview.cxx | 4
dbaccess/source/ui/app/DocumentInfoPreview.hxx | 4
dbaccess/source/ui/browser/brwview.cxx | 2
dbaccess/source/ui/browser/sbagrid.cxx | 18 +--
dbaccess/source/ui/browser/unodatbr.cxx | 4
dbaccess/source/ui/control/ColumnControlWindow.cxx | 2
dbaccess/source/ui/control/RelationControl.cxx | 24 ++--
dbaccess/source/ui/control/TableGrantCtrl.cxx | 10 -
dbaccess/source/ui/dlg/indexfieldscontrol.cxx | 12 +-
dbaccess/source/ui/inc/ColumnControlWindow.hxx | 2
dbaccess/source/ui/inc/FieldDescControl.hxx | 2
dbaccess/source/ui/inc/JoinController.hxx | 4
dbaccess/source/ui/inc/JoinTableView.hxx | 2
dbaccess/source/ui/inc/TableDesignControl.hxx | 22 ++--
dbaccess/source/ui/inc/TableGrantCtrl.hxx | 10 -
dbaccess/source/ui/inc/TableRow.hxx | 3
dbaccess/source/ui/inc/WTypeSelect.hxx | 2
dbaccess/source/ui/inc/indexfieldscontrol.hxx | 12 +-
dbaccess/source/ui/inc/sbagrid.hxx | 4
dbaccess/source/ui/misc/WTypeSelect.cxx | 2
dbaccess/source/ui/querydesign/ConnectionLine.cxx | 18 +--
dbaccess/source/ui/querydesign/JoinController.cxx | 4
dbaccess/source/ui/querydesign/JoinTableView.cxx | 28 ++---
dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.hxx | 4
dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx | 2
dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx | 64 +++++------
dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx | 20 +--
dbaccess/source/ui/querydesign/TableWindow.cxx | 10 -
dbaccess/source/ui/querydesign/querycontainerwindow.cxx | 2
dbaccess/source/ui/relationdesign/RTableConnection.cxx | 4
dbaccess/source/ui/tabledesign/TEditControl.cxx | 70 ++++++-------
dbaccess/source/ui/tabledesign/TEditControl.hxx | 40 +++----
dbaccess/source/ui/tabledesign/TableDesignControl.cxx | 8 -
dbaccess/source/ui/tabledesign/TableFieldControl.cxx | 2
dbaccess/source/ui/tabledesign/TableFieldControl.hxx | 2
dbaccess/source/ui/tabledesign/TableRow.cxx | 2
dbaccess/source/ui/tabledesign/TableUndo.cxx | 28 ++---
dbaccess/source/ui/tabledesign/TableUndo.hxx | 18 +--
desktop/qa/desktop_lib/test_desktop_lib.cxx | 18 +--
desktop/source/app/cmdlineargs.cxx | 2
desktop/source/deployment/gui/dp_gui_dialog2.cxx | 22 ++--
desktop/source/deployment/gui/dp_gui_dialog2.hxx | 10 -
desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx | 2
desktop/source/deployment/gui/dp_gui_extlistbox.cxx | 70 ++++++-------
desktop/source/deployment/gui/dp_gui_extlistbox.hxx | 24 ++--
desktop/source/lib/init.cxx | 46 ++++----
desktop/source/splash/splash.cxx | 12 +-
sw/qa/extras/ooxmlexport/data/tdf133771.odt |binary
sw/qa/extras/ooxmlexport/ooxmlexport14.cxx | 22 ++++
52 files changed, 366 insertions(+), 343 deletions(-)
New commits:
commit f308520f1e3624c88e2a0e99be2eb26e2f2d0fc4
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Wed Oct 21 17:29:01 2020 +0200
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Thu Oct 22 08:07:35 2020 +0200
tdf#133771: sw_ooxmlexport14: Add unittest
Change-Id: Ie2b6ad6dd0b537d59ccd5edb5d699a2b3bbd82ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104636
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
diff --git a/sw/qa/extras/ooxmlexport/data/tdf133771.odt b/sw/qa/extras/ooxmlexport/data/tdf133771.odt
new file mode 100644
index 000000000000..fd54160af9d1
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf133771.odt differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
index 224a79eb3c32..3ac228db6cca 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
@@ -736,6 +736,28 @@ CPPUNIT_TEST_FIXTURE(SwModelTestBase, testTableStyleConfNested)
assertXPath(pXmlDoc, "//w:body/w:tbl/w:tr/w:tc[2]/w:tcPr/w:tcBorders/w:top", "val", "nil");
}
+CPPUNIT_TEST_FIXTURE(SwModelTestBase, testTdf133771)
+{
+ // Create the doc model.
+ OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "tdf133771.odt";
+ loadURL(aURL, nullptr, /*pPassword*/ "test");
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Password Protected"), getParagraph(1)->getString());
+
+ // Without the fix in place, this test would have failed with
+ // "An uncaught exception of type com.sun.star.io.IOException"
+ // exporting to docx
+ uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
+ utl::MediaDescriptor aMediaDescriptor;
+ aMediaDescriptor["FilterName"] <<= OUString("Office Open XML Text");
+ xStorable->storeToURL(maTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList());
+ validate(maTempFile.GetFileName(), test::OOXML);
+ mbExported = true;
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+ assertXPathContent(pXmlDoc, "//w:body/w:p/w:r/w:t", "Password Protected");
+}
+
CPPUNIT_TEST_FIXTURE(SwModelTestBase, testZeroLineSpacing)
{
// Create the doc model.
commit 0e66c58a8e20b997097d8b8644e774701c2d68b6
Author: Noel <noelgrandin at gmail.com>
AuthorDate: Wed Oct 21 15:25:56 2020 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Oct 22 08:07:23 2020 +0200
long->tools::Long in dbaccess..drawinglayer
Change-Id: I15760da167e7d0b4c410acccd1c8c90210e28b2b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104623
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
index aef0eaba350f..d65d5bcbc7a3 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
@@ -1189,13 +1189,13 @@ bool OPreviewWindow::ImplGetGraphicCenterRect(const vcl::RenderContext& rRenderC
if ( fGrfWH < fWinWH )
{
- aNewSize.setWidth( static_cast<long>( aWinSize.Height() * fGrfWH ) );
+ aNewSize.setWidth( static_cast<tools::Long>( aWinSize.Height() * fGrfWH ) );
aNewSize.setHeight( aWinSize.Height() );
}
else
{
aNewSize.setWidth( aWinSize.Width() );
- aNewSize.setHeight( static_cast<long>( aWinSize.Width() / fGrfWH) );
+ aNewSize.setHeight( static_cast<tools::Long>( aWinSize.Width() / fGrfWH) );
}
const Point aNewPos( ( aWinSize.Width() - aNewSize.Width() ) >> 1,
diff --git a/dbaccess/source/ui/app/AppIconControl.cxx b/dbaccess/source/ui/app/AppIconControl.cxx
index ba9c4a0e6ef5..29a1c35a8d84 100644
--- a/dbaccess/source/ui/app/AppIconControl.cxx
+++ b/dbaccess/source/ui/app/AppIconControl.cxx
@@ -218,7 +218,7 @@ tools::Rectangle OApplicationIconControl::GetFocusRect()
if (HasFocus())
{
// Get the last selected item in the list
- for (long i = mFilteredItemList.size() - 1; i >= 0; --i)
+ for (tools::Long i = mFilteredItemList.size() - 1; i >= 0; --i)
{
ThumbnailViewItem* pItem = mFilteredItemList[i];
if (pItem->isSelected())
diff --git a/dbaccess/source/ui/app/AppIconControl.hxx b/dbaccess/source/ui/app/AppIconControl.hxx
index 9e7bf9ee42b0..7ca11cef2659 100644
--- a/dbaccess/source/ui/app/AppIconControl.hxx
+++ b/dbaccess/source/ui/app/AppIconControl.hxx
@@ -38,8 +38,8 @@ namespace dbaui
std::unique_ptr<OApplicationIconControlDropTarget> m_xDropTarget;
IControlActionListener* m_pActionListener;
- long m_nMaxWidth;
- long m_nMaxHeight;
+ tools::Long m_nMaxWidth;
+ tools::Long m_nMaxHeight;
bool IsMnemonicChar(sal_Unicode cChar, ElementType& rType) const;
diff --git a/dbaccess/source/ui/app/DocumentInfoPreview.cxx b/dbaccess/source/ui/app/DocumentInfoPreview.cxx
index 450e6fba51a3..d112c7fb0427 100644
--- a/dbaccess/source/ui/app/DocumentInfoPreview.cxx
+++ b/dbaccess/source/ui/app/DocumentInfoPreview.cxx
@@ -136,7 +136,7 @@ void ODocumentInfoPreview::insertEntry(
m_xEditEngine->QuickInsertText(value, InsertAtEnd(*m_xEditEngine));
}
-void ODocumentInfoPreview::insertNonempty(long id, OUString const & value)
+void ODocumentInfoPreview::insertNonempty(tools::Long id, OUString const & value)
{
if (!value.isEmpty()) {
insertEntry(SvtDocInfoTable_Impl::GetString(id), value);
@@ -144,7 +144,7 @@ void ODocumentInfoPreview::insertNonempty(long id, OUString const & value)
}
void ODocumentInfoPreview::insertDateTime(
- long id, css::util::DateTime const & value)
+ tools::Long id, css::util::DateTime const & value)
{
DateTime aToolsDT(
Date(value.Day, value.Month, value.Year),
diff --git a/dbaccess/source/ui/app/DocumentInfoPreview.hxx b/dbaccess/source/ui/app/DocumentInfoPreview.hxx
index 44fbbba1d3de..9fb69af4d0f3 100644
--- a/dbaccess/source/ui/app/DocumentInfoPreview.hxx
+++ b/dbaccess/source/ui/app/DocumentInfoPreview.hxx
@@ -46,9 +46,9 @@ public:
private:
void insertEntry(OUString const & title, OUString const & value);
- void insertNonempty(long id, OUString const & value);
+ void insertNonempty(tools::Long id, OUString const & value);
- void insertDateTime(long id, css::util::DateTime const & value);
+ void insertDateTime(tools::Long id, css::util::DateTime const & value);
};
}
diff --git a/dbaccess/source/ui/browser/brwview.cxx b/dbaccess/source/ui/browser/brwview.cxx
index de1f9220100f..258c3966cee9 100644
--- a/dbaccess/source/ui/browser/brwview.cxx
+++ b/dbaccess/source/ui/browser/brwview.cxx
@@ -140,7 +140,7 @@ void UnoDataBrowserView::dispose()
IMPL_LINK_NOARG( UnoDataBrowserView, SplitHdl, Splitter*, void )
{
- long nYPos = m_pSplitter->GetPosPixel().Y();
+ tools::Long nYPos = m_pSplitter->GetPosPixel().Y();
m_pSplitter->SetPosPixel( Point( m_pSplitter->GetSplitPosPixel(), nYPos ) );
Resize();
}
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index 5d86042a92c6..5e986fbb38e6 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -658,7 +658,7 @@ VclPtr<BrowserHeader> SbaGridControl::imp_CreateHeaderBar(BrowseBox* pParent)
return VclPtr<SbaGridHeader>::Create(pParent);
}
-CellController* SbaGridControl::GetController(long nRow, sal_uInt16 nCol)
+CellController* SbaGridControl::GetController(tools::Long nRow, sal_uInt16 nCol)
{
if ( m_bActivatingForDrop )
return nullptr;
@@ -850,7 +850,7 @@ void SbaGridControl::Select()
m_pMasterListener->SelectionChanged();
}
-void SbaGridControl::ActivateCell(long nRow, sal_uInt16 nCol, bool bSetCellFocus /*= sal_True*/ )
+void SbaGridControl::ActivateCell(tools::Long nRow, sal_uInt16 nCol, bool bSetCellFocus /*= sal_True*/ )
{
FmGridControl::ActivateCell(nRow, nCol, bSetCellFocus);
if (m_pMasterListener)
@@ -937,7 +937,7 @@ bool SbaGridControl::IsReadOnlyDB() const
void SbaGridControl::MouseButtonDown( const BrowserMouseEvent& rMEvt)
{
- long nRow = GetRowAtYPosPixel(rMEvt.GetPosPixel().Y());
+ tools::Long nRow = GetRowAtYPosPixel(rMEvt.GetPosPixel().Y());
sal_uInt16 nColPos = GetColumnAtXPosPixel(rMEvt.GetPosPixel().X());
sal_uInt16 nViewPos = (nColPos == BROWSER_INVALIDID) ? sal_uInt16(-1) : nColPos-1;
// 'the handle column' and 'no valid column' will both result in a view position of -1 !
@@ -963,7 +963,7 @@ void SbaGridControl::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel )
// (Yes, this is controller (not view) functionality. But collecting and evaluating all the
// information necessary via UNO would be quite difficult (if not impossible) so
// my laziness says 'do it here'...)
- long nRow = GetRowAtYPosPixel(_rPosPixel.Y());
+ tools::Long nRow = GetRowAtYPosPixel(_rPosPixel.Y());
sal_uInt16 nColPos = GetColumnAtXPosPixel(_rPosPixel.X());
sal_uInt16 nViewPos = (nColPos == BROWSER_INVALIDID) ? sal_uInt16(-1) : nColPos-1;
// 'the handle column' and 'no valid column' will both result in a view position of -1 !
@@ -972,7 +972,7 @@ void SbaGridControl::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel )
// the current row doesn't really exist: the user's appending a new one and already has entered some data,
// so the row contains data which has no counter part within the data source
- long nCorrectRowCount = GetRowCount();
+ tools::Long nCorrectRowCount = GetRowCount();
if (GetOptions() & DbGridControlOptions::Insert)
--nCorrectRowCount; // there is an empty row for inserting records
if (bCurrentRowVirtual)
@@ -1182,10 +1182,10 @@ sal_Int8 SbaGridControl::AcceptDrop( const BrowserAcceptDropEvent& rEvt )
// without an empty row we're not in update mode
break;
- const long nRow = GetRowAtYPosPixel(rEvt.maPosPixel.Y(), false);
+ const tools::Long nRow = GetRowAtYPosPixel(rEvt.maPosPixel.Y(), false);
const sal_uInt16 nCol = GetColumnId(GetColumnAtXPosPixel(rEvt.maPosPixel.X()));
- long nCorrectRowCount = GetRowCount();
+ tools::Long nCorrectRowCount = GetRowCount();
if (GetOptions() & DbGridControlOptions::Insert)
--nCorrectRowCount; // there is an empty row for inserting records
if (IsCurrentAppending())
@@ -1275,10 +1275,10 @@ sal_Int8 SbaGridControl::ExecuteDrop( const BrowserExecuteDropEvent& rEvt )
if ( IsDropFormatSupported( SotClipboardFormatId::STRING ) )
{
- long nRow = GetRowAtYPosPixel(rEvt.maPosPixel.Y(), false);
+ tools::Long nRow = GetRowAtYPosPixel(rEvt.maPosPixel.Y(), false);
sal_uInt16 nCol = GetColumnAtXPosPixel(rEvt.maPosPixel.X());
- long nCorrectRowCount = GetRowCount();
+ tools::Long nCorrectRowCount = GetRowCount();
if (GetOptions() & DbGridControlOptions::Insert)
--nCorrectRowCount; // there is an empty row for inserting records
if (IsCurrentAppending())
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 2a6cbf9136b5..aa465eff620a 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -290,7 +290,7 @@ bool SbaTableQueryBrowser::Construct(vcl::Window* pParent)
{
// create controls and set sizes
- const long nFrameWidth = getBrowserView()->LogicToPixel(::Size(3, 0), MapMode(MapUnit::MapAppFont)).Width();
+ const tools::Long nFrameWidth = getBrowserView()->LogicToPixel(::Size(3, 0), MapMode(MapUnit::MapAppFont)).Width();
m_pSplitter = VclPtr<Splitter>::Create(getBrowserView(),WB_HSCROLL);
m_pSplitter->SetPosSizePixel( ::Point(0,0), ::Size(nFrameWidth,0) );
@@ -1915,7 +1915,7 @@ void SbaTableQueryBrowser::Execute(sal_uInt16 nId, const Sequence< PropertyValue
if (pSelection != nullptr)
{
aSelection.realloc(pSelection->GetSelectCount());
- long nIdx = pSelection->FirstSelected();
+ tools::Long nIdx = pSelection->FirstSelected();
Any* pSelectionNos = aSelection.getArray();
while (nIdx != SFX_ENDOFSELECTION)
{
diff --git a/dbaccess/source/ui/control/ColumnControlWindow.cxx b/dbaccess/source/ui/control/ColumnControlWindow.cxx
index 9b2fa25aa8d9..3665b295d9a3 100644
--- a/dbaccess/source/ui/control/ColumnControlWindow.cxx
+++ b/dbaccess/source/ui/control/ColumnControlWindow.cxx
@@ -89,7 +89,7 @@ void OColumnControlWindow::DeactivateAggregate( EControlType eType )
}
}
-void OColumnControlWindow::CellModified(long /*nRow*/, sal_uInt16 /*nColId*/ )
+void OColumnControlWindow::CellModified(tools::Long /*nRow*/, sal_uInt16 /*nColId*/ )
{
saveCurrentFieldDescData();
}
diff --git a/dbaccess/source/ui/control/RelationControl.cxx b/dbaccess/source/ui/control/RelationControl.cxx
index 69f0a00cae2d..1eae87b0ea65 100644
--- a/dbaccess/source/ui/control/RelationControl.cxx
+++ b/dbaccess/source/ui/control/RelationControl.cxx
@@ -59,7 +59,7 @@ namespace dbaui
VclPtr< ::svt::ListBoxControl> m_pListCell;
TTableConnectionData::value_type m_pConnData;
OTableListBoxControl* m_pBoxControl;
- long m_nDataPos;
+ tools::Long m_nDataPos;
Reference< XPropertySet> m_xSourceDef;
Reference< XPropertySet> m_xDestDef;
enum opcode { DELETE, INSERT, MODIFY };
@@ -108,12 +108,12 @@ namespace dbaui
void Init(const TTableConnectionData::value_type& _pConnData);
using ORelationControl_Base::Init;
- virtual void InitController( ::svt::CellControllerRef& rController, long nRow, sal_uInt16 nCol ) override;
- virtual ::svt::CellController* GetController( long nRow, sal_uInt16 nCol ) override;
+ virtual void InitController( ::svt::CellControllerRef& rController, tools::Long nRow, sal_uInt16 nCol ) override;
+ virtual ::svt::CellController* GetController( tools::Long nRow, sal_uInt16 nCol ) override;
virtual void PaintCell( OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColId ) const override;
- virtual bool SeekRow( long nRow ) override;
+ virtual bool SeekRow( tools::Long nRow ) override;
virtual bool SaveModified() override;
- virtual OUString GetCellText( long nRow, sal_uInt16 nColId ) const override;
+ virtual OUString GetCellText( tools::Long nRow, sal_uInt16 nColId ) const override;
virtual void CellModified() override;
@@ -177,7 +177,7 @@ namespace dbaui
void ORelationControl::Resize()
{
EditBrowseBox::Resize();
- long nOutputWidth = GetOutputSizePixel().Width() - 1;
+ tools::Long nOutputWidth = GetOutputSizePixel().Width() - 1;
SetColumnWidth(1, (nOutputWidth / 2));
SetColumnWidth(2, (nOutputWidth / 2));
}
@@ -204,7 +204,7 @@ namespace dbaui
bool ORelationControl::IsTabAllowed(bool bForward) const
{
- long nRow = GetCurRow();
+ tools::Long nRow = GetCurRow();
sal_uInt16 nCol = GetCurColumnId();
bool bRet = !( ( bForward && (nCol == DEST_COLUMN) && (nRow == GetRowCount() - 1))
@@ -215,7 +215,7 @@ namespace dbaui
bool ORelationControl::SaveModified()
{
- long nRow = GetCurRow();
+ tools::Long nRow = GetCurRow();
if ( nRow != BROWSER_ENDOFSELECTION )
{
weld::ComboBox& rListBox = m_pListCell->get_widget();
@@ -263,7 +263,7 @@ namespace dbaui
return nId;
}
- OUString ORelationControl::GetCellText( long nRow, sal_uInt16 nColId ) const
+ OUString ORelationControl::GetCellText( tools::Long nRow, sal_uInt16 nColId ) const
{
OUString sText;
if ( m_pConnData->GetConnLineDataList().size() > o3tl::make_unsigned(nRow) )
@@ -282,7 +282,7 @@ namespace dbaui
return sText;
}
- void ORelationControl::InitController( CellControllerRef& /*rController*/, long nRow, sal_uInt16 nColumnId )
+ void ORelationControl::InitController( CellControllerRef& /*rController*/, tools::Long nRow, sal_uInt16 nColumnId )
{
OString sHelpId( HID_RELATIONDIALOG_LEFTFIELDCELL );
@@ -319,12 +319,12 @@ namespace dbaui
rList.set_help_id(sHelpId);
}
- CellController* ORelationControl::GetController( long /*nRow*/, sal_uInt16 /*nColumnId*/ )
+ CellController* ORelationControl::GetController( tools::Long /*nRow*/, sal_uInt16 /*nColumnId*/ )
{
return new ListBoxCellController( m_pListCell.get() );
}
- bool ORelationControl::SeekRow( long nRow )
+ bool ORelationControl::SeekRow( tools::Long nRow )
{
m_nDataPos = nRow;
return true;
diff --git a/dbaccess/source/ui/control/TableGrantCtrl.cxx b/dbaccess/source/ui/control/TableGrantCtrl.cxx
index 6aba975d6b8a..1225a7f74c1a 100644
--- a/dbaccess/source/ui/control/TableGrantCtrl.cxx
+++ b/dbaccess/source/ui/control/TableGrantCtrl.cxx
@@ -181,7 +181,7 @@ IMPL_LINK_NOARG(OTableGrantControl, AsynchDeactivate, void*, void)
bool OTableGrantControl::IsTabAllowed(bool bForward) const
{
- long nRow = GetCurRow();
+ tools::Long nRow = GetCurRow();
sal_uInt16 nCol = GetCurColumnId();
if (bForward && (nCol == 2) && (nRow == GetRowCount() - 1))
@@ -257,7 +257,7 @@ bool OTableGrantControl::SaveModified()
return bErg;
}
-OUString OTableGrantControl::GetCellText( long nRow, sal_uInt16 nColId ) const
+OUString OTableGrantControl::GetCellText( tools::Long nRow, sal_uInt16 nColId ) const
{
if(COL_TABLE_NAME == nColId)
return m_aTableNames[nRow];
@@ -270,7 +270,7 @@ OUString OTableGrantControl::GetCellText( long nRow, sal_uInt16 nColId ) const
return OUString::number(isAllowed(nColId,nPriv) ? 1 :0);
}
-void OTableGrantControl::InitController( CellControllerRef& /*rController*/, long nRow, sal_uInt16 nColumnId )
+void OTableGrantControl::InitController( CellControllerRef& /*rController*/, tools::Long nRow, sal_uInt16 nColumnId )
{
OUString sTablename = m_aTableNames[nRow];
// special case for tablename
@@ -357,7 +357,7 @@ void OTableGrantControl::setGrantUser(const Reference< XAuthorizable>& _xGrantUs
m_xGrantUser = _xGrantUser;
}
-CellController* OTableGrantControl::GetController( long nRow, sal_uInt16 nColumnId )
+CellController* OTableGrantControl::GetController( tools::Long nRow, sal_uInt16 nColumnId )
{
CellController* pController = nullptr;
@@ -384,7 +384,7 @@ CellController* OTableGrantControl::GetController( long nRow, sal_uInt16 nColumn
return pController;
}
-bool OTableGrantControl::SeekRow( long nRow )
+bool OTableGrantControl::SeekRow( tools::Long nRow )
{
m_nDataPos = nRow;
diff --git a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
index dd959a05dda8..2f378460c924 100644
--- a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
+++ b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
@@ -89,7 +89,7 @@ constexpr auto BROWSER_STANDARD_FLAGS = BrowserMode::COLUMNSELECTION | BrowserMo
::svt::EditBrowseBox::dispose();
}
- bool IndexFieldsControl::SeekRow(long nRow)
+ bool IndexFieldsControl::SeekRow(tools::Long nRow)
{
if (!EditBrowseBox::SeekRow(nRow))
return false;
@@ -165,7 +165,7 @@ constexpr auto BROWSER_STANDARD_FLAGS = BrowserMode::COLUMNSELECTION | BrowserMo
_rFields.resize(aDest - _rFields.begin());
}
- sal_uInt32 IndexFieldsControl::GetTotalCellWidth(long _nRow, sal_uInt16 _nColId)
+ sal_uInt32 IndexFieldsControl::GetTotalCellWidth(tools::Long _nRow, sal_uInt16 _nColId)
{
if (COLUMN_ID_ORDER == _nColId)
{
@@ -233,7 +233,7 @@ constexpr auto BROWSER_STANDARD_FLAGS = BrowserMode::COLUMNSELECTION | BrowserMo
rNameListBox.append_text(*pFields);
}
- CellController* IndexFieldsControl::GetController(long _nRow, sal_uInt16 _nColumnId)
+ CellController* IndexFieldsControl::GetController(tools::Long _nRow, sal_uInt16 _nColumnId)
{
if (!IsEnabled())
return nullptr;
@@ -263,7 +263,7 @@ constexpr auto BROWSER_STANDARD_FLAGS = BrowserMode::COLUMNSELECTION | BrowserMo
return pReturn;
}
- bool IndexFieldsControl::implGetFieldDesc(long _nRow, IndexFields::const_iterator& _rPos)
+ bool IndexFieldsControl::implGetFieldDesc(tools::Long _nRow, IndexFields::const_iterator& _rPos)
{
_rPos = m_aFields.end();
if ((_nRow < 0) || (_nRow >= static_cast<sal_Int32>(m_aFields.size())))
@@ -343,7 +343,7 @@ constexpr auto BROWSER_STANDARD_FLAGS = BrowserMode::COLUMNSELECTION | BrowserMo
return true;
}
- void IndexFieldsControl::InitController(CellControllerRef& /*_rController*/, long _nRow, sal_uInt16 _nColumnId)
+ void IndexFieldsControl::InitController(CellControllerRef& /*_rController*/, tools::Long _nRow, sal_uInt16 _nColumnId)
{
IndexFields::const_iterator aFieldDescription;
bool bNewField = !implGetFieldDesc(_nRow, aFieldDescription);
@@ -407,7 +407,7 @@ constexpr auto BROWSER_STANDARD_FLAGS = BrowserMode::COLUMNSELECTION | BrowserMo
SaveModified();
}
- OUString IndexFieldsControl::GetCellText(long _nRow,sal_uInt16 nColId) const
+ OUString IndexFieldsControl::GetCellText(tools::Long _nRow,sal_uInt16 nColId) const
{
IndexFields::const_iterator aRow = m_aFields.end();
if ( _nRow >= 0 )
diff --git a/dbaccess/source/ui/inc/ColumnControlWindow.hxx b/dbaccess/source/ui/inc/ColumnControlWindow.hxx
index e896b3dda808..0f0c38d9b6d2 100644
--- a/dbaccess/source/ui/inc/ColumnControlWindow.hxx
+++ b/dbaccess/source/ui/inc/ColumnControlWindow.hxx
@@ -50,7 +50,7 @@ namespace dbaui
virtual TOTypeInfoSP getTypeInfo(sal_Int32 _nPos) override;
virtual bool isAutoIncrementValueEnabled() const override;
virtual OUString getAutoIncrementValue() const override;
- virtual void CellModified(long nRow, sal_uInt16 nColId ) override;
+ virtual void CellModified(tools::Long nRow, sal_uInt16 nColId ) override;
public:
OColumnControlWindow(weld::Container* pParent,
diff --git a/dbaccess/source/ui/inc/FieldDescControl.hxx b/dbaccess/source/ui/inc/FieldDescControl.hxx
index 2eceba60ad2a..cf8bec1c7eb2 100644
--- a/dbaccess/source/ui/inc/FieldDescControl.hxx
+++ b/dbaccess/source/ui/inc/FieldDescControl.hxx
@@ -136,7 +136,7 @@ namespace dbaui
virtual css::lang::Locale GetLocale() const = 0;
- virtual void CellModified(long nRow, sal_uInt16 nColId ) = 0;
+ virtual void CellModified(tools::Long nRow, sal_uInt16 nColId ) = 0;
virtual void SetModified(bool bModified); // base implementation is empty
virtual TOTypeInfoSP getTypeInfo(sal_Int32 _nPos) = 0;
diff --git a/dbaccess/source/ui/inc/JoinController.hxx b/dbaccess/source/ui/inc/JoinController.hxx
index 30743ba2fc4c..9410823222e4 100644
--- a/dbaccess/source/ui/inc/JoinController.hxx
+++ b/dbaccess/source/ui/inc/JoinController.hxx
@@ -105,9 +105,9 @@ namespace dbaui
*/
void removeConnectionData(const TTableConnectionData::value_type& _pData);
- void SaveTabWinsPosSize( OJoinTableView::OTableWindowMap* pTabWinList, long nOffsetX, long nOffsetY );
+ void SaveTabWinsPosSize( OJoinTableView::OTableWindowMap* pTabWinList, tools::Long nOffsetX, tools::Long nOffsetY );
- static void SaveTabWinPosSize(OTableWindow const * pTabWin, long nOffsetX, long nOffsetY);
+ static void SaveTabWinPosSize(OTableWindow const * pTabWin, tools::Long nOffsetX, tools::Long nOffsetY);
// UNO interface overridables
// XEventListener
diff --git a/dbaccess/source/ui/inc/JoinTableView.hxx b/dbaccess/source/ui/inc/JoinTableView.hxx
index 75b6fdca7c40..5c7c6e91fcf1 100644
--- a/dbaccess/source/ui/inc/JoinTableView.hxx
+++ b/dbaccess/source/ui/inc/JoinTableView.hxx
@@ -162,7 +162,7 @@ namespace dbaui
*/
void addConnection(OTableConnection* _pConnection,bool _bAddData = true);
- bool ScrollPane( long nDelta, bool bHoriz, bool bPaintScrollBars );
+ bool ScrollPane( tools::Long nDelta, bool bHoriz, bool bPaintScrollBars );
sal_uLong GetTabWinCount() const;
const Point& GetScrollOffset() const { return m_aScrollOffset; }
diff --git a/dbaccess/source/ui/inc/TableDesignControl.hxx b/dbaccess/source/ui/inc/TableDesignControl.hxx
index cb7bf92dc788..7cfcfdc23dac 100644
--- a/dbaccess/source/ui/inc/TableDesignControl.hxx
+++ b/dbaccess/source/ui/inc/TableDesignControl.hxx
@@ -32,8 +32,8 @@ namespace dbaui
friend class OTableDesignUndoAct;
protected:
- long m_nDataPos; ///< currently needed row
- long m_nCurrentPos; ///< current position of selected column
+ tools::Long m_nDataPos; ///< currently needed row
+ tools::Long m_nCurrentPos; ///< current position of selected column
private:
sal_uInt16 m_nCurUndoActId;
@@ -41,10 +41,10 @@ namespace dbaui
public:
OTableRowView(vcl::Window* pParent);
- virtual void SetCellData( long nRow, sal_uInt16 nColId, const TOTypeInfoSP& _pTypeInfo ) = 0;
- virtual void SetCellData( long nRow, sal_uInt16 nColId, const css::uno::Any& _rNewData ) = 0;
- virtual css::uno::Any GetCellData( long nRow, sal_uInt16 nColId ) = 0;
- virtual void SetControlText( long nRow, sal_uInt16 nColId, const OUString& rText ) = 0;
+ virtual void SetCellData( tools::Long nRow, sal_uInt16 nColId, const TOTypeInfoSP& _pTypeInfo ) = 0;
+ virtual void SetCellData( tools::Long nRow, sal_uInt16 nColId, const css::uno::Any& _rNewData ) = 0;
+ virtual css::uno::Any GetCellData( tools::Long nRow, sal_uInt16 nColId ) = 0;
+ virtual void SetControlText( tools::Long nRow, sal_uInt16 nColId, const OUString& rText ) = 0;
virtual OTableDesignView* GetView() const = 0;
@@ -56,18 +56,18 @@ namespace dbaui
virtual void paste() override;
protected:
- void Paste( long nRow );
+ void Paste( tools::Long nRow );
virtual void CopyRows() = 0;
virtual void DeleteRows() = 0;
- virtual void InsertRows( long nRow ) = 0;
- virtual void InsertNewRows( long nRow ) = 0;
+ virtual void InsertRows( tools::Long nRow ) = 0;
+ virtual void InsertNewRows( tools::Long nRow ) = 0;
virtual bool IsPrimaryKeyAllowed() = 0;
- virtual bool IsInsertNewAllowed( long nRow ) = 0;
+ virtual bool IsInsertNewAllowed( tools::Long nRow ) = 0;
virtual bool IsDeleteAllowed() = 0;
- virtual RowStatus GetRowStatus(long nRow) const override;
+ virtual RowStatus GetRowStatus(tools::Long nRow) const override;
virtual void KeyInput(const KeyEvent& rEvt) override;
virtual void Command( const CommandEvent& rEvt ) override;
diff --git a/dbaccess/source/ui/inc/TableGrantCtrl.hxx b/dbaccess/source/ui/inc/TableGrantCtrl.hxx
index 0fd553a9c2ff..d83a3c0615eb 100644
--- a/dbaccess/source/ui/inc/TableGrantCtrl.hxx
+++ b/dbaccess/source/ui/inc/TableGrantCtrl.hxx
@@ -52,7 +52,7 @@ class OTableGrantControl : public ::svt::EditBrowseBox
OUString m_sUserName;
VclPtr<::svt::CheckBoxControl> m_pCheckCell;
VclPtr<::svt::EditControl> m_pEdit;
- long m_nDataPos;
+ tools::Long m_nDataPos;
ImplSVEvent * m_nDeactivateEvent;
public:
@@ -81,12 +81,12 @@ protected:
virtual bool PreNotify(NotifyEvent& rNEvt ) override;
virtual bool IsTabAllowed(bool bForward) const override;
- virtual void InitController( ::svt::CellControllerRef& rController, long nRow, sal_uInt16 nCol ) override;
- virtual ::svt::CellController* GetController( long nRow, sal_uInt16 nCol ) override;
+ virtual void InitController( ::svt::CellControllerRef& rController, tools::Long nRow, sal_uInt16 nCol ) override;
+ virtual ::svt::CellController* GetController( tools::Long nRow, sal_uInt16 nCol ) override;
virtual void PaintCell( OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColId ) const override;
- virtual bool SeekRow( long nRow ) override;
+ virtual bool SeekRow( tools::Long nRow ) override;
virtual bool SaveModified() override;
- virtual OUString GetCellText( long nRow, sal_uInt16 nColId ) const override;
+ virtual OUString GetCellText( tools::Long nRow, sal_uInt16 nColId ) const override;
virtual void CellModified() override;
diff --git a/dbaccess/source/ui/inc/TableRow.hxx b/dbaccess/source/ui/inc/TableRow.hxx
index b2ee89dbbd97..b5c12600aa8b 100644
--- a/dbaccess/source/ui/inc/TableRow.hxx
+++ b/dbaccess/source/ui/inc/TableRow.hxx
@@ -19,6 +19,7 @@
#pragma once
#include <com/sun/star/beans/XPropertySet.hpp>
+#include <tools/long.hxx>
#include "TypeInfo.hxx"
class SvStream;
@@ -38,7 +39,7 @@ namespace dbaui
public:
OTableRow();
OTableRow(const css::uno::Reference< css::beans::XPropertySet >& xAffectedCol);
- OTableRow( const OTableRow& rRow, long nPosition = -1 );
+ OTableRow( const OTableRow& rRow, tools::Long nPosition = -1 );
~OTableRow();
OFieldDescription* GetActFieldDescr() const { return m_pActFieldDescr; }
diff --git a/dbaccess/source/ui/inc/WTypeSelect.hxx b/dbaccess/source/ui/inc/WTypeSelect.hxx
index fce7fd120dce..7abc582c76b0 100644
--- a/dbaccess/source/ui/inc/WTypeSelect.hxx
+++ b/dbaccess/source/ui/inc/WTypeSelect.hxx
@@ -35,7 +35,7 @@ namespace dbaui
virtual void ActivateAggregate( EControlType eType ) override;
virtual void DeactivateAggregate( EControlType eType ) override;
- virtual void CellModified(long nRow, sal_uInt16 nColId ) override;
+ virtual void CellModified(tools::Long nRow, sal_uInt16 nColId ) override;
virtual css::lang::Locale GetLocale() const override;
virtual css::uno::Reference< css::util::XNumberFormatter > GetFormatter() const override;
diff --git a/dbaccess/source/ui/inc/indexfieldscontrol.hxx b/dbaccess/source/ui/inc/indexfieldscontrol.hxx
index 1261db55439e..886332935786 100644
--- a/dbaccess/source/ui/inc/indexfieldscontrol.hxx
+++ b/dbaccess/source/ui/inc/indexfieldscontrol.hxx
@@ -64,20 +64,20 @@ namespace dbaui
void SaveValue() { m_aSavedValue = m_aFields; }
void SetModifyHdl(const Link<IndexFieldsControl&,void>& _rHdl) { m_aModifyHdl = _rHdl; }
- virtual OUString GetCellText(long _nRow,sal_uInt16 nColId) const override;
+ virtual OUString GetCellText(tools::Long _nRow,sal_uInt16 nColId) const override;
private:
// EditBrowseBox overridables
virtual void PaintCell( OutputDevice& _rDev, const tools::Rectangle& _rRect, sal_uInt16 _nColumnId ) const override;
- virtual bool SeekRow(long nRow) override;
- virtual sal_uInt32 GetTotalCellWidth(long nRow, sal_uInt16 nColId) override;
+ virtual bool SeekRow(tools::Long nRow) override;
+ virtual sal_uInt32 GetTotalCellWidth(tools::Long nRow, sal_uInt16 nColId) override;
virtual bool IsTabAllowed(bool bForward) const override;
- ::svt::CellController* GetController(long _nRow, sal_uInt16 _nColumnId) override;
- void InitController(::svt::CellControllerRef&, long _nRow, sal_uInt16 _nColumnId) override;
+ ::svt::CellController* GetController(tools::Long _nRow, sal_uInt16 _nColumnId) override;
+ void InitController(::svt::CellControllerRef&, tools::Long _nRow, sal_uInt16 _nColumnId) override;
OUString GetRowCellText(const IndexFields::const_iterator& _rRow,sal_uInt16 nColId) const;
- bool implGetFieldDesc(long _nRow, IndexFields::const_iterator& _rPos);
+ bool implGetFieldDesc(tools::Long _nRow, IndexFields::const_iterator& _rPos);
bool isNewField() const { return GetCurRow() >= static_cast<sal_Int32>(m_aFields.size()); }
diff --git a/dbaccess/source/ui/inc/sbagrid.hxx b/dbaccess/source/ui/inc/sbagrid.hxx
index 35ac36b2e27f..874e3c5f9c75 100644
--- a/dbaccess/source/ui/inc/sbagrid.hxx
+++ b/dbaccess/source/ui/inc/sbagrid.hxx
@@ -213,7 +213,7 @@ namespace dbaui
void SetMasterListener(SbaGridListener* pListener) { m_pMasterListener = pListener; }
- virtual void ActivateCell(long nRow, sal_uInt16 nCol, bool bSetCellFocus = true) override;
+ virtual void ActivateCell(tools::Long nRow, sal_uInt16 nCol, bool bSetCellFocus = true) override;
virtual void DeactivateCell(bool bUpdate = true) override;
using FmGridControl::ActivateCell;
@@ -249,7 +249,7 @@ namespace dbaui
// EditBrowseBox overridables
virtual VclPtr<BrowserHeader> imp_CreateHeaderBar(BrowseBox* pParent) override;
- virtual ::svt::CellController* GetController(long nRow, sal_uInt16 nCol) override;
+ virtual ::svt::CellController* GetController(tools::Long nRow, sal_uInt16 nCol) override;
// DbGridControl overridables
virtual void PreExecuteRowContextMenu(sal_uInt16 nRow, PopupMenu& rMenu) override;
diff --git a/dbaccess/source/ui/misc/WTypeSelect.cxx b/dbaccess/source/ui/misc/WTypeSelect.cxx
index 3b2647fac719..44bb78b36924 100644
--- a/dbaccess/source/ui/misc/WTypeSelect.cxx
+++ b/dbaccess/source/ui/misc/WTypeSelect.cxx
@@ -77,7 +77,7 @@ void OWizTypeSelectControl::DeactivateAggregate( EControlType eType )
}
}
-void OWizTypeSelectControl::CellModified(long nRow, sal_uInt16 nColId )
+void OWizTypeSelectControl::CellModified(tools::Long nRow, sal_uInt16 nColId )
{
OSL_ENSURE(nRow == -1,"nRow must be -1!");
diff --git a/dbaccess/source/ui/querydesign/ConnectionLine.cxx b/dbaccess/source/ui/querydesign/ConnectionLine.cxx
index 5411e22e9457..96086d60b682 100644
--- a/dbaccess/source/ui/querydesign/ConnectionLine.cxx
+++ b/dbaccess/source/ui/querydesign/ConnectionLine.cxx
@@ -29,8 +29,8 @@
#include <vcl/settings.hxx>
using namespace dbaui;
-const long DESCRIPT_LINE_WIDTH = 15;
-const long HIT_SENSITIVE_RADIUS = 5;
+const tools::Long DESCRIPT_LINE_WIDTH = 15;
+const tools::Long HIT_SENSITIVE_RADIUS = 5;
namespace
{
@@ -55,7 +55,7 @@ namespace
tools::Rectangle aReturn;
if ( pListBox )
{
- const long nRowHeight = pListBox->get_widget().get_height_rows(1);
+ const tools::Long nRowHeight = pListBox->get_widget().get_height_rows(1);
aReturn.SetTop( _aConnPos.Y() - nRowHeight );
aReturn.SetBottom( aReturn.Top() + nRowHeight );
if (_aDescrLinePos.X() < _aConnPos.X())
@@ -105,10 +105,10 @@ namespace
else
{
const auto nRowHeight = rTreeView.get_height_rows(1);
- _rNewConPos.AdjustY( -static_cast<long>( 0.5 * nRowHeight ) );
+ _rNewConPos.AdjustY( -static_cast<tools::Long>( 0.5 * nRowHeight ) );
}
- long nListBoxBottom = _pWin->GetPosPixel().Y()
+ tools::Long nListBoxBottom = _pWin->GetPosPixel().Y()
+ pListBox->GetPosPixel().Y()
+ pListBox->GetSizePixel().Height();
if( _rNewConPos.Y() > nListBoxBottom )
@@ -232,8 +232,8 @@ bool OConnectionLine::RecalcLine()
Point aSourceCenter( 0, 0 );
Point aDestCenter( 0, 0 );
- aSourceCenter.setX( pSourceWin->GetPosPixel().X() + static_cast<long>( 0.5*pSourceWin->GetSizePixel().Width() ) );
- aDestCenter.setX( pDestWin->GetPosPixel().X() + static_cast<long>( 0.5*pDestWin->GetSizePixel().Width() ) );
+ aSourceCenter.setX( pSourceWin->GetPosPixel().X() + static_cast<tools::Long>( 0.5*pSourceWin->GetSizePixel().Width() ) );
+ aDestCenter.setX( pDestWin->GetPosPixel().X() + static_cast<tools::Long>( 0.5*pDestWin->GetSizePixel().Width() ) );
const OTableWindow* pFirstWin = pDestWin;
const OTableWindow* pSecondWin = pSourceWin;
@@ -311,8 +311,8 @@ static double dist_Euklid(const Point &p1, const Point& p2,const Point& pM, Poin
double l = (v.X() * w.Y() - v.Y() * w.X()) / a;
double a2 = w.X()*v.X()+w.Y()*v.Y();
a = a2 / (a * a);
- q.setX( long(p1.X() + a * v.X()) );
- q.setY( long(p1.Y() + a * v.Y()) );
+ q.setX( tools::Long(p1.X() + a * v.X()) );
+ q.setY( tools::Long(p1.Y() + a * v.Y()) );
return l;
}
diff --git a/dbaccess/source/ui/querydesign/JoinController.cxx b/dbaccess/source/ui/querydesign/JoinController.cxx
index 49ad53027729..114f77d99865 100644
--- a/dbaccess/source/ui/querydesign/JoinController.cxx
+++ b/dbaccess/source/ui/querydesign/JoinController.cxx
@@ -157,7 +157,7 @@ void OJoinController::impl_onModifyChanged()
InvalidateFeature( SID_RELATION_ADD_RELATION );
}
-void OJoinController::SaveTabWinPosSize(OTableWindow const * pTabWin, long nOffsetX, long nOffsetY)
+void OJoinController::SaveTabWinPosSize(OTableWindow const * pTabWin, tools::Long nOffsetX, tools::Long nOffsetY)
{
// the data for the window
const TTableWindowData::value_type& pData = pTabWin->GetData();
@@ -262,7 +262,7 @@ void OJoinController::runDialogAsync()
});
}
-void OJoinController::SaveTabWinsPosSize( OJoinTableView::OTableWindowMap* pTabWinList, long nOffsetX, long nOffsetY )
+void OJoinController::SaveTabWinsPosSize( OJoinTableView::OTableWindowMap* pTabWinList, tools::Long nOffsetX, tools::Long nOffsetY )
{
// Deletion and recreation of the old implementation with the current model is not correct anymore:
// The TabWins have a pointer to their data, but they are managed by me. When I delete the old ones, the TabWins suddenly have a pointer to objects, which no longer exist.
diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx
index 5ef30e19aeda..a51c375eaf2d 100644
--- a/dbaccess/source/ui/querydesign/JoinTableView.cxx
+++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx
@@ -123,8 +123,8 @@ void OScrollWindowHelper::Resize()
Window::Resize();
Size aTotalOutputSize = GetOutputSizePixel();
- long nHScrollHeight = GetHScrollBar().GetSizePixel().Height();
- long nVScrollWidth = GetVScrollBar().GetSizePixel().Width();
+ tools::Long nHScrollHeight = GetHScrollBar().GetSizePixel().Height();
+ tools::Long nVScrollWidth = GetVScrollBar().GetSizePixel().Width();
GetHScrollBar().SetPosSizePixel(
Point( 0, aTotalOutputSize.Height()-nHScrollHeight ),
@@ -148,7 +148,7 @@ void OScrollWindowHelper::Resize()
GetVScrollBar().SetVisibleSize( aTotalOutputSize.Height() );
// adjust the ranges of the scrollbars if necessary
- long lRange = GetHScrollBar().GetRange().Max() - GetHScrollBar().GetRange().Min();
+ tools::Long lRange = GetHScrollBar().GetRange().Max() - GetHScrollBar().GetRange().Min();
if (m_pTableView->GetScrollOffset().X() + aTotalOutputSize.Width() > lRange)
GetHScrollBar().SetRangeMax(m_pTableView->GetScrollOffset().X() + aTotalOutputSize.Width() + GetHScrollBar().GetRange().Min());
@@ -403,13 +403,13 @@ void OJoinTableView::RemoveTabWin( OTableWindow* pTabWin )
namespace
{
- bool isScrollAllowed( OJoinTableView* _pView,long nDelta, bool bHoriz)
+ bool isScrollAllowed( OJoinTableView* _pView,tools::Long nDelta, bool bHoriz)
{
// adjust ScrollBar-Positions
ScrollBar& rBar = bHoriz ? _pView->GetHScrollBar() : _pView->GetVScrollBar() ;
- long nOldThumbPos = rBar.GetThumbPos();
- long nNewThumbPos = nOldThumbPos + nDelta;
+ tools::Long nOldThumbPos = rBar.GetThumbPos();
+ tools::Long nNewThumbPos = nOldThumbPos + nDelta;
if( nNewThumbPos < 0 )
nNewThumbPos = 0;
else if( nNewThumbPos > rBar.GetRangeMax() )
@@ -425,7 +425,7 @@ namespace
return true;
}
- bool getMovementImpl(OJoinTableView* _pView,const Point& _rPoint,const Size& _rSize,long& _nScrollX,long& _nScrollY)
+ bool getMovementImpl(OJoinTableView* _pView,const Point& _rPoint,const Size& _rSize,tools::Long& _nScrollX,tools::Long& _nScrollY)
{
_nScrollY = _nScrollX = 0;
// data about the tab win
@@ -487,7 +487,7 @@ namespace
bool OJoinTableView::isMovementAllowed(const Point& _rPoint,const Size& _rSize)
{
- long nX,nY;
+ tools::Long nX,nY;
return getMovementImpl(this,_rPoint,_rSize,nX,nY);
}
@@ -501,7 +501,7 @@ void OJoinTableView::EnsureVisible(const OTableWindow* _pWin)
void OJoinTableView::EnsureVisible(const Point& _rPoint,const Size& _rSize)
{
- long nScrollX,nScrollY;
+ tools::Long nScrollX,nScrollY;
if ( getMovementImpl(this,_rPoint,_rSize,nScrollX,nScrollY) )
{
@@ -639,7 +639,7 @@ void OJoinTableView::BeginChildSizing( OTableWindow* pTabWin, PointerStyle nPoin
StartTracking();
}
-bool OJoinTableView::ScrollPane( long nDelta, bool bHoriz, bool bPaintScrollBars )
+bool OJoinTableView::ScrollPane( tools::Long nDelta, bool bHoriz, bool bPaintScrollBars )
{
bool bRet = true;
@@ -648,8 +648,8 @@ bool OJoinTableView::ScrollPane( long nDelta, bool bHoriz, bool bPaintScrollBars
{
if( bHoriz )
{
- long nOldThumbPos = GetHScrollBar().GetThumbPos();
- long nNewThumbPos = nOldThumbPos + nDelta;
+ tools::Long nOldThumbPos = GetHScrollBar().GetThumbPos();
+ tools::Long nNewThumbPos = nOldThumbPos + nDelta;
if( nNewThumbPos < 0 )
{
nNewThumbPos = 0;
@@ -665,8 +665,8 @@ bool OJoinTableView::ScrollPane( long nDelta, bool bHoriz, bool bPaintScrollBars
}
else
{
- long nOldThumbPos = GetVScrollBar().GetThumbPos();
- long nNewThumbPos = nOldThumbPos+nDelta;
+ tools::Long nOldThumbPos = GetVScrollBar().GetThumbPos();
+ tools::Long nNewThumbPos = nOldThumbPos+nDelta;
if( nNewThumbPos < 0 )
{
nNewThumbPos = 0;
diff --git a/dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.hxx b/dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.hxx
index 47be95d92c47..601d25f9c01c 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.hxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.hxx
@@ -71,12 +71,12 @@ namespace dbaui
class OTabFieldSizedUndoAct final : public OQueryDesignFieldUndoAct
{
- long m_nNextWidth;
+ tools::Long m_nNextWidth;
public:
explicit OTabFieldSizedUndoAct(OSelectionBrowseBox* pSelBrwBox) : OQueryDesignFieldUndoAct(pSelBrwBox, STR_QUERY_UNDO_SIZE_COLUMN), m_nNextWidth(0) { }
- void SetOriginalWidth(long nWidth) { m_nNextWidth = nWidth; }
+ void SetOriginalWidth(tools::Long nWidth) { m_nNextWidth = nWidth; }
virtual void Undo() override;
virtual void Redo() override { Undo(); }
diff --git a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx
index 6242c94fc09f..3171c8789dcb 100644
--- a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx
+++ b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx
@@ -88,7 +88,7 @@ void OTabFieldSizedUndoAct::Undo()
if ( m_nColumnPosition != BROWSER_INVALIDID )
{
sal_uInt16 nColumnId = pOwner->GetColumnId(m_nColumnPosition);
- long nNextWidth = pOwner->GetColumnWidth(nColumnId);
+ tools::Long nNextWidth = pOwner->GetColumnWidth(nColumnId);
pOwner->SetColWidth(nColumnId, m_nNextWidth);
m_nNextWidth = nNextWidth;
}
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 030c8caf07e8..ccb389c2dd06 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -355,7 +355,7 @@ void OSelectionBrowseBox::Init()
SetDataRowHeight(aHeight.Height());
SetTitleLines(1);
// get number of visible rows
- for(long i=0;i<BROW_ROW_CNT;i++)
+ for(tools::Long i=0;i<BROW_ROW_CNT;i++)
{
if(m_bVisibleRow[i])
m_nVisibleCount++;
@@ -429,7 +429,7 @@ void OSelectionBrowseBox::SetReadOnly(bool bRO)
}
}
-CellController* OSelectionBrowseBox::GetController(long nRow, sal_uInt16 nColId)
+CellController* OSelectionBrowseBox::GetController(tools::Long nRow, sal_uInt16 nColId)
{
if ( nColId > getFields().size() )
return nullptr;
@@ -442,7 +442,7 @@ CellController* OSelectionBrowseBox::GetController(long nRow, sal_uInt16 nColId)
if (static_cast<OQueryController&>(getDesignView()->getController()).isReadOnly())
return nullptr;
- long nCellIndex = GetRealRow(nRow);
+ tools::Long nCellIndex = GetRealRow(nRow);
switch (nCellIndex)
{
case BROW_FIELD_ROW:
@@ -460,7 +460,7 @@ CellController* OSelectionBrowseBox::GetController(long nRow, sal_uInt16 nColId)
}
}
-void OSelectionBrowseBox::InitController(CellControllerRef& /*rController*/, long nRow, sal_uInt16 nColId)
+void OSelectionBrowseBox::InitController(CellControllerRef& /*rController*/, tools::Long nRow, sal_uInt16 nColId)
{
OSL_ENSURE(nColId != BROWSER_INVALIDID,"An Invalid Id was set!");
if ( nColId == BROWSER_INVALIDID )
@@ -470,7 +470,7 @@ void OSelectionBrowseBox::InitController(CellControllerRef& /*rController*/, lon
return;
OTableFieldDescRef pEntry = getFields()[nPos-1];
OSL_ENSURE(pEntry.is(), "OSelectionBrowseBox::InitController : invalid FieldDescription !");
- long nCellIndex = GetRealRow(nRow);
+ tools::Long nCellIndex = GetRealRow(nRow);
switch (nCellIndex)
{
@@ -905,7 +905,7 @@ bool OSelectionBrowseBox::SaveModified()
{
// for the Undo-action
OUString strOldCellContents,sNewValue;
- long nRow = GetRealRow(GetCurRow());
+ tools::Long nRow = GetRealRow(GetCurRow());
bool bAppendRow = false;
switch (nRow)
{
@@ -1211,7 +1211,7 @@ bool OSelectionBrowseBox::SaveModified()
return pEntry != nullptr && !bError;
}
-bool OSelectionBrowseBox::SeekRow(long nRow)
+bool OSelectionBrowseBox::SeekRow(tools::Long nRow)
{
m_nSeekRow = nRow;
return nRow < m_nVisibleCount;
@@ -1229,7 +1229,7 @@ void OSelectionBrowseBox::PaintCell(OutputDevice& rDev, const tools::Rectangle&
if (!pEntry.is())
return;
- long nRow = GetRealRow(m_nSeekRow);
+ tools::Long nRow = GetRealRow(m_nSeekRow);
if (nRow == BROW_VIS_ROW)
PaintTristate(rRect, pEntry->IsVisible() ? TRISTATE_TRUE : TRISTATE_FALSE);
else
@@ -1260,7 +1260,7 @@ void OSelectionBrowseBox::RemoveColumn(sal_uInt16 _nColumnId)
// ColId is synonymous to Position, and the condition should be valid
sal_uInt16 nCurCol = GetCurColumnId();
- long nCurrentRow = GetCurRow();
+ tools::Long nCurrentRow = GetCurRow();
DeactivateCell();
@@ -1446,7 +1446,7 @@ void OSelectionBrowseBox::DeleteFields(const OUString& rAliasName)
ActivateCell(nRow , nColId);
}
-void OSelectionBrowseBox::SetColWidth(sal_uInt16 nColId, long nNewWidth)
+void OSelectionBrowseBox::SetColWidth(sal_uInt16 nColId, tools::Long nNewWidth)
{
bool bWasEditing = IsEditing();
if (bWasEditing)
@@ -1479,11 +1479,11 @@ tools::Rectangle OSelectionBrowseBox::GetInvalidRect( sal_uInt16 nColId )
void OSelectionBrowseBox::InsertColumn(const OTableFieldDescRef& pEntry, sal_uInt16& _nColumnPosition)
{
// the control should have exactly one more column: the HandleColumn
- OSL_ENSURE(_nColumnPosition == BROWSER_INVALIDID || (_nColumnPosition <= static_cast<long>(getFields().size())), "OSelectionBrowseBox::InsertColumn : invalid parameter nColId.");
+ OSL_ENSURE(_nColumnPosition == BROWSER_INVALIDID || (_nColumnPosition <= static_cast<tools::Long>(getFields().size())), "OSelectionBrowseBox::InsertColumn : invalid parameter nColId.");
// -1 means at the end. Count means at the end, others denotes a correct position
sal_uInt16 nCurCol = GetCurColumnId();
- long nCurrentRow = GetCurRow();
+ tools::Long nCurrentRow = GetCurRow();
DeactivateCell();
@@ -1857,7 +1857,7 @@ bool OSelectionBrowseBox::Save()
void OSelectionBrowseBox::CellModified()
{
- long nRow = GetRealRow(GetCurRow());
+ tools::Long nRow = GetRealRow(GetCurRow());
switch (nRow)
{
case BROW_VIS_ROW:
@@ -1928,7 +1928,7 @@ void OSelectionBrowseBox::Command(const CommandEvent& rEvt)
}
sal_uInt16 nColId = GetColumnId(GetColumnAtXPosPixel( aMenuPos.X() ));
- long nRow = GetRowAtYPosPixel( aMenuPos.Y() );
+ tools::Long nRow = GetRowAtYPosPixel( aMenuPos.Y() );
if (nRow < 0 && nColId > HANDLE_ID )
{
@@ -2018,7 +2018,7 @@ void OSelectionBrowseBox::SetRowVisible(sal_uInt16 _nWhich, bool _bVis)
// do this before removing or inserting rows, as this triggers ActivateCell-calls, which rely on m_bVisibleRow
m_bVisibleRow[_nWhich] = !m_bVisibleRow[_nWhich];
- long nId = GetBrowseRow(_nWhich);
+ tools::Long nId = GetBrowseRow(_nWhich);
if (_bVis)
{
RowInserted(nId);
@@ -2034,10 +2034,10 @@ void OSelectionBrowseBox::SetRowVisible(sal_uInt16 _nWhich, bool _bVis)
ActivateCell();
}
-long OSelectionBrowseBox::GetBrowseRow(long nRowId) const
+tools::Long OSelectionBrowseBox::GetBrowseRow(tools::Long nRowId) const
{
sal_uInt16 nCount(0);
- for(long i = 0 ; i < nRowId ; ++i)
+ for(tools::Long i = 0 ; i < nRowId ; ++i)
{
if ( m_bVisibleRow[i] )
++nCount;
@@ -2045,20 +2045,20 @@ long OSelectionBrowseBox::GetBrowseRow(long nRowId) const
return nCount;
}
-long OSelectionBrowseBox::GetRealRow(long nRowId) const
+tools::Long OSelectionBrowseBox::GetRealRow(tools::Long nRowId) const
{
- long nErg=0,i;
- const long nCount = m_bVisibleRow.size();
+ tools::Long nErg=0,i;
+ const tools::Long nCount = m_bVisibleRow.size();
for(i=0;i < nCount; ++i)
{
if(m_bVisibleRow[i] && nErg++ == nRowId)
break;
}
- OSL_ENSURE(nErg <= long(m_bVisibleRow.size()),"nErg cannot be greater than BROW_ROW_CNT!");
+ OSL_ENSURE(nErg <= tools::Long(m_bVisibleRow.size()),"nErg cannot be greater than BROW_ROW_CNT!");
return i;
}
-const long nVisibleRowMask[] =
+const tools::Long nVisibleRowMask[] =
{
0x0001,
0x0002,
@@ -2086,7 +2086,7 @@ sal_Int32 OSelectionBrowseBox::GetNoneVisibleRows() const
return nErg;
}
-void OSelectionBrowseBox::SetNoneVisibleRow(long nRows)
+void OSelectionBrowseBox::SetNoneVisibleRow(tools::Long nRows)
{
// only the first 11 rows are interesting
sal_Int32 const nSize = SAL_N_ELEMENTS(nVisibleRowMask);
@@ -2094,7 +2094,7 @@ void OSelectionBrowseBox::SetNoneVisibleRow(long nRows)
m_bVisibleRow[i] = !(nRows & nVisibleRowMask[i]);
}
-OUString OSelectionBrowseBox::GetCellText(long nRow, sal_uInt16 nColId) const
+OUString OSelectionBrowseBox::GetCellText(tools::Long nRow, sal_uInt16 nColId) const
{
sal_uInt16 nPos = GetColumnPos(nColId);
@@ -2290,7 +2290,7 @@ void OSelectionBrowseBox::SetCellContents(sal_Int32 nRow, sal_uInt16 nColId, con
pEntry->SetCriteria(sal_uInt16(nRow - BROW_CRIT1_ROW), strNewText);
}
- long nCellIndex = GetRealRow(nRow);
+ tools::Long nCellIndex = GetRealRow(nRow);
if(IsRowVisible(static_cast<sal_uInt16>(nRow)))
RowModified(nCellIndex, nColId);
@@ -2333,7 +2333,7 @@ void OSelectionBrowseBox::ColumnResized(sal_uInt16 nColId)
}
}
-sal_uInt32 OSelectionBrowseBox::GetTotalCellWidth(long nRowId, sal_uInt16 nColId)
+sal_uInt32 OSelectionBrowseBox::GetTotalCellWidth(tools::Long nRowId, sal_uInt16 nColId)
{
sal_uInt16 nPos = GetColumnPos(nColId);
OSL_ENSURE((nPos == 0) || (nPos <= getFields().size()), "OSelectionBrowseBox::GetTotalCellWidth : invalid parameter nColId");
@@ -2341,7 +2341,7 @@ sal_uInt32 OSelectionBrowseBox::GetTotalCellWidth(long nRowId, sal_uInt16 nColId
OTableFieldDescRef pEntry = getFields()[nPos-1];
OSL_ENSURE(pEntry.is(), "OSelectionBrowseBox::GetTotalCellWidth : invalid FieldDescription !");
- long nRow = GetRealRow(nRowId);
+ tools::Long nRow = GetRealRow(nRowId);
OUString strText(GetCellText(nRow, nColId));
return GetDataWindow().LogicToPixel(Size(GetDataWindow().GetTextWidth(strText),0)).Width();
}
@@ -2349,7 +2349,7 @@ sal_uInt32 OSelectionBrowseBox::GetTotalCellWidth(long nRowId, sal_uInt16 nColId
bool OSelectionBrowseBox::isCutAllowed() const
{
bool bCutAllowed = false;
- long nRow = GetRealRow(GetCurRow());
+ tools::Long nRow = GetRealRow(GetCurRow());
switch (nRow)
{
case BROW_VIS_ROW:
@@ -2377,7 +2377,7 @@ bool OSelectionBrowseBox::isCutAllowed() const
void OSelectionBrowseBox::cut()
{
- long nRow = GetRealRow(GetCurRow());
+ tools::Long nRow = GetRealRow(GetCurRow());
switch (nRow)
{
case BROW_FIELD_ROW:
@@ -2400,7 +2400,7 @@ void OSelectionBrowseBox::cut()
void OSelectionBrowseBox::paste()
{
- long nRow = GetRealRow(GetCurRow());
+ tools::Long nRow = GetRealRow(GetCurRow());
switch (nRow)
{
case BROW_FIELD_ROW:
@@ -2423,7 +2423,7 @@ void OSelectionBrowseBox::paste()
bool OSelectionBrowseBox::isPasteAllowed() const
{
bool bPasteAllowed = true;
- long nRow = GetRealRow(GetCurRow());
+ tools::Long nRow = GetRealRow(GetCurRow());
switch (nRow)
{
case BROW_VIS_ROW:
@@ -2443,7 +2443,7 @@ bool OSelectionBrowseBox::isCopyAllowed() const
void OSelectionBrowseBox::copy()
{
- long nRow = GetRealRow(GetCurRow());
+ tools::Long nRow = GetRealRow(GetCurRow());
switch (nRow)
{
case BROW_FIELD_ROW:
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
index 99dfd424b8de..7fe01622fcbd 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
@@ -52,7 +52,7 @@ namespace dbaui
std::vector<bool> m_bVisibleRow; // at pos we find the RowId
Timer m_timerInvalidate;
- long m_nSeekRow;
+ tools::Long m_nSeekRow;
BrowserMode m_nMode; // remember the BrowseModes
VclPtr< ::svt::EditControl> m_pTextCell;
VclPtr< ::svt::CheckBoxControl> m_pVisibleCell;
@@ -104,14 +104,14 @@ namespace dbaui
OQueryDesignView* getDesignView() const;
sal_uInt16 FieldsCount();
- void SetColWidth(sal_uInt16 nColId, long lNewWidth);
+ void SetColWidth(sal_uInt16 nColId, tools::Long lNewWidth);
// unlike SetColumnWidth of the base class it checks an active cell in this column
OUString GetCellContents(sal_Int32 nCellIndex, sal_uInt16 nColId);
void SetCellContents(sal_Int32 nCellIndex, sal_uInt16 nColId, const OUString& strNewText);
// cell content (formatted as string) set/return
sal_Int32 GetNoneVisibleRows() const;
- void SetNoneVisibleRow(long nRows);
+ void SetNoneVisibleRow(tools::Long nRows);
bool IsRowVisible(sal_uInt16 _nWhich) const;
void SetRowVisible(sal_uInt16 _nWhich, bool _bVis);
@@ -150,7 +150,7 @@ namespace dbaui
@return
the text out of the cell
*/
- virtual OUString GetCellText(long _nRow, sal_uInt16 _nColId) const override;
+ virtual OUString GetCellText(tools::Long _nRow, sal_uInt16 _nColId) const override;
/** returns the description of the row.
@param _nRow
@@ -178,7 +178,7 @@ namespace dbaui
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessibleCell( sal_Int32 nRow, sal_uInt16 nColumnId ) override;
private:
- virtual bool SeekRow( long nRow ) override;
+ virtual bool SeekRow( tools::Long nRow ) override;
virtual void PaintStatusCell(OutputDevice& rDev, const tools::Rectangle& rRect) const override;
virtual void PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect,
@@ -191,14 +191,14 @@ namespace dbaui
virtual void KeyInput( const KeyEvent& rEvt ) override;
virtual void Command(const CommandEvent& rEvt) override;
- virtual ::svt::CellController* GetController(long nRow, sal_uInt16 nCol) override;
- virtual void InitController(::svt::CellControllerRef& rController, long nRow, sal_uInt16 nCol) override;
+ virtual ::svt::CellController* GetController(tools::Long nRow, sal_uInt16 nCol) override;
+ virtual void InitController(::svt::CellControllerRef& rController, tools::Long nRow, sal_uInt16 nCol) override;
virtual void CellModified() override;
virtual bool SaveModified() override;
virtual void Init() override;
virtual void ColumnResized( sal_uInt16 nColId ) override;
- virtual sal_uInt32 GetTotalCellWidth(long nRow, sal_uInt16 nColId) override;
+ virtual sal_uInt32 GetTotalCellWidth(tools::Long nRow, sal_uInt16 nColId) override;
// if you want to have an own header ...
virtual VclPtr<BrowserHeader> imp_CreateHeaderBar(BrowseBox* pParent) override;
@@ -216,8 +216,8 @@ namespace dbaui
void RemoveField( sal_uInt16 nId );
tools::Rectangle GetInvalidRect( sal_uInt16 nColId );
- long GetRealRow(long nRow) const;
- long GetBrowseRow(long nRowId) const;
+ tools::Long GetRealRow(tools::Long nRow) const;
+ tools::Long GetBrowseRow(tools::Long nRowId) const;
bool GetFunctionName(sal_uInt32 _nFunctionTokenId, OUString& rFkt);
void appendUndoAction(const OUString& _rOldValue,const OUString& _rNewValue,sal_Int32 _nRow, bool& _bListAction);
void appendUndoAction(const OUString& _rOldValue,const OUString& _rNewValue,sal_Int32 _nRow);
diff --git a/dbaccess/source/ui/querydesign/TableWindow.cxx b/dbaccess/source/ui/querydesign/TableWindow.cxx
index 02f45afb416f..5744f58bdb3e 100644
--- a/dbaccess/source/ui/querydesign/TableWindow.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindow.cxx
@@ -429,12 +429,12 @@ void OTableWindow::Resize()
Size aOutSize = GetOutputSizePixel();
aOutSize = Size(CalcZoom(aOutSize.Width()),CalcZoom(aOutSize.Height()));
- long nTitleHeight = CalcZoom( GetTextHeight() )+ CalcZoom( 4 );
+ tools::Long nTitleHeight = CalcZoom( GetTextHeight() )+ CalcZoom( 4 );
// Set the title and ListBox
- long n5Pos = CalcZoom(5);
- long nPositionX = n5Pos;
- long nPositionY = n5Pos;
+ tools::Long n5Pos = CalcZoom(5);
+ tools::Long nPositionX = n5Pos;
+ tools::Long nPositionY = n5Pos;
// position the image which indicates the type
m_aTypeImage->SetPosPixel( Point( nPositionX, nPositionY ) );
@@ -447,7 +447,7 @@ void OTableWindow::Resize()
nPositionX += aImageSize.Width() + CalcZoom( 2 );
m_xTitle->SetPosSizePixel( Point( nPositionX, nPositionY ), Size( aOutSize.Width() - nPositionX - n5Pos, nTitleHeight ) );
- long nTitleToList = CalcZoom( 3 );
+ tools::Long nTitleToList = CalcZoom( 3 );
m_xListBox->SetPosSizePixel(
Point( n5Pos, nPositionY + nTitleHeight + nTitleToList ),
diff --git a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx
index 9481f6518cf5..68b4c5c86865 100644
--- a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx
+++ b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx
@@ -201,7 +201,7 @@ namespace dbaui
Size aSize = GetOutputSizePixel();
Size aBeamer(aSize.Width(),sal_Int32(aSize.Height()*0.33));
- const long nFrameHeight = LogicToPixel(Size(0, 3), MapMode(MapUnit::MapAppFont)).Height();
+ const tools::Long nFrameHeight = LogicToPixel(Size(0, 3), MapMode(MapUnit::MapAppFont)).Height();
Point aPos(0,aBeamer.Height()+nFrameHeight);
m_pBeamer->SetPosSizePixel(Point(0,0),aBeamer);
diff --git a/dbaccess/source/ui/relationdesign/RTableConnection.cxx b/dbaccess/source/ui/relationdesign/RTableConnection.cxx
index b4bc2cfe10ab..ba60ae54661b 100644
--- a/dbaccess/source/ui/relationdesign/RTableConnection.cxx
+++ b/dbaccess/source/ui/relationdesign/RTableConnection.cxx
@@ -56,8 +56,8 @@ void ORelationTableConnection::Draw(vcl::RenderContext& rRenderContext, const to
// search lines for top line
tools::Rectangle aBoundingRect;
- long nTop = GetBoundingRect().Bottom();
- long nTemp;
+ tools::Long nTop = GetBoundingRect().Bottom();
+ tools::Long nTemp;
const OConnectionLine* pTopLine = nullptr;
const std::vector<std::unique_ptr<OConnectionLine>>& rConnLineList = GetConnLineList();
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx
index 4d42125dd241..bb05ec132f0c 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx
@@ -167,7 +167,7 @@ void OTableEditorCtrl::SetReadOnly( bool bRead )
bReadOnly = bRead;
// Disable active cells
- long nRow(GetCurRow());
+ tools::Long nRow(GetCurRow());
sal_uInt16 nCol(GetCurColumnId());
DeactivateCell();
@@ -278,19 +278,19 @@ void OTableEditorCtrl::dispose()
OTableRowView::dispose();
}
-bool OTableEditorCtrl::SetDataPtr( long nRow )
+bool OTableEditorCtrl::SetDataPtr( tools::Long nRow )
{
if(nRow == -1)
return false;
- OSL_ENSURE(nRow < static_cast<long>(m_pRowList->size()),"Row is greater than size!");
- if(nRow >= static_cast<long>(m_pRowList->size()))
+ OSL_ENSURE(nRow < static_cast<tools::Long>(m_pRowList->size()),"Row is greater than size!");
+ if(nRow >= static_cast<tools::Long>(m_pRowList->size()))
return false;
pActRow = (*m_pRowList)[nRow];
return pActRow != nullptr;
}
-bool OTableEditorCtrl::SeekRow(long _nRow)
+bool OTableEditorCtrl::SeekRow(tools::Long _nRow)
{
// Call the Base class to remember which row must be repainted
EditBrowseBox::SeekRow(_nRow);
@@ -310,7 +310,7 @@ void OTableEditorCtrl::PaintCell(OutputDevice& rDev, const tools::Rectangle& rRe
rDev.Pop();
}
-CellController* OTableEditorCtrl::GetController(long nRow, sal_uInt16 nColumnId)
+CellController* OTableEditorCtrl::GetController(tools::Long nRow, sal_uInt16 nColumnId)
{
// If EditorCtrl is ReadOnly, editing is forbidden
Reference<XPropertySet> xTable = GetView()->getController().getTable();
@@ -348,7 +348,7 @@ CellController* OTableEditorCtrl::GetController(long nRow, sal_uInt16 nColumnId)
}
}
-void OTableEditorCtrl::InitController(CellControllerRef&, long nRow, sal_uInt16 nColumnId)
+void OTableEditorCtrl::InitController(CellControllerRef&, tools::Long nRow, sal_uInt16 nColumnId)
{
SeekRow( nRow == -1 ? GetCurRow() : nRow);
OFieldDescription* pActFieldDescr = pActRow->GetActFieldDescr();
@@ -405,7 +405,7 @@ void OTableEditorCtrl::InitController(CellControllerRef&, long nRow, sal_uInt16
}
}
-EditBrowseBox::RowStatus OTableEditorCtrl::GetRowStatus(long nRow) const
+EditBrowseBox::RowStatus OTableEditorCtrl::GetRowStatus(tools::Long nRow) const
{
const_cast<OTableEditorCtrl*>(this)->SetDataPtr( nRow );
if( !pActRow )
@@ -436,7 +436,7 @@ void OTableEditorCtrl::SaveCurRow()
pDescrWin->SaveData( pActRow->GetActFieldDescr() );
}
-void OTableEditorCtrl::DisplayData(long nRow)
+void OTableEditorCtrl::DisplayData(tools::Long nRow)
{
// go to the correct cell
SetDataPtr(nRow);
@@ -496,7 +496,7 @@ sal_Int32 OTableEditorCtrl::HasFieldName( const OUString& rFieldName )
return nCount;
}
-void OTableEditorCtrl::SaveData(long nRow, sal_uInt16 nColId)
+void OTableEditorCtrl::SaveData(tools::Long nRow, sal_uInt16 nColId)
{
// Store the cell content
SetDataPtr( nRow == -1 ? GetCurRow() : nRow);
@@ -602,7 +602,7 @@ bool OTableEditorCtrl::SaveModified()
return true;
}
-bool OTableEditorCtrl::CursorMoving(long nNewRow, sal_uInt16 nNewCol)
+bool OTableEditorCtrl::CursorMoving(tools::Long nNewRow, sal_uInt16 nNewCol)
{
if (!EditBrowseBox::CursorMoving(nNewRow, nNewCol))
@@ -633,7 +633,7 @@ IMPL_LINK_NOARG( OTableEditorCtrl, InvalidateFieldType, void*, void )
Invalidate( GetFieldRectPixel(nOldDataPos, FIELD_TYPE) );
}
-void OTableEditorCtrl::CellModified( long nRow, sal_uInt16 nColId )
+void OTableEditorCtrl::CellModified( tools::Long nRow, sal_uInt16 nColId )
{
// If the description is null, use the default
@@ -723,7 +723,7 @@ void OTableEditorCtrl::CopyRows()
std::vector< std::shared_ptr<OTableRow> > vClipboardList;
vClipboardList.reserve(GetSelectRowCount());
- for( long nIndex=FirstSelectedRow(); nIndex != SFX_ENDOFSELECTION; nIndex=NextSelectedRow() )
+ for( tools::Long nIndex=FirstSelectedRow(); nIndex != SFX_ENDOFSELECTION; nIndex=NextSelectedRow() )
{
pRow = (*m_pRowList)[nIndex];
OSL_ENSURE(pRow,"OTableEditorCtrl::CopyRows: Row is NULL!");
@@ -766,7 +766,7 @@ OUString OTableEditorCtrl::GenerateName( const OUString& rName )
return aFieldName;
}
-void OTableEditorCtrl::InsertRows( long nRow )
+void OTableEditorCtrl::InsertRows( tools::Long nRow )
{
std::vector< std::shared_ptr<OTableRow> > vInsertedUndoRedoRows; // need for undo/redo handling
@@ -780,7 +780,7 @@ void OTableEditorCtrl::InsertRows( long nRow )
{
aStreamRef->Seek(STREAM_SEEK_TO_BEGIN);
aStreamRef->ResetError();
- long nInsertRow = nRow;
+ tools::Long nInsertRow = nRow;
std::shared_ptr<OTableRow> pRow;
sal_Int32 nSize = 0;
(*aStreamRef).ReadInt32( nSize );
@@ -819,7 +819,7 @@ void OTableEditorCtrl::DeleteRows()
GetUndoManager().AddUndoAction( std::make_unique<OTableEditorDelUndoAct>(this) );
// Delete all marked rows
- long nIndex = FirstSelectedRow();
+ tools::Long nIndex = FirstSelectedRow();
nOldDataPos = nIndex;
while( nIndex != SFX_ENDOFSELECTION )
@@ -846,16 +846,16 @@ void OTableEditorCtrl::DeleteRows()
InvalidateFeatures();
}
-void OTableEditorCtrl::InsertNewRows( long nRow )
+void OTableEditorCtrl::InsertNewRows( tools::Long nRow )
{
OSL_ENSURE(GetView()->getController().isAddAllowed(),"Call of InsertNewRows not valid here. Please check isAppendAllowed!");
// Create Undo-Action
- long nInsertRows = GetSelectRowCount();
+ tools::Long nInsertRows = GetSelectRowCount();
if( !nInsertRows )
nInsertRows = 1;
GetUndoManager().AddUndoAction( std::make_unique<OTableEditorInsNewUndoAct>(this, nRow, nInsertRows) );
// Insert the number of selected rows
- for( long i=nRow; i<(nRow+nInsertRows); i++ )
+ for( tools::Long i=nRow; i<(nRow+nInsertRows); i++ )
m_pRowList->insert( m_pRowList->begin()+i ,std::make_shared<OTableRow>());
RowInserted( nRow, nInsertRows );
@@ -863,7 +863,7 @@ void OTableEditorCtrl::InsertNewRows( long nRow )
InvalidateFeatures();
}
-void OTableEditorCtrl::SetControlText( long nRow, sal_uInt16 nColId, const OUString& rText )
+void OTableEditorCtrl::SetControlText( tools::Long nRow, sal_uInt16 nColId, const OUString& rText )
{
// Set the Browser Controls
if( nColId < FIELD_FIRST_VIRTUAL_COLUMN )
@@ -884,7 +884,7 @@ void OTableEditorCtrl::SetControlText( long nRow, sal_uInt16 nColId, const OUStr
}
}
-void OTableEditorCtrl::SetCellData( long nRow, sal_uInt16 nColId, const TOTypeInfoSP& _pTypeInfo )
+void OTableEditorCtrl::SetCellData( tools::Long nRow, sal_uInt16 nColId, const TOTypeInfoSP& _pTypeInfo )
{
// Relocate the current pointer
if( nRow == -1 )
@@ -905,7 +905,7 @@ void OTableEditorCtrl::SetCellData( long nRow, sal_uInt16 nColId, const TOTypeIn
SetControlText(nRow,nColId,_pTypeInfo ? _pTypeInfo->aUIName : OUString());
}
-void OTableEditorCtrl::SetCellData( long nRow, sal_uInt16 nColId, const css::uno::Any& _rNewData )
+void OTableEditorCtrl::SetCellData( tools::Long nRow, sal_uInt16 nColId, const css::uno::Any& _rNewData )
{
// Relocate the current pointer
if( nRow == -1 )
@@ -985,7 +985,7 @@ void OTableEditorCtrl::SetCellData( long nRow, sal_uInt16 nColId, const css::uno
SetControlText(nRow,nColId,sValue);
}
-Any OTableEditorCtrl::GetCellData( long nRow, sal_uInt16 nColId )
+Any OTableEditorCtrl::GetCellData( tools::Long nRow, sal_uInt16 nColId )
{
OFieldDescription* pFieldDescr = GetFieldDescr( nRow );
if( !pFieldDescr )
@@ -1054,19 +1054,19 @@ Any OTableEditorCtrl::GetCellData( long nRow, sal_uInt16 nColId )
return makeAny(sValue);
}
-OUString OTableEditorCtrl::GetCellText( long nRow, sal_uInt16 nColId ) const
+OUString OTableEditorCtrl::GetCellText( tools::Long nRow, sal_uInt16 nColId ) const
{
OUString sCellText;
const_cast< OTableEditorCtrl* >( this )->GetCellData( nRow, nColId ) >>= sCellText;
return sCellText;
}
-sal_uInt32 OTableEditorCtrl::GetTotalCellWidth(long nRow, sal_uInt16 nColId)
+sal_uInt32 OTableEditorCtrl::GetTotalCellWidth(tools::Long nRow, sal_uInt16 nColId)
{
return GetTextWidth(GetCellText(nRow, nColId)) + 2 * GetTextWidth("0");
}
-OFieldDescription* OTableEditorCtrl::GetFieldDescr( long nRow )
+OFieldDescription* OTableEditorCtrl::GetFieldDescr( tools::Long nRow )
{
std::vector< std::shared_ptr<OTableRow> >::size_type nListCount(
m_pRowList->size());
@@ -1148,7 +1148,7 @@ bool OTableEditorCtrl::IsCopyAllowed()
// If one of the selected rows is empty, Copy is not possible
std::shared_ptr<OTableRow> pRow;
- long nIndex = FirstSelectedRow();
+ tools::Long nIndex = FirstSelectedRow();
while( nIndex != SFX_ENDOFSELECTION )
{
pRow = (*m_pRowList)[nIndex];
@@ -1279,7 +1279,7 @@ bool OTableEditorCtrl::IsDeleteAllowed()
return GetSelectRowCount() != 0 && GetView()->getController().isDropAllowed();
}
-bool OTableEditorCtrl::IsInsertNewAllowed( long nRow )
+bool OTableEditorCtrl::IsInsertNewAllowed( tools::Long nRow )
{
bool bInsertNewAllowed = GetView()->getController().isAddAllowed();
@@ -1314,7 +1314,7 @@ bool OTableEditorCtrl::IsPrimaryKeyAllowed()
// - there are no empty entries in the selection
// - No Memo or Image entries
// - DROP is not permitted (see above) and the column is not Required (not null flag is not set).
- long nIndex = FirstSelectedRow();
+ tools::Long nIndex = FirstSelectedRow();
std::shared_ptr<OTableRow> pRow;
while( nIndex != SFX_ENDOFSELECTION )
{
@@ -1375,7 +1375,7 @@ void OTableEditorCtrl::Command(const CommandEvent& rEvt)
if( !IsReadOnly() )
{
sal_uInt16 nColId = GetColumnId(GetColumnAtXPosPixel(aMenuPos.X()));
- long nRow = GetRowAtYPosPixel(aMenuPos.Y());
+ tools::Long nRow = GetRowAtYPosPixel(aMenuPos.Y());
if ( HANDLE_ID != nColId )
{
@@ -1547,7 +1547,7 @@ void OTableEditorCtrl::SetPrimaryKey( bool bSet )
aInsertedPrimKeys.SetTotalRange( Range(0,GetRowCount()) );
if( bSet )
{
- long nIndex = FirstSelectedRow();
+ tools::Long nIndex = FirstSelectedRow();
while( nIndex != SFX_ENDOFSELECTION )
{
// Set the key
@@ -1573,7 +1573,7 @@ void OTableEditorCtrl::SetPrimaryKey( bool bSet )
bool OTableEditorCtrl::IsPrimaryKey()
{
// Are all marked fields part of the Primary Key ?
- long nPrimaryKeys = 0;
+ tools::Long nPrimaryKeys = 0;
sal_Int32 nRow=0;
for (auto const& row : *m_pRowList)
{
@@ -1591,13 +1591,13 @@ bool OTableEditorCtrl::IsPrimaryKey()
void OTableEditorCtrl::SwitchType( const TOTypeInfoSP& _pType )
{
// if there is no assigned field name
- long nRow(GetCurRow());
+ tools::Long nRow(GetCurRow());
OFieldDescription* pActFieldDescr = GetFieldDescr( nRow );
if( pActFieldDescr )
// Store the old description
pDescrWin->SaveData( pActFieldDescr );
- if ( nRow < 0 || nRow > static_cast<long>(m_pRowList->size()) )
+ if ( nRow < 0 || nRow > static_cast<tools::Long>(m_pRowList->size()) )
return;
// Show the new description
std::shared_ptr<OTableRow> pRow = (*m_pRowList)[nRow];
@@ -1648,7 +1648,7 @@ void OTableEditorCtrl::DeactivateCell(bool bUpdate)
{
OTableRowView::DeactivateCell(bUpdate);
// now we have to deactivate the field description
- long nRow(GetCurRow());
+ tools::Long nRow(GetCurRow());
if (pDescrWin)
pDescrWin->SetReadOnly(bReadOnly || !SetDataPtr(nRow) || GetActRow()->IsReadOnly());
}
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.hxx b/dbaccess/source/ui/tabledesign/TEditControl.hxx
index fc99cbd350e8..8c2608e24e2f 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.hxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.hxx
@@ -59,7 +59,7 @@ namespace dbaui
ImplSVEvent * nInvalidateTypeEvent;
ChildFocusState m_eChildFocus;
- long nOldDataPos;
+ tools::Long nOldDataPos;
bool bReadOnly;
@@ -85,29 +85,29 @@ namespace dbaui
protected:
virtual void Command( const CommandEvent& rEvt ) override;
- virtual bool SeekRow(long nRow) override;
+ virtual bool SeekRow(tools::Long nRow) override;
virtual void PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect,
sal_uInt16 nColumnId ) const override;
virtual void CursorMoved() override;
- virtual RowStatus GetRowStatus(long nRow) const override;
+ virtual RowStatus GetRowStatus(tools::Long nRow) const override;
- virtual ::svt::CellController* GetController(long nRow, sal_uInt16 nCol) override;
- virtual void InitController(::svt::CellControllerRef& rController, long nRow, sal_uInt16 nCol) override;
+ virtual ::svt::CellController* GetController(tools::Long nRow, sal_uInt16 nCol) override;
+ virtual void InitController(::svt::CellControllerRef& rController, tools::Long nRow, sal_uInt16 nCol) override;
virtual void CellModified() override;
virtual bool SaveModified() override; // is called before changing a cell (false prevents change)
- virtual OUString GetCellText(long nRow, sal_uInt16 nColId) const override;
- virtual sal_uInt32 GetTotalCellWidth(long nRow, sal_uInt16 nColId) override;
+ virtual OUString GetCellText(tools::Long nRow, sal_uInt16 nColId) const override;
+ virtual sal_uInt32 GetTotalCellWidth(tools::Long nRow, sal_uInt16 nColId) override;
virtual void CopyRows() override;
- virtual void InsertRows( long nRow ) override;
+ virtual void InsertRows( tools::Long nRow ) override;
virtual void DeleteRows() override;
- virtual void InsertNewRows( long nRow ) override;
+ virtual void InsertNewRows( tools::Long nRow ) override;
virtual bool IsPrimaryKeyAllowed() override;
- virtual bool IsInsertNewAllowed( long nRow ) override;
+ virtual bool IsInsertNewAllowed( tools::Long nRow ) override;
virtual bool IsDeleteAllowed() override;
void ClearModified();
@@ -119,7 +119,7 @@ namespace dbaui
explicit OTableEditorCtrl(vcl::Window* pParentWin, OTableDesignView* pView);
virtual ~OTableEditorCtrl() override;
virtual void dispose() override;
- virtual bool CursorMoving(long nNewRow, sal_uInt16 nNewCol) override;
+ virtual bool CursorMoving(tools::Long nNewRow, sal_uInt16 nNewCol) override;
SfxUndoManager& GetUndoManager() const;
void SetDescrWin( OTableFieldDescWin* pWin )
@@ -132,19 +132,19 @@ namespace dbaui
void SwitchType( const TOTypeInfoSP& _pType );
/// force displaying of the given row
- void DisplayData( long nRow );
+ void DisplayData( tools::Long nRow );
- virtual void SetCellData( long nRow, sal_uInt16 nColId, const TOTypeInfoSP& _pTypeInfo ) override;
- virtual void SetCellData( long nRow, sal_uInt16 nColId, const css::uno::Any& _rSaveData ) override;
- virtual css::uno::Any GetCellData( long nRow, sal_uInt16 nColId ) override;
- virtual void SetControlText( long nRow, sal_uInt16 nColId, const OUString& rText ) override;
+ virtual void SetCellData( tools::Long nRow, sal_uInt16 nColId, const TOTypeInfoSP& _pTypeInfo ) override;
+ virtual void SetCellData( tools::Long nRow, sal_uInt16 nColId, const css::uno::Any& _rSaveData ) override;
+ virtual css::uno::Any GetCellData( tools::Long nRow, sal_uInt16 nColId ) override;
+ virtual void SetControlText( tools::Long nRow, sal_uInt16 nColId, const OUString& rText ) override;
virtual OTableDesignView* GetView() const override;
std::vector< std::shared_ptr<OTableRow> >* GetRowList(){ return m_pRowList; }
const std::shared_ptr<OTableRow>& GetActRow() const { return pActRow; }
- void CellModified( long nRow, sal_uInt16 nColId );
+ void CellModified( tools::Long nRow, sal_uInt16 nColId );
void SetReadOnly( bool bRead );
virtual void Init() override;
@@ -154,7 +154,7 @@ namespace dbaui
bool IsCopyAllowed();
bool IsPasteAllowed() const;
bool IsReadOnly() const { return bReadOnly;}
- OFieldDescription* GetFieldDescr( long nRow );
+ OFieldDescription* GetFieldDescr( tools::Long nRow );
// Window overrides
virtual bool PreNotify( NotifyEvent& rNEvt ) override;
@@ -178,9 +178,9 @@ namespace dbaui
void InitCellController();
sal_Int32 HasFieldName( const OUString& rFieldName );
OUString GenerateName( const OUString& rName );
- bool SetDataPtr( long nRow );
+ bool SetDataPtr( tools::Long nRow );
- void SaveData(long nRow, sal_uInt16 nColumnId);
+ void SaveData(tools::Long nRow, sal_uInt16 nColumnId);
/** AdjustFieldDescription set the needed values for the description
@param _pFieldDesc the field description where to set the values
@param _rMultiSel contains the positions which changed for undo/redo
diff --git a/dbaccess/source/ui/tabledesign/TableDesignControl.cxx b/dbaccess/source/ui/tabledesign/TableDesignControl.cxx
index a11b0ce9a222..fd91b310a8af 100644
--- a/dbaccess/source/ui/tabledesign/TableDesignControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TableDesignControl.cxx
@@ -105,13 +105,13 @@ void OTableRowView::Command(const CommandEvent& rEvt)
}
sal_uInt16 nColId = GetColumnId(GetColumnAtXPosPixel(rEvt.GetMousePosPixel().X()));
- long nRow = GetRowAtYPosPixel(rEvt.GetMousePosPixel().Y());
+ tools::Long nRow = GetRowAtYPosPixel(rEvt.GetMousePosPixel().Y());
if ( nColId == HANDLE_ID )
{
VclBuilder aBuilder(nullptr, AllSettings::GetUIRootDir(), "dbaccess/ui/querycolmenu.ui", "");
VclPtr<PopupMenu> aContextMenu(aBuilder.get_menu("menu"));
- long nSelectRowCount = GetSelectRowCount();
+ tools::Long nSelectRowCount = GetSelectRowCount();
aContextMenu->EnableItem(aContextMenu->GetItemId("cut"), nSelectRowCount != 0);
aContextMenu->EnableItem(aContextMenu->GetItemId("copy"), nSelectRowCount != 0);
aContextMenu->EnableItem(aContextMenu->GetItemId("paste"), false);
@@ -166,12 +166,12 @@ void OTableRowView::paste()
OSL_FAIL("OTableRowView::Paste : (pseudo-) abstract method called !");
}
-void OTableRowView::Paste( long nRow )
+void OTableRowView::Paste( tools::Long nRow )
{
InsertRows( nRow );
}
-EditBrowseBox::RowStatus OTableRowView::GetRowStatus(long nRow) const
+EditBrowseBox::RowStatus OTableRowView::GetRowStatus(tools::Long nRow) const
{
if (nRow >= 0 && m_nDataPos == nRow)
return CURRENT;
diff --git a/dbaccess/source/ui/tabledesign/TableFieldControl.cxx b/dbaccess/source/ui/tabledesign/TableFieldControl.cxx
index b384dab2738e..01e25d75d05a 100644
--- a/dbaccess/source/ui/tabledesign/TableFieldControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TableFieldControl.cxx
@@ -49,7 +49,7 @@ OTableFieldControl::~OTableFieldControl()
dispose();
}
-void OTableFieldControl::CellModified(long nRow, sal_uInt16 nColId )
+void OTableFieldControl::CellModified(tools::Long nRow, sal_uInt16 nColId )
{
GetCtrl()->CellModified(nRow,nColId);
}
diff --git a/dbaccess/source/ui/tabledesign/TableFieldControl.hxx b/dbaccess/source/ui/tabledesign/TableFieldControl.hxx
index c86be18fb072..4dd53a24dd7d 100644
--- a/dbaccess/source/ui/tabledesign/TableFieldControl.hxx
+++ b/dbaccess/source/ui/tabledesign/TableFieldControl.hxx
@@ -39,7 +39,7 @@ namespace dbaui
virtual void ActivateAggregate( EControlType eType ) override;
virtual void DeactivateAggregate( EControlType eType ) override;
// are to be implemented by the derived classes
- virtual void CellModified(long nRow, sal_uInt16 nColId ) override;
+ virtual void CellModified(tools::Long nRow, sal_uInt16 nColId ) override;
virtual bool IsReadOnly() override;
virtual void SetModified(bool bModified) override;
virtual css::uno::Reference< css::util::XNumberFormatter > GetFormatter() const override;
diff --git a/dbaccess/source/ui/tabledesign/TableRow.cxx b/dbaccess/source/ui/tabledesign/TableRow.cxx
index c84ebc834410..8b91f11b287c 100644
--- a/dbaccess/source/ui/tabledesign/TableRow.cxx
+++ b/dbaccess/source/ui/tabledesign/TableRow.cxx
@@ -44,7 +44,7 @@ OTableRow::OTableRow(const Reference< XPropertySet >& xAffectedCol)
m_pActFieldDescr = new OFieldDescription(xAffectedCol);
}
-OTableRow::OTableRow( const OTableRow& rRow, long nPosition )
+OTableRow::OTableRow( const OTableRow& rRow, tools::Long nPosition )
:m_pActFieldDescr(nullptr)
,m_nPos( nPosition )
,m_bReadOnly(rRow.IsReadOnly())
diff --git a/dbaccess/source/ui/tabledesign/TableUndo.cxx b/dbaccess/source/ui/tabledesign/TableUndo.cxx
index 6cb71bc9502c..0edd32436918 100644
--- a/dbaccess/source/ui/tabledesign/TableUndo.cxx
+++ b/dbaccess/source/ui/tabledesign/TableUndo.cxx
@@ -65,7 +65,7 @@ void OTableDesignUndoAct::Redo()
}
}
-OTableDesignCellUndoAct::OTableDesignCellUndoAct( OTableRowView* pOwner, long nRowID, sal_uInt16 nColumn ) :
+OTableDesignCellUndoAct::OTableDesignCellUndoAct( OTableRowView* pOwner, tools::Long nRowID, sal_uInt16 nColumn ) :
OTableDesignUndoAct( pOwner ,STR_TABED_UNDO_CELLMODIFIED)
,m_nCol( nColumn )
,m_nRow( nRowID )
@@ -116,7 +116,7 @@ OTableEditorUndoAct::~OTableEditorUndoAct()
{
}
-OTableEditorTypeSelUndoAct::OTableEditorTypeSelUndoAct( OTableEditorCtrl* pOwner, long nRowID, sal_uInt16 nColumn, const TOTypeInfoSP& _pOldType )
+OTableEditorTypeSelUndoAct::OTableEditorTypeSelUndoAct( OTableEditorCtrl* pOwner, tools::Long nRowID, sal_uInt16 nColumn, const TOTypeInfoSP& _pOldType )
:OTableEditorUndoAct( pOwner ,STR_TABED_UNDO_TYPE_CHANGED)
,m_nCol( nColumn )
,m_nRow( nRowID )
@@ -212,7 +212,7 @@ void OTableEditorDelUndoAct::Redo()
}
OTableEditorInsUndoAct::OTableEditorInsUndoAct( OTableEditorCtrl* pOwner,
- long nInsertPosition ,
+ tools::Long nInsertPosition ,
const std::vector< std::shared_ptr<OTableRow> >& _vInsertedRows)
:OTableEditorUndoAct( pOwner,STR_TABED_UNDO_ROWINSERTED )
,m_vInsertedRows(_vInsertedRows)
@@ -240,7 +240,7 @@ void OTableEditorInsUndoAct::Undo()
void OTableEditorInsUndoAct::Redo()
{
// insert lines again
- long nInsertRow = m_nInsPos;
+ tools::Long nInsertRow = m_nInsPos;
std::shared_ptr<OTableRow> pRow;
std::vector< std::shared_ptr<OTableRow> >* pRowList = pTabEdCtrl->GetRowList();
for (auto const& insertedRow : m_vInsertedRows)
@@ -256,7 +256,7 @@ void OTableEditorInsUndoAct::Redo()
OTableEditorUndoAct::Redo();
}
-OTableEditorInsNewUndoAct::OTableEditorInsNewUndoAct( OTableEditorCtrl* pOwner, long nInsertPosition, long nInsertedRows ) :
+OTableEditorInsNewUndoAct::OTableEditorInsNewUndoAct( OTableEditorCtrl* pOwner, tools::Long nInsertPosition, tools::Long nInsertedRows ) :
OTableEditorUndoAct( pOwner ,STR_TABED_UNDO_NEWROWINSERTED)
,m_nInsPos( nInsertPosition )
,m_nInsRows( nInsertedRows )
@@ -285,7 +285,7 @@ void OTableEditorInsNewUndoAct::Redo()
// insert lines again
std::vector< std::shared_ptr<OTableRow> >* pRowList = pTabEdCtrl->GetRowList();
- for( long i=m_nInsPos; i<(m_nInsPos+m_nInsRows); i++ )
+ for( tools::Long i=m_nInsPos; i<(m_nInsPos+m_nInsRows); i++ )
pRowList->insert( pRowList->begin()+i,std::make_shared<OTableRow>() );
pTabEdCtrl->RowInserted( m_nInsPos, m_nInsRows );
@@ -310,20 +310,20 @@ void OPrimKeyUndoAct::Undo()
{
std::vector< std::shared_ptr<OTableRow> >* pRowList = pTabEdCtrl->GetRowList();
std::shared_ptr<OTableRow> pRow;
- long nIndex;
+ tools::Long nIndex;
// delete inserted keys
- for( nIndex = m_aInsKeys.FirstSelected(); nIndex != long(SFX_ENDOFSELECTION); nIndex=m_aInsKeys.NextSelected() )
+ for( nIndex = m_aInsKeys.FirstSelected(); nIndex != tools::Long(SFX_ENDOFSELECTION); nIndex=m_aInsKeys.NextSelected() )
{
- OSL_ENSURE(nIndex <= static_cast<long>(pRowList->size()),"Index for undo isn't valid!");
+ OSL_ENSURE(nIndex <= static_cast<tools::Long>(pRowList->size()),"Index for undo isn't valid!");
pRow = (*pRowList)[nIndex];
pRow->SetPrimaryKey( false );
}
// restore deleted keys
- for( nIndex = m_aDelKeys.FirstSelected(); nIndex != long(SFX_ENDOFSELECTION); nIndex=m_aDelKeys.NextSelected() )
+ for( nIndex = m_aDelKeys.FirstSelected(); nIndex != tools::Long(SFX_ENDOFSELECTION); nIndex=m_aDelKeys.NextSelected() )
{
- OSL_ENSURE(nIndex <= static_cast<long>(pRowList->size()),"Index for undo isn't valid!");
+ OSL_ENSURE(nIndex <= static_cast<tools::Long>(pRowList->size()),"Index for undo isn't valid!");
pRow = (*pRowList)[nIndex];
pRow->SetPrimaryKey( true );
}
@@ -335,14 +335,14 @@ void OPrimKeyUndoAct::Undo()
void OPrimKeyUndoAct::Redo()
{
std::vector< std::shared_ptr<OTableRow> >* pRowList = pTabEdCtrl->GetRowList();
- long nIndex;
+ tools::Long nIndex;
// delete the deleted keys
- for( nIndex = m_aDelKeys.FirstSelected(); nIndex != long(SFX_ENDOFSELECTION); nIndex=m_aDelKeys.NextSelected() )
+ for( nIndex = m_aDelKeys.FirstSelected(); nIndex != tools::Long(SFX_ENDOFSELECTION); nIndex=m_aDelKeys.NextSelected() )
(*pRowList)[nIndex]->SetPrimaryKey( false );
// restore the inserted keys
- for( nIndex = m_aInsKeys.FirstSelected(); nIndex != long(SFX_ENDOFSELECTION); nIndex=m_aInsKeys.NextSelected() )
+ for( nIndex = m_aInsKeys.FirstSelected(); nIndex != tools::Long(SFX_ENDOFSELECTION); nIndex=m_aInsKeys.NextSelected() )
(*pRowList)[nIndex]->SetPrimaryKey( true );
m_pEditorCtrl->InvalidateHandleColumn();
diff --git a/dbaccess/source/ui/tabledesign/TableUndo.hxx b/dbaccess/source/ui/tabledesign/TableUndo.hxx
index 39a0f664d7c0..f7f8d0f56d57 100644
--- a/dbaccess/source/ui/tabledesign/TableUndo.hxx
+++ b/dbaccess/source/ui/tabledesign/TableUndo.hxx
@@ -57,28 +57,28 @@ namespace dbaui
class OTableDesignCellUndoAct final : public OTableDesignUndoAct
{
sal_uInt16 m_nCol;
- long m_nRow;
+ tools::Long m_nRow;
css::uno::Any m_sOldText;
css::uno::Any m_sNewText;
virtual void Undo() override;
virtual void Redo() override;
public:
- OTableDesignCellUndoAct( OTableRowView* pOwner, long nRowID, sal_uInt16 nColumn );
+ OTableDesignCellUndoAct( OTableRowView* pOwner, tools::Long nRowID, sal_uInt16 nColumn );
virtual ~OTableDesignCellUndoAct() override;
};
class OTableEditorTypeSelUndoAct final : public OTableEditorUndoAct
{
sal_uInt16 m_nCol;
- long m_nRow;
+ tools::Long m_nRow;
TOTypeInfoSP m_pOldType;
TOTypeInfoSP m_pNewType;
virtual void Undo() override;
virtual void Redo() override;
public:
- OTableEditorTypeSelUndoAct( OTableEditorCtrl* pOwner, long nRowID, sal_uInt16 nColumn, const TOTypeInfoSP& _pOldType );
+ OTableEditorTypeSelUndoAct( OTableEditorCtrl* pOwner, tools::Long nRowID, sal_uInt16 nColumn, const TOTypeInfoSP& _pOldType );
virtual ~OTableEditorTypeSelUndoAct() override;
};
@@ -96,26 +96,26 @@ namespace dbaui
class OTableEditorInsUndoAct final : public OTableEditorUndoAct
{
std::vector< std::shared_ptr<OTableRow> > m_vInsertedRows;
- long m_nInsPos;
+ tools::Long m_nInsPos;
virtual void Undo() override;
virtual void Redo() override;
public:
OTableEditorInsUndoAct( OTableEditorCtrl* pOwner,
- long nInsertPosition,
+ tools::Long nInsertPosition,
const std::vector< std::shared_ptr<OTableRow> >& _vInsertedRows);
virtual ~OTableEditorInsUndoAct() override;
};
class OTableEditorInsNewUndoAct final : public OTableEditorUndoAct
{
- long m_nInsPos;
- long m_nInsRows;
+ tools::Long m_nInsPos;
+ tools::Long m_nInsRows;
virtual void Undo() override;
virtual void Redo() override;
public:
- OTableEditorInsNewUndoAct( OTableEditorCtrl* pOwner, long nInsertPosition, long nInsertedRows );
+ OTableEditorInsNewUndoAct( OTableEditorCtrl* pOwner, tools::Long nInsertPosition, tools::Long nInsertedRows );
virtual ~OTableEditorInsNewUndoAct() override;
};
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 68f6add5139c..858548d6b569 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -703,11 +703,11 @@ void DesktopLOKTest::testRowColumnHeaders()
pDocument->pClass->initializeForRendering(pDocument, nullptr);
- long nWidth = 0;
- long nHeight = 0;
+ tools::Long nWidth = 0;
+ tools::Long nHeight = 0;
pDocument->m_pDocumentClass->getDocumentSize(pDocument, &nWidth, &nHeight);
- long nX = rtl::math::round(nWidth / 4.0);
- long nY = rtl::math::round(nHeight / 4.0);
+ tools::Long nX = rtl::math::round(nWidth / 4.0);
+ tools::Long nY = rtl::math::round(nHeight / 4.0);
nWidth = rtl::math::round(nWidth / 2.0);
nHeight = rtl::math::round(nHeight / 2.0);
@@ -786,10 +786,10 @@ void DesktopLOKTest::testHiddenRowHeaders()
pDocument->pClass->initializeForRendering(pDocument, nullptr);
- long const nX = 0;
- long const nY = 0;
- long nWidth = 0;
- long nHeight = 0;
+ tools::Long const nX = 0;
+ tools::Long const nY = 0;
+ tools::Long nWidth = 0;
+ tools::Long nHeight = 0;
pDocument->m_pDocumentClass->getDocumentSize(pDocument, &nWidth, &nHeight);
std::stringstream aPayload;
@@ -2032,7 +2032,7 @@ void DesktopLOKTest::testCommentsWriter()
LibLODocument_Impl* pDocument = loadDoc("comments.odt");
pDocument->m_pDocumentClass->initializeForRendering(pDocument, nullptr);
- long nWidth, nHeight;
+ tools::Long nWidth, nHeight;
pDocument->m_pDocumentClass->getDocumentSize(pDocument, &nWidth, &nHeight);
// Document width alongwith without sidebar comes to be < 13000
diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx
index e58ee2f6e2e4..4d5a3bb78396 100644
--- a/desktop/source/app/cmdlineargs.cxx
+++ b/desktop/source/app/cmdlineargs.cxx
@@ -125,7 +125,7 @@ CommandLineEvent CheckOfficeURI(/* in,out */ OUString& arg, CommandLineEvent cur
return curEvt;
OUString rest2;
- long nURIlen = -1;
+ tools::Long nURIlen = -1;
// URL might be encoded
OUString decoded_rest = rest1.replaceAll("%7C", "|").replaceAll("%7c", "|");
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index de01830fb9fe..da8106bcc3e3 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -100,7 +100,7 @@ class ExtBoxWithBtns_Impl : public ExtensionBox_Impl
ExtMgrDialog* m_pParent;
void SetButtonStatus( const TEntry_Impl& rEntry );
- OString ShowPopupMenu( const Point &rPos, const long nPos );
+ OString ShowPopupMenu( const Point &rPos, const tools::Long nPos );
public:
explicit ExtBoxWithBtns_Impl(std::unique_ptr<weld::ScrolledWindow> xScroll);
@@ -111,7 +111,7 @@ public:
virtual bool Command( const CommandEvent& rCEvt ) override;
virtual void RecalcAll() override;
- virtual void selectEntry( const long nPos ) override;
+ virtual void selectEntry( const tools::Long nPos ) override;
void enableButtons( bool bEnable );
};
@@ -150,7 +150,7 @@ void ExtBoxWithBtns_Impl::RecalcAll()
//This function may be called with nPos < 0
-void ExtBoxWithBtns_Impl::selectEntry( const long nPos )
+void ExtBoxWithBtns_Impl::selectEntry( const tools::Long nPos )
{
if ( HasActive() && ( nPos == getSelIndex() ) )
return;
@@ -233,9 +233,9 @@ bool ExtBoxWithBtns_Impl::Command(const CommandEvent& rCEvt)
return true;
}
-OString ExtBoxWithBtns_Impl::ShowPopupMenu( const Point & rPos, const long nPos )
+OString ExtBoxWithBtns_Impl::ShowPopupMenu( const Point & rPos, const tools::Long nPos )
{
- if ( nPos >= static_cast<long>(getItemCount()) )
+ if ( nPos >= static_cast<tools::Long>(getItemCount()) )
return "CMD_NONE";
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(nullptr, "desktop/ui/extensionmenu.ui"));
@@ -827,7 +827,7 @@ void ExtMgrDialog::showProgress( bool _bStart )
}
-void ExtMgrDialog::updateProgress( const long nProgress )
+void ExtMgrDialog::updateProgress( const tools::Long nProgress )
{
if ( m_nProgress != nProgress )
{
@@ -1115,7 +1115,7 @@ void UpdateRequiredDialog::showProgress( bool _bStart )
}
-void UpdateRequiredDialog::updateProgress( const long nProgress )
+void UpdateRequiredDialog::updateProgress( const tools::Long nProgress )
{
if ( m_nProgress != nProgress )
{
@@ -1292,8 +1292,8 @@ bool UpdateRequiredDialog::hasActiveEntries()
::osl::MutexGuard aGuard( m_aMutex );
bool bRet = false;
- long nCount = m_xExtensionBox->GetEntryCount();
- for ( long nIndex = 0; nIndex < nCount; nIndex++ )
+ tools::Long nCount = m_xExtensionBox->GetEntryCount();
+ for ( tools::Long nIndex = 0; nIndex < nCount; nIndex++ )
{
TEntry_Impl pEntry = m_xExtensionBox->GetEntryData( nIndex );
@@ -1314,8 +1314,8 @@ void UpdateRequiredDialog::disableAllEntries()
incBusy();
- long nCount = m_xExtensionBox->GetEntryCount();
- for ( long nIndex = 0; nIndex < nCount; nIndex++ )
+ tools::Long nCount = m_xExtensionBox->GetEntryCount();
+ for ( tools::Long nIndex = 0; nIndex < nCount; nIndex++ )
{
TEntry_Impl pEntry = m_xExtensionBox->GetEntryData( nIndex );
m_pManager->getCmdQueue()->enableExtension( pEntry->m_xPackage, false );
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.hxx b/desktop/source/deployment/gui/dp_gui_dialog2.hxx
index e7e262a3add3..09f2a2e42a9f 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.hxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.hxx
@@ -64,7 +64,7 @@ public:
virtual void showProgress( bool bStart ) = 0;
virtual void updateProgress( const OUString &rText,
const css::uno::Reference< css::task::XAbortChannel > &xAbortChannel) = 0;
- virtual void updateProgress( const long nProgress ) = 0;
+ virtual void updateProgress( const tools::Long nProgress ) = 0;
virtual void updatePackageInfo( const css::uno::Reference< css::deployment::XPackage > &xPackage ) = 0;
virtual void addPackageToList( const css::uno::Reference< css::deployment::XPackage > &xPackage,
@@ -101,7 +101,7 @@ class ExtMgrDialog : public weld::GenericDialogController
bool m_bDisableWarning;
bool m_bDeleteWarning;
bool m_bClosed;
- long m_nProgress;
+ tools::Long m_nProgress;
Idle m_aIdle;
TheExtensionManager *m_pManager;
@@ -143,7 +143,7 @@ public:
virtual void showProgress( bool bStart ) override;
virtual void updateProgress( const OUString &rText,
const css::uno::Reference< css::task::XAbortChannel > &xAbortChannel) override;
- virtual void updateProgress( const long nProgress ) override;
+ virtual void updateProgress( const tools::Long nProgress ) override;
virtual void updatePackageInfo( const css::uno::Reference< css::deployment::XPackage > &xPackage ) override;
@@ -187,7 +187,7 @@ class UpdateRequiredDialog : public weld::GenericDialogController
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list