teach loplugin:constantparam about simple constructor calls
Change-Id: I7d2a28ab5951fbdb5a427c84e9ac4c1e32ecf9f9 Reviewed-on: https://gerrit.libreoffice.org/37280 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
parent
d33e262a24
commit
185ed3ddb8
@ -24,6 +24,9 @@
|
||||
$ ./compilerplugins/clang/constantparam.py
|
||||
|
||||
TODO look for OUString and OString params and check for call-params that are always either "" or default constructed
|
||||
|
||||
FIXME this plugin manages to trigger crashes inside clang, when calling EvaluateAsInt, so I end up disabling it for a handful of files
|
||||
here and there.
|
||||
*/
|
||||
|
||||
namespace {
|
||||
@ -172,7 +175,24 @@ std::string ConstantParam::getCallValue(const Expr* arg)
|
||||
return "defaultConstruct";
|
||||
}
|
||||
}
|
||||
return "unknown2";
|
||||
|
||||
// Get the expression contents.
|
||||
// This helps us find params which are always initialised with something like "OUString()".
|
||||
SourceManager& SM = compiler.getSourceManager();
|
||||
SourceLocation startLoc = arg->getLocStart();
|
||||
SourceLocation endLoc = arg->getLocEnd();
|
||||
const char *p1 = SM.getCharacterData( startLoc );
|
||||
const char *p2 = SM.getCharacterData( endLoc );
|
||||
if (!p1 || !p2 || (p2 - p1) < 0 || (p2 - p1) > 40) {
|
||||
return "unknown";
|
||||
}
|
||||
unsigned n = Lexer::MeasureTokenLength( endLoc, SM, compiler.getLangOpts());
|
||||
std::string s( p1, p2 - p1 + n);
|
||||
// strip linefeed and tab characters so they don't interfere with the parsing of the log file
|
||||
std::replace( s.begin(), s.end(), '\r', ' ');
|
||||
std::replace( s.begin(), s.end(), '\n', ' ');
|
||||
std::replace( s.begin(), s.end(), '\t', ' ');
|
||||
return s;
|
||||
}
|
||||
|
||||
bool ConstantParam::VisitCallExpr(const CallExpr * callExpr) {
|
||||
|
@ -15,19 +15,34 @@ def normalizeTypeParams( line ):
|
||||
# reading as binary (since we known it is pure ascii) is much faster than reading as unicode
|
||||
with io.open("loplugin.constantparam.log", "rb", buffering=1024*1024) as txt:
|
||||
for line in txt:
|
||||
tokens = line.strip().split("\t")
|
||||
returnType = normalizeTypeParams(tokens[0])
|
||||
nameAndParams = normalizeTypeParams(tokens[1])
|
||||
sourceLocation = tokens[2]
|
||||
paramName = tokens[3]
|
||||
paramType = normalizeTypeParams(tokens[4])
|
||||
callValue = tokens[5]
|
||||
callInfo = (returnType, nameAndParams, paramName, paramType, sourceLocation)
|
||||
if not callInfo in callDict:
|
||||
callDict[callInfo] = set()
|
||||
callDict[callInfo].add(callValue)
|
||||
try:
|
||||
tokens = line.strip().split("\t")
|
||||
returnType = normalizeTypeParams(tokens[0])
|
||||
nameAndParams = normalizeTypeParams(tokens[1])
|
||||
sourceLocation = tokens[2]
|
||||
paramName = tokens[3]
|
||||
paramType = normalizeTypeParams(tokens[4])
|
||||
callValue = tokens[5]
|
||||
callInfo = (returnType, nameAndParams, paramName, paramType, sourceLocation)
|
||||
if not callInfo in callDict:
|
||||
callDict[callInfo] = set()
|
||||
callDict[callInfo].add(callValue)
|
||||
except IndexError:
|
||||
print "problem with line " + line.strip()
|
||||
raise
|
||||
|
||||
def RepresentsInt(s):
|
||||
try:
|
||||
int(s)
|
||||
return True
|
||||
except ValueError:
|
||||
return False
|
||||
|
||||
consRegex = re.compile("^\w+\(\)$")
|
||||
|
||||
tmp1list = list()
|
||||
tmp2list = list()
|
||||
tmp3list = list()
|
||||
for callInfo, callValues in callDict.iteritems():
|
||||
nameAndParams = callInfo[1]
|
||||
if len(callValues) != 1:
|
||||
@ -51,21 +66,47 @@ for callInfo, callValues in callDict.iteritems():
|
||||
# part of our binary API
|
||||
if sourceLoc.startswith("include/LibreOfficeKit"): continue
|
||||
|
||||
v2 = callInfo[3] + " " + callInfo[2] + " " + callValue
|
||||
tmp1list.append((sourceLoc, functionSig, v2))
|
||||
if RepresentsInt(callValue):
|
||||
if callValue == "0" or callValue == "1":
|
||||
tmp1list.append((sourceLoc, functionSig, callInfo[3] + " " + callInfo[2], callValue))
|
||||
else:
|
||||
tmp2list.append((sourceLoc, functionSig, callInfo[3] + " " + callInfo[2], callValue))
|
||||
# look for places where the callsite is always a constructor invocation
|
||||
elif consRegex.match(callValue):
|
||||
if callValue.startswith("Get"): continue
|
||||
if callValue.startswith("get"): continue
|
||||
if "operator=" in functionSig: continue
|
||||
if "&&" in functionSig: continue
|
||||
tmp3list.append((sourceLoc, functionSig, callInfo[3] + " " + callInfo[2], callValue))
|
||||
|
||||
|
||||
# sort results by filename:lineno
|
||||
def natural_sort_key(s, _nsre=re.compile('([0-9]+)')):
|
||||
return [int(text) if text.isdigit() else text.lower()
|
||||
for text in re.split(_nsre, s)]
|
||||
tmp1list.sort(key=lambda v: natural_sort_key(v[0]))
|
||||
tmp2list.sort(key=lambda v: natural_sort_key(v[0]))
|
||||
tmp3list.sort(key=lambda v: natural_sort_key(v[0]))
|
||||
|
||||
# print out the results
|
||||
with open("loplugin.constantparam.report", "wt") as f:
|
||||
with open("loplugin.constantparam.report-booleans", "wt") as f:
|
||||
for v in tmp1list:
|
||||
f.write(v[0] + "\n")
|
||||
f.write(" " + v[1] + "\n")
|
||||
f.write(" " + v[2] + "\n")
|
||||
f.write(" " + v[3] + "\n")
|
||||
with open("loplugin.constantparam.report-numbers", "wt") as f:
|
||||
for v in tmp2list:
|
||||
f.write(v[0] + "\n")
|
||||
f.write(" " + v[1] + "\n")
|
||||
f.write(" " + v[2] + "\n")
|
||||
f.write(" " + v[3] + "\n")
|
||||
with open("loplugin.constantparam.report-constructors", "wt") as f:
|
||||
for v in tmp3list:
|
||||
f.write(v[0] + "\n")
|
||||
f.write(" " + v[1] + "\n")
|
||||
f.write(" " + v[2] + "\n")
|
||||
f.write(" " + v[3] + "\n")
|
||||
|
||||
# -------------------------------------------------------------
|
||||
# Now a fun set of heuristics to look for methods that
|
||||
|
@ -64,7 +64,7 @@ namespace dbaui
|
||||
const Reference< XConnection >& _rxConnection,
|
||||
const Reference< XNumberFormatter >& _rxFormatter,
|
||||
const Reference< XComponentContext >& _rxORB)
|
||||
:ODataAccessObjectTransferable( _rDatasource,OUString(), _nCommandType, _rCommand, _rxConnection )
|
||||
:ODataAccessObjectTransferable( _rDatasource, _nCommandType, _rCommand, _rxConnection )
|
||||
,m_pHtml(nullptr)
|
||||
,m_pRtf(nullptr)
|
||||
{
|
||||
@ -83,7 +83,7 @@ namespace dbaui
|
||||
const OUString& _rCommand,
|
||||
const Reference< XNumberFormatter >& _rxFormatter,
|
||||
const Reference< XComponentContext >& _rxORB)
|
||||
:ODataAccessObjectTransferable( _rDatasource, OUString(),_nCommandType, _rCommand)
|
||||
:ODataAccessObjectTransferable( _rDatasource, _nCommandType, _rCommand)
|
||||
,m_pHtml(nullptr)
|
||||
,m_pRtf(nullptr)
|
||||
{
|
||||
|
@ -590,7 +590,7 @@ void SplashScreenWindow::Paint(vcl::RenderContext& rRenderContext, const tools::
|
||||
tools::Rectangle aNativeControlRegion, aNativeContentRegion;
|
||||
|
||||
if (rRenderContext.GetNativeControlRegion(ControlType::IntroProgress, ControlPart::Entire, aDrawRect,
|
||||
ControlState::ENABLED, aValue, OUString(),
|
||||
ControlState::ENABLED, aValue,
|
||||
aNativeControlRegion, aNativeContentRegion))
|
||||
{
|
||||
long nProgressHeight = aNativeControlRegion.GetHeight();
|
||||
|
@ -62,7 +62,6 @@ namespace svx
|
||||
*/
|
||||
OColumnTransferable(
|
||||
const OUString& _rDatasource
|
||||
,const OUString& _rConnectionResource
|
||||
,const OUString& _rCommand
|
||||
,const OUString& _rFieldName
|
||||
,ColumnTransferFormatFlags _nFormats
|
||||
@ -192,8 +191,7 @@ namespace svx
|
||||
*/
|
||||
ODataAccessObjectTransferable(
|
||||
const OUString& _rDatasourceOrLocation
|
||||
,const OUString& _rConnectionResource
|
||||
,const sal_Int32 _nCommandType
|
||||
,const sal_Int32 _nCommandType
|
||||
,const OUString& _rCommand
|
||||
,const css::uno::Reference< css::sdbc::XConnection >& _rxConnection
|
||||
);
|
||||
@ -208,8 +206,7 @@ namespace svx
|
||||
*/
|
||||
ODataAccessObjectTransferable(
|
||||
const OUString& _rDatasourceOrLocation
|
||||
,const OUString& _rConnectionResource
|
||||
,const sal_Int32 _nCommandType
|
||||
,const sal_Int32 _nCommandType
|
||||
,const OUString& _rCommand
|
||||
);
|
||||
|
||||
|
@ -110,7 +110,7 @@ public:
|
||||
const SdrModel& rMod, const Point& rPos, SdrObjList* pLst, SdrInsertFlags nOptions);
|
||||
|
||||
bool Paste(const OUString& rStr, const Point& rPos, SdrObjList* pLst, SdrInsertFlags nOptions);
|
||||
bool Paste(SvStream& rInput, const OUString& rBaseURL, sal_uInt16 eFormat, const Point& rPos, SdrObjList* pLst, SdrInsertFlags nOptions);
|
||||
bool Paste(SvStream& rInput, sal_uInt16 eFormat, const Point& rPos, SdrObjList* pLst, SdrInsertFlags nOptions);
|
||||
};
|
||||
|
||||
#endif // INCLUDED_SVX_SVDXCGV_HXX
|
||||
|
@ -84,7 +84,6 @@ public:
|
||||
* a previous try).
|
||||
* @param rPassword contains a password, if available (for instance from
|
||||
* a previous try).
|
||||
* @param rAccount contains an account, if applicable.
|
||||
* @param bAllowUseSystemCredentials specifies if requesting client is
|
||||
* able to obtain and use system credentials for authentication
|
||||
*/
|
||||
@ -93,7 +92,6 @@ public:
|
||||
const OUString & rRealm,
|
||||
const OUString & rUserName,
|
||||
const OUString & rPassword,
|
||||
const OUString & rAccount,
|
||||
bool bAllowUseSystemCredentials,
|
||||
bool bAllowSessionStoring = true );
|
||||
|
||||
|
@ -52,12 +52,9 @@ public:
|
||||
* @param rTargetFolderURL contains the URL of the folder that contains
|
||||
* the clashing resource.
|
||||
* @param rClashingName contains the clashing name.
|
||||
* @param rProposedNewName contains a proposal for the new name or is
|
||||
* empty.
|
||||
*/
|
||||
SimpleNameClashResolveRequest( const OUString & rTargetFolderURL,
|
||||
const OUString & rClashingName,
|
||||
const OUString & rProposedNewName );
|
||||
const OUString & rClashingName );
|
||||
/**
|
||||
* This method returns the new name that was supplied by the interaction
|
||||
* handler.
|
||||
|
@ -1965,7 +1965,6 @@ public:
|
||||
const tools::Rectangle& rControlRegion,
|
||||
ControlState nState,
|
||||
const ImplControlValue& aValue,
|
||||
const OUString& aCaption,
|
||||
tools::Rectangle &rNativeBoundingRegion,
|
||||
tools::Rectangle &rNativeContentRegion ) const;
|
||||
///@}
|
||||
|
@ -622,12 +622,10 @@ public:
|
||||
maAddProps;
|
||||
|
||||
UIControlOptions( const OUString& i_rDependsOnName = OUString(),
|
||||
sal_Int32 i_nDependsOnEntry = -1, bool i_bAttachToDependency = false,
|
||||
const OUString& i_rGroupHint = OUString())
|
||||
sal_Int32 i_nDependsOnEntry = -1, bool i_bAttachToDependency = false)
|
||||
: maDependsOnName( i_rDependsOnName )
|
||||
, mnDependsOnEntry( i_nDependsOnEntry )
|
||||
, mbAttachToDependency( i_bAttachToDependency )
|
||||
, maGroupHint( i_rGroupHint )
|
||||
, mbInternalOnly( false )
|
||||
, mbEnabled( true ) {}
|
||||
};
|
||||
|
@ -204,7 +204,7 @@ private:
|
||||
SAL_DLLPRIVATE void ImplUpdateInputEnable();
|
||||
SAL_DLLPRIVATE void ImplFillLayoutData();
|
||||
SAL_DLLPRIVATE bool ImplHasClippedItems();
|
||||
SAL_DLLPRIVATE Point ImplGetPopupPosition( const tools::Rectangle& rRect, const Size& rSize ) const;
|
||||
SAL_DLLPRIVATE Point ImplGetPopupPosition( const tools::Rectangle& rRect ) const;
|
||||
SAL_DLLPRIVATE bool ImplIsFloatingMode() const;
|
||||
SAL_DLLPRIVATE bool ImplIsInPopupMode() const;
|
||||
SAL_DLLPRIVATE const OUString& ImplGetHelpText( sal_uInt16 nItemId ) const;
|
||||
|
@ -1182,7 +1182,7 @@ public:
|
||||
ScrollBar* pVScrl );
|
||||
|
||||
void SaveBackground( const Point& rPos, const Size& rSize,
|
||||
const Point& rDestOff, VirtualDevice& rSaveDevice );
|
||||
VirtualDevice& rSaveDevice );
|
||||
|
||||
virtual const SystemEnvData* GetSystemData() const;
|
||||
css::uno::Any GetSystemDataAny() const;
|
||||
|
@ -496,7 +496,6 @@ protected:
|
||||
|
||||
/// @throws css::uno::RuntimeException
|
||||
void SetArrayFormula_Impl( const OUString& rFormula,
|
||||
const OUString& rFormulaNmsp,
|
||||
const formula::FormulaGrammar::Grammar eGrammar );
|
||||
|
||||
public:
|
||||
|
@ -1955,7 +1955,7 @@ void ScXMLExport::ExportStyles_( bool bUsed )
|
||||
sal_Int32 nShapesCount(0);
|
||||
CollectSharedData(nTableCount, nShapesCount);
|
||||
}
|
||||
rtl::Reference<ScXMLStyleExport> aStylesExp(new ScXMLStyleExport(*this, OUString(), GetAutoStylePool().get()));
|
||||
rtl::Reference<ScXMLStyleExport> aStylesExp(new ScXMLStyleExport(*this, GetAutoStylePool().get()));
|
||||
if (GetModel().is())
|
||||
{
|
||||
uno::Reference <lang::XMultiServiceFactory> xMultiServiceFactory(GetModel(), uno::UNO_QUERY);
|
||||
|
@ -832,9 +832,8 @@ void ScXMLStyleExport::exportStyleContent( const css::uno::Reference<css::style:
|
||||
|
||||
ScXMLStyleExport::ScXMLStyleExport(
|
||||
SvXMLExport& rExp,
|
||||
const OUString& rPoolStyleName,
|
||||
SvXMLAutoStylePoolP *pAutoStyleP )
|
||||
: XMLStyleExport(rExp, rPoolStyleName, pAutoStyleP)
|
||||
: XMLStyleExport(rExp, OUString(), pAutoStyleP)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -216,7 +216,6 @@ class ScXMLStyleExport : public XMLStyleExport
|
||||
public:
|
||||
ScXMLStyleExport(
|
||||
SvXMLExport& rExp,
|
||||
const OUString& rPoolStyleName,
|
||||
SvXMLAutoStylePoolP *pAutoStyleP );
|
||||
virtual ~ScXMLStyleExport() override;
|
||||
};
|
||||
|
@ -5014,7 +5014,7 @@ OUString SAL_CALL ScCellRangeObj::getArrayFormula()
|
||||
}
|
||||
|
||||
void ScCellRangeObj::SetArrayFormula_Impl(const OUString& rFormula,
|
||||
const OUString& rFormulaNmsp, const formula::FormulaGrammar::Grammar eGrammar)
|
||||
const formula::FormulaGrammar::Grammar eGrammar)
|
||||
{
|
||||
ScDocShell* pDocSh = GetDocShell();
|
||||
if (pDocSh)
|
||||
@ -5027,7 +5027,7 @@ void ScCellRangeObj::SetArrayFormula_Impl(const OUString& rFormula,
|
||||
throw uno::RuntimeException();
|
||||
}
|
||||
|
||||
pDocSh->GetDocFunc().EnterMatrix( aRange, nullptr, nullptr, rFormula, true, true, rFormulaNmsp, eGrammar );
|
||||
pDocSh->GetDocFunc().EnterMatrix( aRange, nullptr, nullptr, rFormula, true, true, OUString()/*rFormulaNmsp*/, eGrammar );
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -5044,7 +5044,7 @@ void SAL_CALL ScCellRangeObj::setArrayFormula( const OUString& aFormula )
|
||||
{
|
||||
SolarMutexGuard aGuard;
|
||||
// GRAM_API for API compatibility.
|
||||
SetArrayFormula_Impl( aFormula, OUString(), formula::FormulaGrammar::GRAM_API);
|
||||
SetArrayFormula_Impl( aFormula, formula::FormulaGrammar::GRAM_API);
|
||||
}
|
||||
|
||||
// XArrayFormulaTokens
|
||||
|
@ -606,7 +606,7 @@ void OutlineToImpressFinalizer::operator() (bool)
|
||||
sd::OutlineView* pView = static_cast<sd::OutlineView*>(pOutlineShell->GetView());
|
||||
// mba: the stream can't contain any relative URLs, because we don't
|
||||
// have any information about a BaseURL!
|
||||
if ( pOutlineShell->ReadRtf(*mpStream, OUString()) == 0 )
|
||||
if ( pOutlineShell->ReadRtf(*mpStream) == 0 )
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -111,7 +111,7 @@ public:
|
||||
virtual bool KeyInput(const KeyEvent& rKEvt, ::sd::Window* pWin) override;
|
||||
virtual void MouseButtonUp(const MouseEvent& rMEvt, ::sd::Window* pWin) override;
|
||||
|
||||
sal_uLong ReadRtf(SvStream& rInput, const OUString& rBaseURL);
|
||||
sal_uLong ReadRtf(SvStream& rInput);
|
||||
|
||||
virtual void WriteUserDataSequence ( css::uno::Sequence < css::beans::PropertyValue >&, bool bBrowse ) override;
|
||||
virtual void ReadUserDataSequence ( const css::uno::Sequence < css::beans::PropertyValue >&, bool bBrowse ) override;
|
||||
|
@ -57,17 +57,12 @@ public:
|
||||
The page to render.
|
||||
@param nWidth
|
||||
The width of the preview in device coordinates.
|
||||
@param sSubstitutionText
|
||||
When the actual preview can not be created for some reason, then
|
||||
this text is painted in an empty rectangle of the requested size
|
||||
instead.
|
||||
The high contrast mode of the application is
|
||||
ignored and the preview is rendered in normal mode.
|
||||
*/
|
||||
Image RenderPage (
|
||||
const SdPage* pPage,
|
||||
const sal_Int32 nWidth,
|
||||
const OUString& sSubstitutionText);
|
||||
const sal_Int32 nWidth);
|
||||
|
||||
/** Render a page with the given pixel size.
|
||||
@param pPage
|
||||
|
@ -57,8 +57,7 @@ Image PagePreviewProvider::operator () (
|
||||
// object.
|
||||
aPreview = rRenderer.RenderPage(
|
||||
pPage,
|
||||
nWidth,
|
||||
OUString());
|
||||
nWidth);
|
||||
}
|
||||
|
||||
return aPreview;
|
||||
|
@ -82,8 +82,7 @@ PreviewRenderer::~PreviewRenderer()
|
||||
|
||||
Image PreviewRenderer::RenderPage (
|
||||
const SdPage* pPage,
|
||||
const sal_Int32 nWidth,
|
||||
const OUString& rSubstitutionText)
|
||||
const sal_Int32 nWidth)
|
||||
{
|
||||
if (pPage != nullptr)
|
||||
{
|
||||
@ -96,7 +95,7 @@ Image PreviewRenderer::RenderPage (
|
||||
return RenderPage (
|
||||
pPage,
|
||||
Size(nWidth,nHeight),
|
||||
rSubstitutionText,
|
||||
OUString(),
|
||||
false/*bObeyHighContrastMode*/);
|
||||
}
|
||||
else
|
||||
|
@ -1750,7 +1750,7 @@ void OutlineViewShell::UpdateOutlineObject( SdPage* pPage, Paragraph* pPara )
|
||||
/**
|
||||
* Fill Outliner from Stream
|
||||
*/
|
||||
sal_uLong OutlineViewShell::ReadRtf(SvStream& rInput, const OUString& rBaseURL)
|
||||
sal_uLong OutlineViewShell::ReadRtf(SvStream& rInput)
|
||||
{
|
||||
sal_uLong bRet = 0;
|
||||
|
||||
@ -1759,7 +1759,7 @@ sal_uLong OutlineViewShell::ReadRtf(SvStream& rInput, const OUString& rBaseURL)
|
||||
OutlineViewPageChangesGuard aGuard( pOlView );
|
||||
OutlineViewModelChangeGuard aGuard2( *pOlView );
|
||||
|
||||
bRet = rOutl.Read( rInput, rBaseURL, EE_FORMAT_RTF, GetDocSh()->GetHeaderAttributes() );
|
||||
bRet = rOutl.Read( rInput, OUString(), EE_FORMAT_RTF, GetDocSh()->GetHeaderAttributes() );
|
||||
|
||||
SdPage* pPage = GetDoc()->GetSdPage( GetDoc()->GetSdPageCount(PageKind::Standard) - 1, PageKind::Standard );
|
||||
SfxStyleSheet* pTitleSheet = pPage->GetStyleSheetForPresObj( PRESOBJ_TITLE );
|
||||
|
@ -1388,7 +1388,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
|
||||
{
|
||||
xStm->Seek( 0 );
|
||||
// mba: clipboard always must contain absolute URLs (could be from alien source)
|
||||
bReturn = SdrView::Paste( *xStm, OUString(), EE_FORMAT_HTML, maDropPos, pPage, nPasteOptions );
|
||||
bReturn = SdrView::Paste( *xStm, EE_FORMAT_HTML, maDropPos, pPage, nPasteOptions );
|
||||
}
|
||||
}
|
||||
|
||||
@ -1417,7 +1417,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
|
||||
|
||||
if( !bReturn )
|
||||
// mba: clipboard always must contain absolute URLs (could be from alien source)
|
||||
bReturn = SdrView::Paste( *xStm, OUString(), EE_FORMAT_BIN, maDropPos, pPage, nPasteOptions );
|
||||
bReturn = SdrView::Paste( *xStm, EE_FORMAT_BIN, maDropPos, pPage, nPasteOptions );
|
||||
}
|
||||
}
|
||||
|
||||
@ -1453,7 +1453,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
|
||||
|
||||
if( !bReturn )
|
||||
// mba: clipboard always must contain absolute URLs (could be from alien source)
|
||||
bReturn = SdrView::Paste( *xStm, OUString(), EE_FORMAT_RTF, maDropPos, pPage, nPasteOptions );
|
||||
bReturn = SdrView::Paste( *xStm, EE_FORMAT_RTF, maDropPos, pPage, nPasteOptions );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1136,7 +1136,7 @@ void PresenterController::LoadTheme (const Reference<XPane>& rxPane)
|
||||
{
|
||||
// Create (load) the current theme.
|
||||
if (rxPane.is())
|
||||
mpTheme.reset(new PresenterTheme(mxComponentContext, OUString(), rxPane->getCanvas()));
|
||||
mpTheme.reset(new PresenterTheme(mxComponentContext, rxPane->getCanvas()));
|
||||
}
|
||||
|
||||
double PresenterController::GetSlideAspectRatio() const
|
||||
|
@ -29,7 +29,6 @@ namespace sdext { namespace presenter {
|
||||
|
||||
PresenterFrameworkObserver::PresenterFrameworkObserver (
|
||||
const css::uno::Reference<css::drawing::framework::XConfigurationController>&rxController,
|
||||
const OUString& rsEventName,
|
||||
const Predicate& rPredicate,
|
||||
const Action& rAction)
|
||||
: PresenterFrameworkObserverInterfaceBase(m_aMutex),
|
||||
@ -42,13 +41,6 @@ PresenterFrameworkObserver::PresenterFrameworkObserver (
|
||||
|
||||
if (mxConfigurationController->hasPendingRequests())
|
||||
{
|
||||
if (!rsEventName.isEmpty())
|
||||
{
|
||||
mxConfigurationController->addConfigurationChangeListener(
|
||||
this,
|
||||
rsEventName,
|
||||
Any());
|
||||
}
|
||||
mxConfigurationController->addConfigurationChangeListener(
|
||||
this,
|
||||
"ConfigurationUpdateEnd",
|
||||
@ -70,7 +62,6 @@ void PresenterFrameworkObserver::RunOnUpdateEnd (
|
||||
{
|
||||
new PresenterFrameworkObserver(
|
||||
rxController,
|
||||
OUString(),
|
||||
&PresenterFrameworkObserver::True,
|
||||
rAction);
|
||||
}
|
||||
|
@ -62,10 +62,6 @@ private:
|
||||
Action maAction;
|
||||
|
||||
/** Create a new PresenterFrameworkObserver object.
|
||||
@param rsEventName
|
||||
An event name other than ConfigurationUpdateEnd. When the
|
||||
observer shall only listen for ConfigurationUpdateEnd then pass
|
||||
an empty name.
|
||||
@param rPredicate
|
||||
This functor tests whether the action is to be executed or not.
|
||||
@param rAction
|
||||
@ -74,7 +70,6 @@ private:
|
||||
*/
|
||||
PresenterFrameworkObserver (
|
||||
const css::uno::Reference<css::drawing::framework::XConfigurationController>&rxController,
|
||||
const OUString& rsEventName,
|
||||
const Predicate& rPredicate,
|
||||
const Action& rAction);
|
||||
virtual ~PresenterFrameworkObserver() override;
|
||||
|
@ -303,7 +303,7 @@ bool PresenterPaneBorderPainter::ProvideTheme (const Reference<rendering::XCanva
|
||||
}
|
||||
else
|
||||
{
|
||||
mpTheme.reset(new PresenterTheme(mxContext, OUString(), rxCanvas));
|
||||
mpTheme.reset(new PresenterTheme(mxContext, rxCanvas));
|
||||
bModified = true;
|
||||
}
|
||||
|
||||
|
@ -174,7 +174,7 @@ Reference<XResource> SAL_CALL PresenterPaneFactory::createResource (
|
||||
}
|
||||
|
||||
// No. Create a new one.
|
||||
Reference<XResource> xResource = CreatePane(rxPaneId, OUString());
|
||||
Reference<XResource> xResource = CreatePane(rxPaneId);
|
||||
return xResource;
|
||||
}
|
||||
|
||||
@ -214,8 +214,7 @@ void SAL_CALL PresenterPaneFactory::releaseResource (const Reference<XResource>&
|
||||
|
||||
|
||||
Reference<XResource> PresenterPaneFactory::CreatePane (
|
||||
const Reference<XResourceId>& rxPaneId,
|
||||
const OUString& rsTitle)
|
||||
const Reference<XResourceId>& rxPaneId)
|
||||
{
|
||||
if ( ! rxPaneId.is())
|
||||
return nullptr;
|
||||
@ -236,7 +235,7 @@ Reference<XResource> PresenterPaneFactory::CreatePane (
|
||||
{
|
||||
return CreatePane(
|
||||
rxPaneId,
|
||||
rsTitle,
|
||||
OUString(),
|
||||
xParentPane,
|
||||
rxPaneId->getFullResourceURL().Arguments == "Sprite=1");
|
||||
}
|
||||
|
@ -101,8 +101,7 @@ private:
|
||||
void Register (const css::uno::Reference<css::frame::XController>& rxController);
|
||||
|
||||
css::uno::Reference<css::drawing::framework::XResource> CreatePane (
|
||||
const css::uno::Reference<css::drawing::framework::XResourceId>& rxPaneId,
|
||||
const OUString& rsTitle);
|
||||
const css::uno::Reference<css::drawing::framework::XResourceId>& rxPaneId);
|
||||
css::uno::Reference<css::drawing::framework::XResource> CreatePane (
|
||||
const css::uno::Reference<css::drawing::framework::XResourceId>& rxPaneId,
|
||||
const OUString& rsTitle,
|
||||
|
@ -261,10 +261,8 @@ private:
|
||||
|
||||
PresenterTheme::PresenterTheme (
|
||||
const css::uno::Reference<css::uno::XComponentContext>& rxContext,
|
||||
const OUString& rsThemeName,
|
||||
const css::uno::Reference<css::rendering::XCanvas>& rxCanvas)
|
||||
: mxContext(rxContext),
|
||||
msThemeName(rsThemeName),
|
||||
mpTheme(),
|
||||
mxCanvas(rxCanvas)
|
||||
{
|
||||
|
@ -60,7 +60,6 @@ class PresenterTheme
|
||||
public:
|
||||
PresenterTheme (
|
||||
const css::uno::Reference<css::uno::XComponentContext>& rxContext,
|
||||
const OUString& rsThemeName,
|
||||
const css::uno::Reference<css::rendering::XCanvas>& rxCanvas);
|
||||
~PresenterTheme();
|
||||
|
||||
|
@ -23,8 +23,7 @@
|
||||
class SFX2_DLLPUBLIC SfxBluetoothModel:public SfxMailModel
|
||||
{
|
||||
public:
|
||||
SendMailResult SaveAndSend( const css::uno::Reference< css::frame::XFrame >& xFrame,
|
||||
const OUString& rType );
|
||||
SendMailResult SaveAndSend( const css::uno::Reference< css::frame::XFrame >& xFrame );
|
||||
SendMailResult Send( const css::uno::Reference< css::frame::XFrame >& xFrame );
|
||||
};
|
||||
|
||||
|
@ -17,14 +17,13 @@
|
||||
|
||||
#include "bluthsndapi.hxx"
|
||||
|
||||
SfxBluetoothModel::SendMailResult SfxBluetoothModel::SaveAndSend( const css::uno::Reference< css::frame::XFrame >& xFrame,
|
||||
const OUString& rType )
|
||||
SfxBluetoothModel::SendMailResult SfxBluetoothModel::SaveAndSend( const css::uno::Reference< css::frame::XFrame >& xFrame )
|
||||
{
|
||||
SaveResult eSaveResult;
|
||||
SendMailResult eResult = SEND_MAIL_ERROR;
|
||||
OUString aFileName;
|
||||
|
||||
eSaveResult = SaveDocumentAsFormat( OUString(), xFrame, rType, aFileName );
|
||||
eSaveResult = SaveDocumentAsFormat( OUString(), xFrame, OUString(), aFileName );
|
||||
if( eSaveResult == SAVE_SUCCESSFULL )
|
||||
{
|
||||
maAttachedDocuments.push_back( aFileName );
|
||||
|
@ -538,7 +538,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
|
||||
HiddenWarningFact::WhenSaving, &GetViewFrame()->GetWindow() ) != RET_YES )
|
||||
break;
|
||||
uno::Reference < frame::XFrame > xFrame( pFrame->GetFrame().GetFrameInterface() );
|
||||
SfxMailModel::SendMailResult eResult = aModel.SaveAndSend( xFrame, OUString() );
|
||||
SfxMailModel::SendMailResult eResult = aModel.SaveAndSend( xFrame );
|
||||
if( eResult == SfxMailModel::SEND_MAIL_ERROR )
|
||||
{
|
||||
ScopedVclPtrInstance< MessageDialog > aBox(SfxGetpApp()->GetTopWindow(), SfxResId( STR_ERROR_SEND_MAIL ), VclMessageType::Info);
|
||||
|
@ -306,7 +306,7 @@ public:
|
||||
void GetState(SfxItemSet &);
|
||||
|
||||
void Impl_Print( OutputDevice &rOutDev, const SmPrintUIOptions &rPrintUIOptions,
|
||||
tools::Rectangle aOutRect, Point aZeroPoint );
|
||||
tools::Rectangle aOutRect );
|
||||
|
||||
/** Set bInsertIntoEditWindow so we know where to insert
|
||||
*
|
||||
|
@ -1049,7 +1049,7 @@ void SAL_CALL SmModel::render(
|
||||
m_pPrintUIOptions.reset(new SmPrintUIOptions);
|
||||
m_pPrintUIOptions->processProperties( rxOptions );
|
||||
|
||||
pView->Impl_Print( *pOut, *m_pPrintUIOptions, tools::Rectangle( OutputRect ), Point() );
|
||||
pView->Impl_Print( *pOut, *m_pPrintUIOptions, tools::Rectangle( OutputRect ) );
|
||||
|
||||
// release SmPrintUIOptions when everything is done.
|
||||
// That way, when SmPrintUIOptions is needed again it will read the latest configuration settings in its c-tor.
|
||||
|
@ -1093,7 +1093,7 @@ void SmViewShell::DrawText(OutputDevice& rDevice, const Point& rPosition, const
|
||||
while ( nPos >= 0 );
|
||||
}
|
||||
|
||||
void SmViewShell::Impl_Print(OutputDevice &rOutDev, const SmPrintUIOptions &rPrintUIOptions, tools::Rectangle aOutRect, Point aZeroPoint )
|
||||
void SmViewShell::Impl_Print(OutputDevice &rOutDev, const SmPrintUIOptions &rPrintUIOptions, tools::Rectangle aOutRect )
|
||||
{
|
||||
const bool bIsPrintTitle = rPrintUIOptions.getBoolValue( PRTUIOPT_TITLE_ROW, true );
|
||||
const bool bIsPrintFrame = rPrintUIOptions.getBoolValue( PRTUIOPT_BORDER, true );
|
||||
@ -1207,7 +1207,7 @@ void SmViewShell::Impl_Print(OutputDevice &rOutDev, const SmPrintUIOptions &rPri
|
||||
nZ -= 10;
|
||||
Fraction aFraction (std::max(MINZOOM, std::min(MAXZOOM, nZ)), 100);
|
||||
|
||||
OutputMapMode = MapMode(MapUnit::Map100thMM, aZeroPoint, aFraction, aFraction);
|
||||
OutputMapMode = MapMode(MapUnit::Map100thMM, Point(), aFraction, aFraction);
|
||||
}
|
||||
else
|
||||
OutputMapMode = MapMode(MapUnit::Map100thMM);
|
||||
@ -1217,7 +1217,7 @@ void SmViewShell::Impl_Print(OutputDevice &rOutDev, const SmPrintUIOptions &rPri
|
||||
{
|
||||
Fraction aFraction( nZoomFactor, 100 );
|
||||
|
||||
OutputMapMode = MapMode(MapUnit::Map100thMM, aZeroPoint, aFraction, aFraction);
|
||||
OutputMapMode = MapMode(MapUnit::Map100thMM, Point(), aFraction, aFraction);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -351,7 +351,6 @@ void SvLBoxButton::ImplAdjustBoxSize(Size& io_rSize, ControlType i_eType, vcl::R
|
||||
aCtrlRegion,
|
||||
nState,
|
||||
aControlValue,
|
||||
OUString(),
|
||||
aNativeBounds,
|
||||
aNativeContent );
|
||||
if( bNativeOK )
|
||||
|
@ -525,7 +525,7 @@ static long ImplGetNativeCheckAndRadioSize(vcl::RenderContext& rRenderContext, l
|
||||
if (rRenderContext.IsNativeControlSupported(ControlType::MenuPopup, ControlPart::MenuItemCheckMark))
|
||||
{
|
||||
if (rRenderContext.GetNativeControlRegion(ControlType::MenuPopup, ControlPart::MenuItemCheckMark,
|
||||
aCtrlRegion, ControlState::ENABLED, aVal, OUString(),
|
||||
aCtrlRegion, ControlState::ENABLED, aVal,
|
||||
aNativeBounds, aNativeContent)
|
||||
)
|
||||
{
|
||||
@ -536,7 +536,7 @@ static long ImplGetNativeCheckAndRadioSize(vcl::RenderContext& rRenderContext, l
|
||||
if (rRenderContext.IsNativeControlSupported(ControlType::MenuPopup, ControlPart::MenuItemRadioMark))
|
||||
{
|
||||
if (rRenderContext.GetNativeControlRegion(ControlType::MenuPopup, ControlPart::MenuItemRadioMark,
|
||||
aCtrlRegion, ControlState::ENABLED, aVal, OUString(),
|
||||
aCtrlRegion, ControlState::ENABLED, aVal,
|
||||
aNativeBounds, aNativeContent)
|
||||
)
|
||||
{
|
||||
|
@ -652,7 +652,7 @@ namespace svt { namespace table
|
||||
|
||||
if ( m_pImpl->isAccessibleAlive() )
|
||||
{
|
||||
m_pImpl->commitAccessibleEvent( AccessibleEventId::SELECTION_CHANGED, Any(), Any() );
|
||||
m_pImpl->commitAccessibleEvent( AccessibleEventId::SELECTION_CHANGED );
|
||||
|
||||
m_pImpl->commitTableEvent( AccessibleEventId::ACTIVE_DESCENDANT_CHANGED, Any(), Any() );
|
||||
// TODO: why do we notify this when the *selection* changed? Shouldn't we find a better place for this,
|
||||
|
@ -2318,9 +2318,9 @@ namespace svt { namespace table
|
||||
}
|
||||
|
||||
|
||||
void TableControl_Impl::commitAccessibleEvent( sal_Int16 const i_eventID, const Any& i_newValue, const Any& i_oldValue )
|
||||
void TableControl_Impl::commitAccessibleEvent( sal_Int16 const i_eventID )
|
||||
{
|
||||
impl_commitAccessibleEvent( i_eventID, i_newValue, i_oldValue );
|
||||
impl_commitAccessibleEvent( i_eventID, Any(), Any() );
|
||||
}
|
||||
|
||||
|
||||
|
@ -238,7 +238,7 @@ namespace svt { namespace table
|
||||
*/
|
||||
bool markAllRowsAsSelected();
|
||||
|
||||
void commitAccessibleEvent( sal_Int16 const i_eventID, const css::uno::Any& i_newValue, const css::uno::Any& i_oldValue );
|
||||
void commitAccessibleEvent( sal_Int16 const i_eventID );
|
||||
void commitCellEvent( sal_Int16 const i_eventID, const css::uno::Any& i_newValue, const css::uno::Any& i_oldValue );
|
||||
void commitTableEvent( sal_Int16 const i_eventID, const css::uno::Any& i_newValue, const css::uno::Any& i_oldValue );
|
||||
|
||||
|
@ -44,13 +44,12 @@ namespace svx
|
||||
using namespace ::comphelper;
|
||||
|
||||
OColumnTransferable::OColumnTransferable(const OUString& _rDatasource
|
||||
,const OUString& _rConnectionResource
|
||||
,const OUString& _rCommand
|
||||
,const OUString& _rFieldName
|
||||
,ColumnTransferFormatFlags _nFormats)
|
||||
:m_nFormatFlags(_nFormats)
|
||||
{
|
||||
implConstruct(_rDatasource,_rConnectionResource, css::sdb::CommandType::TABLE, _rCommand, _rFieldName);
|
||||
implConstruct(_rDatasource,OUString(), css::sdb::CommandType::TABLE, _rCommand, _rFieldName);
|
||||
}
|
||||
|
||||
|
||||
@ -371,23 +370,21 @@ namespace svx
|
||||
|
||||
ODataAccessObjectTransferable::ODataAccessObjectTransferable(
|
||||
const OUString& _rDatasource
|
||||
,const OUString& _rConnectionResource
|
||||
,const sal_Int32 _nCommandType
|
||||
,const sal_Int32 _nCommandType
|
||||
,const OUString& _rCommand
|
||||
)
|
||||
{
|
||||
construct(_rDatasource,_rConnectionResource,_nCommandType,_rCommand,nullptr,(CommandType::COMMAND == _nCommandType),_rCommand);
|
||||
construct(_rDatasource,OUString(),_nCommandType,_rCommand,nullptr,(CommandType::COMMAND == _nCommandType),_rCommand);
|
||||
}
|
||||
|
||||
ODataAccessObjectTransferable::ODataAccessObjectTransferable(
|
||||
const OUString& _rDatasource
|
||||
,const OUString& _rConnectionResource
|
||||
,const sal_Int32 _nCommandType
|
||||
,const sal_Int32 _nCommandType
|
||||
,const OUString& _rCommand
|
||||
,const Reference< XConnection >& _rxConnection)
|
||||
{
|
||||
OSL_ENSURE(_rxConnection.is(),"Wrong ctor used.!");
|
||||
construct(_rDatasource,_rConnectionResource,_nCommandType,_rCommand,_rxConnection,(CommandType::COMMAND == _nCommandType),_rCommand);
|
||||
construct(_rDatasource,OUString(),_nCommandType,_rCommand,_rxConnection,(CommandType::COMMAND == _nCommandType),_rCommand);
|
||||
}
|
||||
|
||||
|
||||
|
@ -165,7 +165,7 @@ bool SdrExchangeView::Paste(const OUString& rStr, const Point& rPos, SdrObjList*
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SdrExchangeView::Paste(SvStream& rInput, const OUString& rBaseURL, sal_uInt16 eFormat, const Point& rPos, SdrObjList* pLst, SdrInsertFlags nOptions)
|
||||
bool SdrExchangeView::Paste(SvStream& rInput, sal_uInt16 eFormat, const Point& rPos, SdrObjList* pLst, SdrInsertFlags nOptions)
|
||||
{
|
||||
Point aPos(rPos);
|
||||
ImpGetPasteObjList(aPos,pLst);
|
||||
@ -193,7 +193,7 @@ bool SdrExchangeView::Paste(SvStream& rInput, const OUString& rBaseURL, sal_uInt
|
||||
|
||||
pObj->SetMergedItemSet(aTempAttr);
|
||||
|
||||
pObj->NbcSetText(rInput,rBaseURL,eFormat);
|
||||
pObj->NbcSetText(rInput,OUString(),eFormat);
|
||||
pObj->FitFrameToTextSize();
|
||||
Size aSiz(pObj->GetLogicRect().GetSize());
|
||||
MapUnit eMap=mpModel->GetScaleUnit();
|
||||
|
@ -542,7 +542,6 @@ public:
|
||||
::sw::mark::IMark* SetBookmark(
|
||||
const vcl::KeyCode&,
|
||||
const OUString& rName,
|
||||
const OUString& rShortName,
|
||||
IDocumentMarkAccess::MarkType eMark = IDocumentMarkAccess::MarkType::BOOKMARK);
|
||||
bool GotoMark( const ::sw::mark::IMark* const pMark ); // sets CurrentCursor.SPoint
|
||||
bool GotoMark( const ::sw::mark::IMark* const pMark, bool bAtStart );
|
||||
|
@ -78,7 +78,6 @@ protected:
|
||||
|
||||
public:
|
||||
SwDocStyleSheet( SwDoc& rDoc,
|
||||
const OUString& rName,
|
||||
SwDocStyleSheetPool* pPool);
|
||||
|
||||
SwDocStyleSheet( const SwDocStyleSheet& );
|
||||
|
@ -80,7 +80,6 @@ namespace
|
||||
::sw::mark::IMark* SwCursorShell::SetBookmark(
|
||||
const vcl::KeyCode& rCode,
|
||||
const OUString& rName,
|
||||
const OUString& rShortName,
|
||||
IDocumentMarkAccess::MarkType eMark)
|
||||
{
|
||||
StartAction();
|
||||
@ -92,7 +91,7 @@ namespace
|
||||
if(pBookmark)
|
||||
{
|
||||
pBookmark->SetKeyCode(rCode);
|
||||
pBookmark->SetShortName(rShortName);
|
||||
pBookmark->SetShortName(OUString());
|
||||
}
|
||||
EndAction();
|
||||
return pMark;
|
||||
|
@ -70,9 +70,8 @@ namespace sw { namespace mark
|
||||
|
||||
CrossRefHeadingBookmark::CrossRefHeadingBookmark(const SwPaM& rPaM,
|
||||
const vcl::KeyCode& rCode,
|
||||
const OUString& rName,
|
||||
const OUString& rShortName)
|
||||
: CrossRefBookmark(rPaM, rCode, rName, rShortName, IDocumentMarkAccess::GetCrossRefHeadingBookmarkNamePrefix()+"_Toc")
|
||||
const OUString& rName)
|
||||
: CrossRefBookmark(rPaM, rCode, rName, OUString(), IDocumentMarkAccess::GetCrossRefHeadingBookmarkNamePrefix()+"_Toc")
|
||||
{ }
|
||||
|
||||
bool CrossRefHeadingBookmark::IsLegalName(const OUString& rName)
|
||||
@ -82,9 +81,8 @@ namespace sw { namespace mark
|
||||
|
||||
CrossRefNumItemBookmark::CrossRefNumItemBookmark(const SwPaM& rPaM,
|
||||
const vcl::KeyCode& rCode,
|
||||
const OUString& rName,
|
||||
const OUString& rShortName)
|
||||
: CrossRefBookmark(rPaM, rCode, rName, rShortName, CrossRefNumItemBookmark_NamePrefix)
|
||||
const OUString& rName)
|
||||
: CrossRefBookmark(rPaM, rCode, rName, OUString(), CrossRefNumItemBookmark_NamePrefix)
|
||||
{ }
|
||||
|
||||
bool CrossRefNumItemBookmark::IsLegalName(const OUString& rName)
|
||||
|
@ -415,10 +415,10 @@ namespace sw { namespace mark
|
||||
pMark = std::shared_ptr<IMark>(new DdeBookmark(rPaM));
|
||||
break;
|
||||
case IDocumentMarkAccess::MarkType::CROSSREF_HEADING_BOOKMARK:
|
||||
pMark = std::shared_ptr<IMark>(new CrossRefHeadingBookmark(rPaM, vcl::KeyCode(), rName, OUString()));
|
||||
pMark = std::shared_ptr<IMark>(new CrossRefHeadingBookmark(rPaM, vcl::KeyCode(), rName));
|
||||
break;
|
||||
case IDocumentMarkAccess::MarkType::CROSSREF_NUMITEM_BOOKMARK:
|
||||
pMark = std::shared_ptr<IMark>(new CrossRefNumItemBookmark(rPaM, vcl::KeyCode(), rName, OUString()));
|
||||
pMark = std::shared_ptr<IMark>(new CrossRefNumItemBookmark(rPaM, vcl::KeyCode(), rName));
|
||||
break;
|
||||
case IDocumentMarkAccess::MarkType::UNO_BOOKMARK:
|
||||
pMark = std::shared_ptr<IMark>(new UnoMark(rPaM));
|
||||
|
@ -67,8 +67,7 @@ namespace sw {
|
||||
public:
|
||||
CrossRefHeadingBookmark(const SwPaM& rPaM,
|
||||
const vcl::KeyCode& rCode,
|
||||
const OUString& rName,
|
||||
const OUString& rShortName);
|
||||
const OUString& rName);
|
||||
static bool IsLegalName(const OUString& rName);
|
||||
};
|
||||
|
||||
@ -78,8 +77,7 @@ namespace sw {
|
||||
public:
|
||||
CrossRefNumItemBookmark(const SwPaM& rPaM,
|
||||
const vcl::KeyCode& rCode,
|
||||
const OUString& rName,
|
||||
const OUString& rShortName);
|
||||
const OUString& rName);
|
||||
static bool IsLegalName(const OUString& rName);
|
||||
};
|
||||
}
|
||||
|
@ -181,7 +181,7 @@ class FFDataWriterHelper
|
||||
}
|
||||
public:
|
||||
explicit FFDataWriterHelper( const ::sax_fastparser::FSHelperPtr& rSerializer ) : m_pSerializer( rSerializer ){}
|
||||
void WriteFormCheckbox( const OUString& rName, const OUString& rDefault, bool bChecked )
|
||||
void WriteFormCheckbox( const OUString& rName, bool bChecked )
|
||||
{
|
||||
writeCommonStart( rName );
|
||||
// Checkbox specific bits
|
||||
@ -190,28 +190,14 @@ public:
|
||||
// #TODO check if this defaulted
|
||||
m_pSerializer->startElementNS( XML_w, XML_sizeAuto, FSEND );
|
||||
m_pSerializer->endElementNS( XML_w, XML_sizeAuto );
|
||||
if ( !rDefault.isEmpty() )
|
||||
{
|
||||
m_pSerializer->singleElementNS( XML_w, XML_default,
|
||||
FSNS( XML_w, XML_val ),
|
||||
OUStringToOString( rDefault, RTL_TEXTENCODING_UTF8 ).getStr(), FSEND );
|
||||
}
|
||||
if ( bChecked )
|
||||
m_pSerializer->singleElementNS( XML_w, XML_checked, FSEND );
|
||||
m_pSerializer->endElementNS( XML_w, XML_checkBox );
|
||||
writeFinish();
|
||||
}
|
||||
void WriteFormText( const OUString& rName, const OUString& rDefault )
|
||||
void WriteFormText( const OUString& rName )
|
||||
{
|
||||
writeCommonStart( rName );
|
||||
if ( !rDefault.isEmpty() )
|
||||
{
|
||||
m_pSerializer->startElementNS( XML_w, XML_textInput, FSEND );
|
||||
m_pSerializer->singleElementNS( XML_w, XML_default,
|
||||
FSNS( XML_w, XML_val ),
|
||||
OUStringToOString( rDefault, RTL_TEXTENCODING_UTF8 ).getStr(), FSEND );
|
||||
m_pSerializer->endElementNS( XML_w, XML_textInput );
|
||||
}
|
||||
writeFinish();
|
||||
}
|
||||
};
|
||||
@ -1507,13 +1493,13 @@ void DocxAttributeOutput::WriteFFData( const FieldInfos& rInfos )
|
||||
bChecked = true;
|
||||
|
||||
FFDataWriterHelper ffdataOut( m_pSerializer );
|
||||
ffdataOut.WriteFormCheckbox( sName, OUString(), bChecked );
|
||||
ffdataOut.WriteFormCheckbox( sName, bChecked );
|
||||
}
|
||||
else if ( rInfos.eType == ww::eFORMTEXT )
|
||||
{
|
||||
FieldMarkParamsHelper params( rFieldmark );
|
||||
FFDataWriterHelper ffdataOut( m_pSerializer );
|
||||
ffdataOut.WriteFormText( params.getName(), OUString() );
|
||||
ffdataOut.WriteFormText( params.getName() );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1397,7 +1397,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
|
||||
pMark = rSh.SetBookmark(
|
||||
vcl::KeyCode(),
|
||||
OUString(),
|
||||
OUString(), IDocumentMarkAccess::MarkType::UNO_BOOKMARK );
|
||||
IDocumentMarkAccess::MarkType::UNO_BOOKMARK );
|
||||
rSh.SwCursorShell::MovePara(
|
||||
GoCurrPara, fnParaEnd );
|
||||
bSetCursor = false;
|
||||
|
@ -207,7 +207,7 @@ IMPL_LINK_NOARG(SwInsertBookmarkDlg, RenameHdl, Button*, void)
|
||||
IMPL_LINK_NOARG(SwInsertBookmarkDlg, InsertHdl, Button*, void)
|
||||
{
|
||||
OUString sBookmark = m_pEditBox->GetText();
|
||||
rSh.SetBookmark(vcl::KeyCode(), sBookmark, OUString());
|
||||
rSh.SetBookmark(vcl::KeyCode(), sBookmark);
|
||||
rReq.AppendItem(SfxStringItem(FN_INSERT_BOOKMARK, sBookmark));
|
||||
rReq.Done();
|
||||
if (!rReq.IsDone())
|
||||
|
@ -450,10 +450,9 @@ void SwStyleSheetIterator::SwPoolFormatList::Append( char cChar, const OUString&
|
||||
// UI-sided implementation of StyleSheets
|
||||
// uses the Core-Engine
|
||||
SwDocStyleSheet::SwDocStyleSheet( SwDoc& rDocument,
|
||||
const OUString& rName,
|
||||
SwDocStyleSheetPool* _rPool) :
|
||||
|
||||
SfxStyleSheetBase( rName, _rPool, SfxStyleFamily::Char, 0 ),
|
||||
SfxStyleSheetBase( OUString(), _rPool, SfxStyleFamily::Char, 0 ),
|
||||
pCharFormat(nullptr),
|
||||
pColl(nullptr),
|
||||
pFrameFormat(nullptr),
|
||||
@ -2403,7 +2402,7 @@ void SwDocStyleSheet::SetHelpId( const OUString& r, sal_uLong nId )
|
||||
// methods for DocStyleSheetPool
|
||||
SwDocStyleSheetPool::SwDocStyleSheetPool( SwDoc& rDocument, bool bOrg )
|
||||
: SfxStyleSheetBasePool( rDocument.GetAttrPool() )
|
||||
, mxStyleSheet( new SwDocStyleSheet( rDocument, OUString(), this ) )
|
||||
, mxStyleSheet( new SwDocStyleSheet( rDocument, this ) )
|
||||
, rDoc( rDocument )
|
||||
{
|
||||
bOrganizer = bOrg;
|
||||
@ -2652,8 +2651,8 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Find( const OUString& rName,
|
||||
SwStyleSheetIterator::SwStyleSheetIterator( SwDocStyleSheetPool* pBase,
|
||||
SfxStyleFamily eFam, sal_uInt16 n )
|
||||
: SfxStyleSheetIterator( pBase, eFam, n ),
|
||||
mxIterSheet( new SwDocStyleSheet( pBase->GetDoc(), OUString(), pBase ) ),
|
||||
mxStyleSheet( new SwDocStyleSheet( pBase->GetDoc(), OUString(), pBase ) )
|
||||
mxIterSheet( new SwDocStyleSheet( pBase->GetDoc(), pBase ) ),
|
||||
mxStyleSheet( new SwDocStyleSheet( pBase->GetDoc(), pBase ) )
|
||||
{
|
||||
bFirstCalled = false;
|
||||
nLastPos = 0;
|
||||
|
@ -454,7 +454,6 @@ void SwDBTreeList::StartDrag( sal_Int8 /*nAction*/, const Point& /*rPosPixel*/ )
|
||||
// drag database field
|
||||
rtl::Reference< svx::OColumnTransferable > xColTransfer( new svx::OColumnTransferable(
|
||||
sDBName,
|
||||
OUString(),
|
||||
sTableName,
|
||||
sColumnName,
|
||||
(ColumnTransferFormatFlags::FIELD_DESCRIPTOR|ColumnTransferFormatFlags::COLUMN_DESCRIPTOR) ) );
|
||||
|
@ -3656,7 +3656,6 @@ SwTrnsfrDdeLink::SwTrnsfrDdeLink( SwTransferable& rTrans, SwWrtShell& rSh )
|
||||
::sw::mark::IMark* pMark = rSh.SetBookmark(
|
||||
vcl::KeyCode(),
|
||||
OUString(),
|
||||
OUString(),
|
||||
IDocumentMarkAccess::MarkType::DDE_BOOKMARK);
|
||||
if(pMark)
|
||||
{
|
||||
|
@ -615,7 +615,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
|
||||
if ( pItem )
|
||||
{
|
||||
OUString sName = static_cast<const SfxStringItem*>(pItem)->GetValue();
|
||||
rWrtSh.SetBookmark( vcl::KeyCode(), sName, OUString() );
|
||||
rWrtSh.SetBookmark( vcl::KeyCode(), sName );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -511,7 +511,7 @@ void SwNavigationPI::MakeMark()
|
||||
if(vNavMarkNames.size() == MAX_MARKS)
|
||||
pMarkAccess->deleteMark(pMarkAccess->findMark(vNavMarkNames[m_nAutoMarkIdx]));
|
||||
|
||||
rSh.SetBookmark(vcl::KeyCode(), OUString(), OUString(), IDocumentMarkAccess::MarkType::NAVIGATOR_REMINDER);
|
||||
rSh.SetBookmark(vcl::KeyCode(), OUString(), IDocumentMarkAccess::MarkType::NAVIGATOR_REMINDER);
|
||||
SwView::SetActMark( m_nAutoMarkIdx );
|
||||
|
||||
if(++m_nAutoMarkIdx == MAX_MARKS)
|
||||
|
@ -373,8 +373,8 @@ NameClashContinuation interactiveNameClashResolve(
|
||||
rtl::Reference< ucbhelper::SimpleNameClashResolveRequest > xRequest(
|
||||
new ucbhelper::SimpleNameClashResolveRequest(
|
||||
rTargetURL, // target folder URL
|
||||
rClashingName, // clashing name
|
||||
OUString() ) ); // no proposal for new name
|
||||
rClashingName
|
||||
) );
|
||||
|
||||
rException = xRequest->getRequest();
|
||||
if ( xEnv.is() )
|
||||
|
@ -36,7 +36,7 @@ namespace cmis
|
||||
m_sUrl, m_sBindingUrl, OUString(),
|
||||
STD_TO_OUSTR( username ),
|
||||
STD_TO_OUSTR( password ),
|
||||
OUString(), false, false );
|
||||
false, false );
|
||||
xIH->handle( xRequest.get() );
|
||||
|
||||
rtl::Reference< ucbhelper::InteractionContinuation > xSelection
|
||||
|
@ -73,8 +73,7 @@ int DAVAuthListener_Impl::authenticate(
|
||||
rtl::Reference< ucbhelper::SimpleAuthenticationRequest > xRequest
|
||||
= new ucbhelper::SimpleAuthenticationRequest(
|
||||
m_aURL, inHostName, inRealm, inoutUserName,
|
||||
outPassWord, OUString(),
|
||||
bCanUseSystemCredentials );
|
||||
outPassWord, bCanUseSystemCredentials );
|
||||
xIH->handle( xRequest.get() );
|
||||
|
||||
rtl::Reference< ucbhelper::InteractionContinuation > xSelection
|
||||
|
@ -31,7 +31,6 @@ SimpleAuthenticationRequest::SimpleAuthenticationRequest(
|
||||
const OUString & rRealm,
|
||||
const OUString & rUserName,
|
||||
const OUString & rPassword,
|
||||
const OUString & rAccount,
|
||||
bool bAllowUseSystemCredentials,
|
||||
bool bAllowSessionStoring )
|
||||
{
|
||||
@ -50,9 +49,7 @@ SimpleAuthenticationRequest::SimpleAuthenticationRequest(
|
||||
aRequest.UserName = rUserName;
|
||||
aRequest.HasPassword = true;
|
||||
aRequest.Password = rPassword;
|
||||
aRequest.HasAccount = !rAccount.isEmpty();
|
||||
if ( aRequest.HasAccount )
|
||||
aRequest.Account = rAccount;
|
||||
aRequest.HasAccount = false;
|
||||
aRequest.URL = rURL;
|
||||
|
||||
initialize(aRequest,
|
||||
|
@ -135,8 +135,7 @@ SimpleNameClashResolveRequest::~SimpleNameClashResolveRequest() {}
|
||||
|
||||
SimpleNameClashResolveRequest::SimpleNameClashResolveRequest(
|
||||
const OUString & rTargetFolderURL,
|
||||
const OUString & rClashingName,
|
||||
const OUString & rProposedNewName )
|
||||
const OUString & rClashingName )
|
||||
{
|
||||
// Fill request...
|
||||
ucb::NameClashResolveRequest aRequest;
|
||||
@ -145,7 +144,7 @@ SimpleNameClashResolveRequest::SimpleNameClashResolveRequest(
|
||||
aRequest.Classification = task::InteractionClassification_QUERY;
|
||||
aRequest.TargetFolderURL = rTargetFolderURL;
|
||||
aRequest.ClashingName = rClashingName;
|
||||
aRequest.ProposedNewName = rProposedNewName;
|
||||
aRequest.ProposedNewName = OUString();
|
||||
|
||||
setRequest( uno::makeAny( aRequest ) );
|
||||
|
||||
|
@ -548,8 +548,7 @@ public:
|
||||
void EnableUserDraw( bool bUserDraw ) { mbUserDrawEnabled = bUserDraw; }
|
||||
bool IsUserDrawEnabled() const { return mbUserDrawEnabled; }
|
||||
|
||||
void DrawEntry(vcl::RenderContext& rRenderContext, bool bDrawImage,
|
||||
bool bDrawTextAtImagePos, bool bLayout = false);
|
||||
void DrawEntry(vcl::RenderContext& rRenderContext, bool bLayout);
|
||||
|
||||
bool GetEdgeBlending() const { return mbEdgeBlending; }
|
||||
void SetEdgeBlending(bool bNew) { mbEdgeBlending = bNew; }
|
||||
|
@ -1148,7 +1148,7 @@ void PushButton::ImplSetDefButton( bool bSet )
|
||||
// get native size of a 'default' button
|
||||
// and adjust the VCL button if more space for adornment is required
|
||||
if( GetNativeControlRegion( ControlType::Pushbutton, ControlPart::Entire, aCtrlRegion,
|
||||
nState, aControlValue, OUString(),
|
||||
nState, aControlValue,
|
||||
aBound, aCont ) )
|
||||
{
|
||||
dLeft = aCont.Left() - aBound.Left();
|
||||
@ -2726,7 +2726,7 @@ Size RadioButton::ImplGetRadioImageSize() const
|
||||
|
||||
// get native size of a radio button
|
||||
if( GetNativeControlRegion( ControlType::Radiobutton, ControlPart::Entire, aCtrlRegion,
|
||||
nState, aControlValue, OUString(),
|
||||
nState, aControlValue,
|
||||
aBoundingRgn, aContentRgn ) )
|
||||
{
|
||||
aSize = aContentRgn.GetSize();
|
||||
@ -2847,7 +2847,7 @@ void RadioButton::ImplSetMinimumNWFSize()
|
||||
|
||||
// get native size of a radiobutton
|
||||
if( GetNativeControlRegion( ControlType::Radiobutton, ControlPart::Entire, aCtrlRegion,
|
||||
ControlState::DEFAULT|ControlState::ENABLED, aControlValue, OUString(),
|
||||
ControlState::DEFAULT|ControlState::ENABLED, aControlValue,
|
||||
aBoundingRgn, aContentRgn ) )
|
||||
{
|
||||
Size aSize = aContentRgn.GetSize();
|
||||
@ -3598,7 +3598,7 @@ Size CheckBox::ImplGetCheckImageSize() const
|
||||
|
||||
// get native size of a check box
|
||||
if( GetNativeControlRegion( ControlType::Checkbox, ControlPart::Entire, aCtrlRegion,
|
||||
nState, aControlValue, OUString(),
|
||||
nState, aControlValue,
|
||||
aBoundingRgn, aContentRgn ) )
|
||||
{
|
||||
aSize = aContentRgn.GetSize();
|
||||
@ -3703,7 +3703,7 @@ void CheckBox::ImplSetMinimumNWFSize()
|
||||
|
||||
// get native size of a radiobutton
|
||||
if( GetNativeControlRegion( ControlType::Checkbox, ControlPart::Entire, aCtrlRegion,
|
||||
ControlState::DEFAULT|ControlState::ENABLED, aControlValue, OUString(),
|
||||
ControlState::DEFAULT|ControlState::ENABLED, aControlValue,
|
||||
aBoundingRgn, aContentRgn ) )
|
||||
{
|
||||
Size aSize = aContentRgn.GetSize();
|
||||
|
@ -157,7 +157,7 @@ void ComboBox::ImplCalcEditHeight()
|
||||
if( GetNativeControlRegion( aType, ControlPart::Entire,
|
||||
aCtrlRegion,
|
||||
ControlState::ENABLED,
|
||||
aControlValue, OUString(),
|
||||
aControlValue,
|
||||
aBoundRegion, aContentRegion ) )
|
||||
{
|
||||
const long nNCHeight = aBoundRegion.GetHeight();
|
||||
@ -1010,7 +1010,7 @@ long ComboBox::getMaxWidthScrollBarAndDownButton() const
|
||||
tools::Rectangle aArea( aPoint, pBorder->GetOutputSizePixel() );
|
||||
|
||||
if ( GetNativeControlRegion(ControlType::Combobox, ControlPart::ButtonDown,
|
||||
aArea, ControlState::NONE, aControlValue, OUString(), aBound, aContent) )
|
||||
aArea, ControlState::NONE, aControlValue, aBound, aContent) )
|
||||
{
|
||||
nButtonDownWidth = aContent.getWidth();
|
||||
}
|
||||
@ -1448,7 +1448,7 @@ ComboBoxBounds ComboBox::Impl::calcComboBoxDropDownComponentBounds(
|
||||
tools::Rectangle aArea( aPoint, rBorderOutSz );
|
||||
|
||||
if (m_rThis.GetNativeControlRegion(ControlType::Combobox, ControlPart::ButtonDown,
|
||||
aArea, ControlState::NONE, aControlValue, OUString(), aBound, aContent) )
|
||||
aArea, ControlState::NONE, aControlValue, aBound, aContent) )
|
||||
{
|
||||
// convert back from border space to local coordinates
|
||||
aPoint = pBorder->ScreenToOutputPixel(m_rThis.OutputToScreenPixel(aPoint));
|
||||
@ -1459,7 +1459,7 @@ ComboBoxBounds ComboBox::Impl::calcComboBoxDropDownComponentBounds(
|
||||
|
||||
// adjust the size of the edit field
|
||||
if (m_rThis.GetNativeControlRegion(ControlType::Combobox, ControlPart::SubEdit,
|
||||
aArea, ControlState::NONE, aControlValue, OUString(), aBound, aContent) )
|
||||
aArea, ControlState::NONE, aControlValue, aBound, aContent) )
|
||||
{
|
||||
// convert back from border space to local coordinates
|
||||
aContent.Move(-aPoint.X(), -aPoint.Y());
|
||||
|
@ -2727,7 +2727,7 @@ Size Edit::CalcMinimumSizeForText(const OUString &rString) const
|
||||
tools::Rectangle aRect( Point( 0, 0 ), aSize );
|
||||
tools::Rectangle aContent, aBound;
|
||||
if (GetNativeControlRegion(eCtrlType, ControlPart::Entire, aRect, ControlState::NONE,
|
||||
aControlValue, OUString(), aBound, aContent))
|
||||
aControlValue, aBound, aContent))
|
||||
{
|
||||
if (aBound.GetHeight() > aSize.Height())
|
||||
aSize.Height() = aBound.GetHeight();
|
||||
|
@ -2728,7 +2728,7 @@ void ImplWin::ImplDraw(vcl::RenderContext& rRenderContext, bool bLayout)
|
||||
}
|
||||
else
|
||||
{
|
||||
DrawEntry(rRenderContext, true, false, bLayout);
|
||||
DrawEntry(rRenderContext, bLayout);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2757,13 +2757,13 @@ void ImplWin::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle&
|
||||
ImplDraw(rRenderContext);
|
||||
}
|
||||
|
||||
void ImplWin::DrawEntry(vcl::RenderContext& rRenderContext, bool bDrawImage, bool bDrawTextAtImagePos, bool bLayout)
|
||||
void ImplWin::DrawEntry(vcl::RenderContext& rRenderContext, bool bLayout)
|
||||
{
|
||||
long nBorder = 1;
|
||||
Size aOutSz(GetOutputSizePixel());
|
||||
|
||||
bool bImage = !!maImage;
|
||||
if (bDrawImage && bImage && !bLayout)
|
||||
if (bImage && !bLayout)
|
||||
{
|
||||
DrawImageFlags nStyle = DrawImageFlags::NONE;
|
||||
Size aImgSz = maImage.GetSizePixel();
|
||||
@ -2804,7 +2804,7 @@ void ImplWin::DrawEntry(vcl::RenderContext& rRenderContext, bool bDrawImage, boo
|
||||
{
|
||||
DrawTextFlags nTextStyle = DrawTextFlags::VCenter;
|
||||
|
||||
if ( bDrawImage && bImage && !bLayout )
|
||||
if ( bImage && !bLayout )
|
||||
nTextStyle |= DrawTextFlags::Left;
|
||||
else if ( GetStyle() & WB_CENTER )
|
||||
nTextStyle |= DrawTextFlags::Center;
|
||||
@ -2815,7 +2815,7 @@ void ImplWin::DrawEntry(vcl::RenderContext& rRenderContext, bool bDrawImage, boo
|
||||
|
||||
tools::Rectangle aTextRect( Point( nBorder, 0 ), Size( aOutSz.Width()-2*nBorder, aOutSz.Height() ) );
|
||||
|
||||
if ( !bDrawTextAtImagePos && ( bImage || IsUserDrawEnabled() ) )
|
||||
if ( bImage || IsUserDrawEnabled() )
|
||||
{
|
||||
aTextRect.Left() += maImage.GetSizePixel().Width() + IMG_TXT_DISTANCE;
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ void ListBox::ImplInit( vcl::Window* pParent, WinBits nStyle )
|
||||
tools::Rectangle aBoundingRgn( aCtrlRegion );
|
||||
tools::Rectangle aContentRgn( aCtrlRegion );
|
||||
if( GetNativeControlRegion( ControlType::Listbox, ControlPart::Entire, aCtrlRegion,
|
||||
ControlState::ENABLED, aControlValue, OUString(),
|
||||
ControlState::ENABLED, aControlValue,
|
||||
aBoundingRgn, aContentRgn ) )
|
||||
{
|
||||
sal_Int32 nHeight = aBoundingRgn.GetHeight();
|
||||
@ -585,7 +585,7 @@ void ListBox::Resize()
|
||||
tools::Rectangle aArea( aPoint, pBorder->GetOutputSizePixel() );
|
||||
|
||||
if ( GetNativeControlRegion( ControlType::Listbox, ControlPart::ButtonDown,
|
||||
aArea, ControlState::NONE, aControlValue, OUString(), aBound, aContent) )
|
||||
aArea, ControlState::NONE, aControlValue, aBound, aContent) )
|
||||
{
|
||||
long nTop = 0;
|
||||
// Convert back from border space to local coordinates
|
||||
@ -598,7 +598,7 @@ void ListBox::Resize()
|
||||
|
||||
// Adjust the size of the edit field
|
||||
if ( GetNativeControlRegion( ControlType::Listbox, ControlPart::SubEdit,
|
||||
aArea, ControlState::NONE, aControlValue, OUString(), aBound, aContent) )
|
||||
aArea, ControlState::NONE, aControlValue, aBound, aContent) )
|
||||
{
|
||||
// Convert back from border space to local coordinates
|
||||
aContent.Move( -aPoint.X(), -aPoint.Y() );
|
||||
@ -1187,7 +1187,7 @@ Size ListBox::CalcMinimumSize() const
|
||||
Size aTestSize( 100, 20 );
|
||||
tools::Rectangle aArea( aPoint, aTestSize );
|
||||
if( GetNativeControlRegion( ControlType::Listbox, ControlPart::SubEdit, aArea, ControlState::NONE,
|
||||
aControlValue, OUString(), aBound, aContent) )
|
||||
aControlValue, aBound, aContent) )
|
||||
{
|
||||
// use the themes drop down size
|
||||
aSz.Width() += aTestSize.Width() - aContent.GetWidth();
|
||||
@ -1204,7 +1204,7 @@ Size ListBox::CalcMinimumSize() const
|
||||
tools::Rectangle aRect( Point( 0, 0 ), aSz );
|
||||
tools::Rectangle aContent, aBound;
|
||||
if( GetNativeControlRegion( ControlType::Listbox, ControlPart::Entire, aRect, ControlState::NONE,
|
||||
aControlValue, OUString(), aBound, aContent) )
|
||||
aControlValue, aBound, aContent) )
|
||||
{
|
||||
if( aBound.GetHeight() > aSz.Height() )
|
||||
aSz.Height() = aBound.GetHeight();
|
||||
@ -1343,7 +1343,7 @@ void ListBox::DrawEntry(const UserDrawEvent& rEvt)
|
||||
if (rEvt.GetWindow() == mpImplLB->GetMainWindow())
|
||||
mpImplLB->GetMainWindow()->DrawEntry(*rEvt.GetRenderContext(), rEvt.GetItemId(), true/*bDrawImage*/, true/*bDrawText*/, false/*bDrawTextAtImagePos*/ );
|
||||
else if (rEvt.GetWindow() == mpImplWin)
|
||||
mpImplWin->DrawEntry(*rEvt.GetRenderContext(), true/*bDrawImage*/, false/*bDrawTextAtImagePos*/);
|
||||
mpImplWin->DrawEntry(*rEvt.GetRenderContext(), false/*layout*/);
|
||||
}
|
||||
|
||||
void ListBox::EnableUserDraw( bool bUserDraw )
|
||||
|
@ -246,9 +246,9 @@ void ScrollBar::ImplCalc( bool bUpdate )
|
||||
if ( GetStyle() & WB_HORZ )
|
||||
{
|
||||
if ( GetNativeControlRegion( ControlType::Scrollbar, IsRTLEnabled()? ControlPart::ButtonRight: ControlPart::ButtonLeft,
|
||||
aControlRegion, ControlState::NONE, ImplControlValue(), OUString(), aBoundingRegion, aBtn1Region ) &&
|
||||
aControlRegion, ControlState::NONE, ImplControlValue(), aBoundingRegion, aBtn1Region ) &&
|
||||
GetNativeControlRegion( ControlType::Scrollbar, IsRTLEnabled()? ControlPart::ButtonLeft: ControlPart::ButtonRight,
|
||||
aControlRegion, ControlState::NONE, ImplControlValue(), OUString(), aBoundingRegion, aBtn2Region ) )
|
||||
aControlRegion, ControlState::NONE, ImplControlValue(), aBoundingRegion, aBtn2Region ) )
|
||||
{
|
||||
maBtn1Rect = aBtn1Region;
|
||||
maBtn2Rect = aBtn2Region;
|
||||
@ -263,7 +263,7 @@ void ScrollBar::ImplCalc( bool bUpdate )
|
||||
}
|
||||
|
||||
if ( GetNativeControlRegion( ControlType::Scrollbar, ControlPart::TrackHorzArea,
|
||||
aControlRegion, ControlState::NONE, ImplControlValue(), OUString(), aBoundingRegion, aTrackRegion ) )
|
||||
aControlRegion, ControlState::NONE, ImplControlValue(), aBoundingRegion, aTrackRegion ) )
|
||||
maTrackRect = aTrackRegion;
|
||||
else
|
||||
maTrackRect = tools::Rectangle( maBtn1Rect.TopRight(), maBtn2Rect.BottomLeft() );
|
||||
@ -287,9 +287,9 @@ void ScrollBar::ImplCalc( bool bUpdate )
|
||||
else
|
||||
{
|
||||
if ( GetNativeControlRegion( ControlType::Scrollbar, ControlPart::ButtonUp,
|
||||
aControlRegion, ControlState::NONE, ImplControlValue(), OUString(), aBoundingRegion, aBtn1Region ) &&
|
||||
aControlRegion, ControlState::NONE, ImplControlValue(), aBoundingRegion, aBtn1Region ) &&
|
||||
GetNativeControlRegion( ControlType::Scrollbar, ControlPart::ButtonDown,
|
||||
aControlRegion, ControlState::NONE, ImplControlValue(), OUString(), aBoundingRegion, aBtn2Region ) )
|
||||
aControlRegion, ControlState::NONE, ImplControlValue(), aBoundingRegion, aBtn2Region ) )
|
||||
{
|
||||
maBtn1Rect = aBtn1Region;
|
||||
maBtn2Rect = aBtn2Region;
|
||||
@ -304,7 +304,7 @@ void ScrollBar::ImplCalc( bool bUpdate )
|
||||
}
|
||||
|
||||
if ( GetNativeControlRegion( ControlType::Scrollbar, ControlPart::TrackVertArea,
|
||||
aControlRegion, ControlState::NONE, ImplControlValue(), OUString(), aBoundingRegion, aTrackRegion ) )
|
||||
aControlRegion, ControlState::NONE, ImplControlValue(), aBoundingRegion, aTrackRegion ) )
|
||||
maTrackRect = aTrackRegion;
|
||||
else
|
||||
maTrackRect = tools::Rectangle( maBtn1Rect.BottomLeft()+Point(0,1), maBtn2Rect.TopRight() );
|
||||
|
@ -140,7 +140,7 @@ void Slider::ImplUpdateRects( bool bUpdate )
|
||||
const tools::Rectangle aControlRegion( tools::Rectangle( Point(0,0), Size( SLIDER_THUMB_SIZE, 10 ) ) );
|
||||
tools::Rectangle aThumbBounds, aThumbContent;
|
||||
if ( GetNativeControlRegion( ControlType::Slider, ControlPart::ThumbHorz,
|
||||
aControlRegion, ControlState::NONE, ImplControlValue(), OUString(),
|
||||
aControlRegion, ControlState::NONE, ImplControlValue(),
|
||||
aThumbBounds, aThumbContent ) )
|
||||
{
|
||||
maThumbRect.Left() = mnThumbPixPos - aThumbBounds.GetWidth()/2;
|
||||
@ -174,7 +174,7 @@ void Slider::ImplUpdateRects( bool bUpdate )
|
||||
const tools::Rectangle aControlRegion( tools::Rectangle( Point(0,0), Size( 10, SLIDER_THUMB_SIZE ) ) );
|
||||
tools::Rectangle aThumbBounds, aThumbContent;
|
||||
if ( GetNativeControlRegion( ControlType::Slider, ControlPart::ThumbVert,
|
||||
aControlRegion, ControlState::NONE, ImplControlValue(), OUString(),
|
||||
aControlRegion, ControlState::NONE, ImplControlValue(),
|
||||
aThumbBounds, aThumbContent ) )
|
||||
{
|
||||
maThumbRect.Top() = mnThumbPixPos - aThumbBounds.GetHeight()/2;
|
||||
|
@ -114,7 +114,7 @@ bool ImplDrawNativeSpinfield(vcl::RenderContext& rRenderContext, vcl::Window* pW
|
||||
if (!ImplGetSVData()->maNWFData.mbCanDrawWidgetAnySize &&
|
||||
pContext->GetNativeControlRegion(ControlType::Spinbox, ControlPart::Entire,
|
||||
aNatRgn, ControlState::NONE, rSpinbuttonValue,
|
||||
OUString(), aBound, aContent))
|
||||
aBound, aContent))
|
||||
{
|
||||
aSize = aContent.GetSize();
|
||||
}
|
||||
@ -658,9 +658,9 @@ void SpinField::ImplCalcButtonAreas(OutputDevice* pDev, const Size& rOutSz, tool
|
||||
|
||||
bNativeRegionOK =
|
||||
pWin->GetNativeControlRegion(ControlType::Spinbox, ControlPart::ButtonUp,
|
||||
aArea, ControlState::NONE, aControlValue, OUString(), aBound, aContentUp) &&
|
||||
aArea, ControlState::NONE, aControlValue, aBound, aContentUp) &&
|
||||
pWin->GetNativeControlRegion(ControlType::Spinbox, ControlPart::ButtonDown,
|
||||
aArea, ControlState::NONE, aControlValue, OUString(), aBound, aContentDown);
|
||||
aArea, ControlState::NONE, aControlValue, aBound, aContentDown);
|
||||
|
||||
if (bNativeRegionOK)
|
||||
{
|
||||
@ -713,7 +713,7 @@ void SpinField::Resize()
|
||||
|
||||
// adjust position and size of the edit field
|
||||
if (GetNativeControlRegion(ControlType::Spinbox, ControlPart::SubEdit, aArea, ControlState::NONE,
|
||||
aControlValue, OUString(), aBound, aContent) &&
|
||||
aControlValue, aBound, aContent) &&
|
||||
// there is just no useful native support for spinfields with dropdown
|
||||
!(GetStyle() & WB_DROPDOWN))
|
||||
{
|
||||
@ -905,9 +905,9 @@ Size SpinField::CalcMinimumSizeForText(const OUString &rString) const
|
||||
tools::Rectangle aEntireBound, aEntireContent, aEditBound, aEditContent;
|
||||
if (
|
||||
GetNativeControlRegion(ControlType::Spinbox, ControlPart::Entire,
|
||||
aArea, ControlState::NONE, aControlValue, OUString(), aEntireBound, aEntireContent) &&
|
||||
aArea, ControlState::NONE, aControlValue, aEntireBound, aEntireContent) &&
|
||||
GetNativeControlRegion(ControlType::Spinbox, ControlPart::SubEdit,
|
||||
aArea, ControlState::NONE, aControlValue, OUString(), aEditBound, aEditContent)
|
||||
aArea, ControlState::NONE, aControlValue, aEditBound, aEditContent)
|
||||
)
|
||||
{
|
||||
aSz.Width() += (aEntireContent.GetWidth() - aEditContent.GetWidth());
|
||||
|
@ -237,7 +237,7 @@ Size TabControl::ImplGetItemSize( ImplTabItem* pItem, long nMaxWidth )
|
||||
aSize.Width() - TAB_TABOFFSET_X * 2,
|
||||
aSize.Height() - TAB_TABOFFSET_Y * 2));
|
||||
if(GetNativeControlRegion( ControlType::TabItem, ControlPart::Entire, aCtrlRegion,
|
||||
ControlState::ENABLED, aControlValue, OUString(),
|
||||
ControlState::ENABLED, aControlValue,
|
||||
aBoundingRgn, aContentRgn ) )
|
||||
{
|
||||
return aContentRgn.GetSize();
|
||||
|
@ -81,7 +81,7 @@ ImplAnimView::ImplAnimView( Animation* pParent, OutputDevice* pOut,
|
||||
MapMode aTempMap( mpOut->GetMapMode() );
|
||||
aTempMap.SetOrigin( Point() );
|
||||
mpBackground->SetMapMode( aTempMap );
|
||||
static_cast<vcl::Window*>( mpOut.get() )->SaveBackground( maDispPt, maDispSz, Point(), *mpBackground );
|
||||
static_cast<vcl::Window*>( mpOut.get() )->SaveBackground( maDispPt, maDispSz, *mpBackground );
|
||||
mpBackground->SetMapMode( MapMode() );
|
||||
}
|
||||
else
|
||||
@ -318,7 +318,7 @@ void ImplAnimView::repaint()
|
||||
MapMode aTempMap( mpOut->GetMapMode() );
|
||||
aTempMap.SetOrigin( Point() );
|
||||
mpBackground->SetMapMode( aTempMap );
|
||||
static_cast<vcl::Window*>( mpOut.get() )->SaveBackground( maDispPt, maDispSz, Point(), *mpBackground );
|
||||
static_cast<vcl::Window*>( mpOut.get() )->SaveBackground( maDispPt, maDispSz, *mpBackground );
|
||||
mpBackground->SetMapMode( MapMode() );
|
||||
}
|
||||
else
|
||||
|
@ -316,7 +316,6 @@ bool OutputDevice::GetNativeControlRegion( ControlType nType,
|
||||
const tools::Rectangle& rControlRegion,
|
||||
ControlState nState,
|
||||
const ImplControlValue& aValue,
|
||||
const OUString& aCaption,
|
||||
tools::Rectangle &rNativeBoundingRegion,
|
||||
tools::Rectangle &rNativeContentRegion ) const
|
||||
{
|
||||
@ -333,7 +332,7 @@ bool OutputDevice::GetNativeControlRegion( ControlType nType,
|
||||
tools::Rectangle screenRegion( ImplLogicToDevicePixel( rControlRegion ) );
|
||||
|
||||
bool bRet = mpGraphics->GetNativeControlRegion(nType, nPart, screenRegion, nState, *aScreenCtrlValue,
|
||||
aCaption, rNativeBoundingRegion,
|
||||
OUString(), rNativeBoundingRegion,
|
||||
rNativeContentRegion, this );
|
||||
if( bRet )
|
||||
{
|
||||
|
@ -492,7 +492,7 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei
|
||||
tools::Rectangle aCtrlRegion( Point(mnLeftBorder, mnTopBorder), aMinSize );
|
||||
tools::Rectangle aBounds, aContent;
|
||||
if( pWin->GetNativeControlRegion( aCtrlType, ControlPart::Entire, aCtrlRegion,
|
||||
ControlState::ENABLED, aControlValue, OUString(),
|
||||
ControlState::ENABLED, aControlValue,
|
||||
aBounds, aContent ) )
|
||||
{
|
||||
mnLeftBorder = aContent.Left() - aBounds.Left();
|
||||
@ -696,7 +696,7 @@ void ImplSmallBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, c
|
||||
tools::Rectangle aContentRgn(aCtrlRegion);
|
||||
if (!ImplGetSVData()->maNWFData.mbCanDrawWidgetAnySize &&
|
||||
rRenderContext.GetNativeControlRegion(aCtrlType, aCtrlPart, aCtrlRegion,
|
||||
nState, aControlValue, OUString(),
|
||||
nState, aControlValue,
|
||||
aBoundingRgn, aContentRgn))
|
||||
{
|
||||
aCtrlRegion=aContentRgn;
|
||||
|
@ -674,7 +674,7 @@ void Window::ImplCalcOverlapRegion( const tools::Rectangle& rSourceRect, vcl::Re
|
||||
}
|
||||
|
||||
void Window::SaveBackground( const Point& rPos, const Size& rSize,
|
||||
const Point& rDestOff, VirtualDevice& rSaveDevice )
|
||||
VirtualDevice& rSaveDevice )
|
||||
{
|
||||
if ( mpWindowImpl->mpPaintRegion )
|
||||
{
|
||||
@ -687,7 +687,7 @@ void Window::SaveBackground( const Point& rPos, const Size& rSize,
|
||||
if ( !aClip.IsEmpty() )
|
||||
{
|
||||
const vcl::Region aOldClip( rSaveDevice.GetClipRegion() );
|
||||
const Point aPixOffset( rSaveDevice.LogicToPixel( rDestOff ) );
|
||||
const Point aPixOffset( rSaveDevice.LogicToPixel( Point() ) );
|
||||
const bool bMap = rSaveDevice.IsMapModeEnabled();
|
||||
|
||||
// move clip region to have the same distance to DestOffset
|
||||
@ -697,12 +697,12 @@ void Window::SaveBackground( const Point& rPos, const Size& rSize,
|
||||
rSaveDevice.EnableMapMode( false );
|
||||
rSaveDevice.SetClipRegion( aClip );
|
||||
rSaveDevice.EnableMapMode( bMap );
|
||||
rSaveDevice.DrawOutDev( rDestOff, rSize, rPos, rSize, *this );
|
||||
rSaveDevice.DrawOutDev( Point(), rSize, rPos, rSize, *this );
|
||||
rSaveDevice.SetClipRegion( aOldClip );
|
||||
}
|
||||
}
|
||||
else
|
||||
rSaveDevice.DrawOutDev( rDestOff, rSize, rPos, rSize, *this );
|
||||
rSaveDevice.DrawOutDev( Point(), rSize, rPos, rSize, *this );
|
||||
}
|
||||
|
||||
} /* namespace vcl */
|
||||
|
@ -603,7 +603,7 @@ void ImplDrawFrame( OutputDevice *const pDev, tools::Rectangle& rRect,
|
||||
tools::Rectangle aBound, aContent;
|
||||
tools::Rectangle aNatRgn( rRect );
|
||||
if( pWin->GetNativeControlRegion(ControlType::Frame, ControlPart::Border,
|
||||
aNatRgn, ControlState::NONE, aControlValue, OUString(), aBound, aContent) )
|
||||
aNatRgn, ControlState::NONE, aControlValue, aBound, aContent) )
|
||||
{
|
||||
// if bNoDraw is true then don't call the drawing routine
|
||||
// but just update the target rectangle
|
||||
|
@ -1289,7 +1289,7 @@ Size Menu::ImplGetNativeCheckAndRadioSize(vcl::RenderContext& rRenderContext, lo
|
||||
if (rRenderContext.IsNativeControlSupported(ControlType::MenuPopup, ControlPart::MenuItemCheckMark))
|
||||
{
|
||||
if (rRenderContext.GetNativeControlRegion(ControlType::MenuPopup, ControlPart::MenuItemCheckMark,
|
||||
aCtrlRegion, ControlState::ENABLED, aVal, OUString(),
|
||||
aCtrlRegion, ControlState::ENABLED, aVal,
|
||||
aNativeBounds, aNativeContent))
|
||||
{
|
||||
rCheckHeight = aNativeBounds.GetHeight();
|
||||
@ -1299,7 +1299,7 @@ Size Menu::ImplGetNativeCheckAndRadioSize(vcl::RenderContext& rRenderContext, lo
|
||||
if (rRenderContext.IsNativeControlSupported(ControlType::MenuPopup, ControlPart::MenuItemRadioMark))
|
||||
{
|
||||
if (rRenderContext.GetNativeControlRegion(ControlType::MenuPopup, ControlPart::MenuItemRadioMark,
|
||||
aCtrlRegion, ControlState::ENABLED, aVal, OUString(),
|
||||
aCtrlRegion, ControlState::ENABLED, aVal,
|
||||
aNativeBounds, aNativeContent))
|
||||
{
|
||||
rRadioHeight = aNativeBounds.GetHeight();
|
||||
@ -1320,7 +1320,7 @@ bool Menu::ImplGetNativeSubmenuArrowSize(vcl::RenderContext& rRenderContext, Siz
|
||||
{
|
||||
if (rRenderContext.GetNativeControlRegion(ControlType::MenuPopup, ControlPart::SubmenuArrow,
|
||||
aCtrlRegion, ControlState::ENABLED,
|
||||
aVal, OUString(), aNativeBounds, aNativeContent))
|
||||
aVal, aNativeBounds, aNativeContent))
|
||||
{
|
||||
Size aSize(aNativeContent.GetWidth(), aNativeContent.GetHeight());
|
||||
rArrowSize = aSize;
|
||||
@ -1566,7 +1566,6 @@ Size Menu::ImplCalcSize( vcl::Window* pWin )
|
||||
aCtrlRegion,
|
||||
ControlState::ENABLED,
|
||||
aVal,
|
||||
OUString(),
|
||||
aNativeBounds,
|
||||
aNativeContent )
|
||||
)
|
||||
|
@ -612,7 +612,7 @@ void StatusBar::ImplCalcProgressRect()
|
||||
tools::Rectangle aControlRegion( tools::Rectangle( (const Point&)Point(), maPrgsFrameRect.GetSize() ) );
|
||||
tools::Rectangle aNativeControlRegion, aNativeContentRegion;
|
||||
if( (bNativeOK = GetNativeControlRegion( ControlType::Progress, ControlPart::Entire, aControlRegion,
|
||||
ControlState::ENABLED, aValue, OUString(),
|
||||
ControlState::ENABLED, aValue,
|
||||
aNativeControlRegion, aNativeContentRegion ) ) )
|
||||
{
|
||||
long nProgressHeight = aNativeControlRegion.GetHeight();
|
||||
@ -1418,7 +1418,7 @@ Size StatusBar::CalcWindowSizePixel() const
|
||||
tools::Rectangle aControlRegion( (const Point&)Point(), Size( nCalcWidth, nMinHeight ) );
|
||||
tools::Rectangle aNativeControlRegion, aNativeContentRegion;
|
||||
if( GetNativeControlRegion( ControlType::Progress, ControlPart::Entire,
|
||||
aControlRegion, ControlState::ENABLED, aValue, OUString(),
|
||||
aControlRegion, ControlState::ENABLED, aValue,
|
||||
aNativeControlRegion, aNativeContentRegion ) )
|
||||
{
|
||||
nProgressHeight = aNativeControlRegion.GetHeight();
|
||||
@ -1432,7 +1432,7 @@ Size StatusBar::CalcWindowSizePixel() const
|
||||
tools::Rectangle aBound, aContent;
|
||||
tools::Rectangle aNatRgn( Point( 0, 0 ), Size( 150, 50 ) );
|
||||
if( GetNativeControlRegion(ControlType::Frame, ControlPart::Border,
|
||||
aNatRgn, ControlState::NONE, aControlValue, OUString(), aBound, aContent) )
|
||||
aNatRgn, ControlState::NONE, aControlValue, aBound, aContent) )
|
||||
{
|
||||
mpImplData->mnItemBorderWidth =
|
||||
( aBound.GetHeight() - aContent.GetHeight() ) / 2;
|
||||
|
@ -130,7 +130,7 @@ int ToolBox::ImplGetDragWidth( const vcl::RenderContext& rRenderContext, bool bH
|
||||
|
||||
if ( rRenderContext.GetNativeControlRegion(ControlType::Toolbar,
|
||||
bHorz ? ControlPart::ThumbVert : ControlPart::ThumbHorz,
|
||||
aArea, ControlState::NONE, aControlValue, OUString(), aBound, aContent) )
|
||||
aArea, ControlState::NONE, aControlValue, aBound, aContent) )
|
||||
{
|
||||
nWidth = bHorz ? aContent.GetWidth() : aContent.GetHeight();
|
||||
}
|
||||
@ -1445,7 +1445,7 @@ bool ToolBox::ImplCalcItem()
|
||||
if( GetNativeControlRegion( ControlType::Toolbar, ControlPart::Button,
|
||||
aReg,
|
||||
ControlState::ENABLED | ControlState::ROLLOVER,
|
||||
aVal, OUString(),
|
||||
aVal,
|
||||
aNativeBounds, aNativeContent ) )
|
||||
{
|
||||
aRect = aNativeBounds;
|
||||
@ -1470,7 +1470,7 @@ bool ToolBox::ImplCalcItem()
|
||||
if( GetNativeControlRegion( ControlType::Combobox, ControlPart::Entire,
|
||||
aReg,
|
||||
ControlState::ENABLED | ControlState::ROLLOVER,
|
||||
aVal, OUString(),
|
||||
aVal,
|
||||
aNativeBounds, aNativeContent ) )
|
||||
{
|
||||
aRect = aNativeBounds;
|
||||
@ -1482,7 +1482,7 @@ bool ToolBox::ImplCalcItem()
|
||||
if( GetNativeControlRegion( ControlType::Listbox, ControlPart::Entire,
|
||||
aReg,
|
||||
ControlState::ENABLED | ControlState::ROLLOVER,
|
||||
aVal, OUString(),
|
||||
aVal,
|
||||
aNativeBounds, aNativeContent ) )
|
||||
{
|
||||
aRect = aNativeBounds;
|
||||
@ -1494,7 +1494,7 @@ bool ToolBox::ImplCalcItem()
|
||||
if( GetNativeControlRegion( ControlType::Spinbox, ControlPart::Entire,
|
||||
aReg,
|
||||
ControlState::ENABLED | ControlState::ROLLOVER,
|
||||
aVal, OUString(),
|
||||
aVal,
|
||||
aNativeBounds, aNativeContent ) )
|
||||
{
|
||||
aRect = aNativeBounds;
|
||||
|
@ -794,7 +794,7 @@ sal_uInt16 ToolBox::GetItemId(const OUString &rCommand) const
|
||||
return 0;
|
||||
}
|
||||
|
||||
Point ToolBox::ImplGetPopupPosition( const tools::Rectangle& rRect, const Size& rSize ) const
|
||||
Point ToolBox::ImplGetPopupPosition( const tools::Rectangle& rRect ) const
|
||||
{
|
||||
Point aPos;
|
||||
if( !rRect.IsEmpty() )
|
||||
@ -813,32 +813,28 @@ Point ToolBox::ImplGetPopupPosition( const tools::Rectangle& rRect, const Size&
|
||||
aPos = rRect.BottomLeft();
|
||||
aPos.Y()++;
|
||||
devPos = OutputToAbsoluteScreenPixel( aPos );
|
||||
if( devPos.Y() + rSize.Height() >= aScreen.Bottom() )
|
||||
aPos.Y() = rRect.Top() - rSize.Height();
|
||||
if( devPos.Y() >= aScreen.Bottom() )
|
||||
aPos.Y() = rRect.Top();
|
||||
break;
|
||||
case WindowAlign::Bottom:
|
||||
aPos = rRect.TopLeft();
|
||||
aPos.Y()--;
|
||||
devPos = OutputToAbsoluteScreenPixel( aPos );
|
||||
if( devPos.Y() - rSize.Height() > aScreen.Top() )
|
||||
aPos.Y() -= rSize.Height();
|
||||
else
|
||||
if( devPos.Y() <= aScreen.Top() )
|
||||
aPos.Y() = rRect.Bottom();
|
||||
break;
|
||||
case WindowAlign::Left:
|
||||
aPos = rRect.TopRight();
|
||||
aPos.X()++;
|
||||
devPos = OutputToAbsoluteScreenPixel( aPos );
|
||||
if( devPos.X() + rSize.Width() >= aScreen.Right() )
|
||||
aPos.X() = rRect.Left() - rSize.Width();
|
||||
if( devPos.X() >= aScreen.Right() )
|
||||
aPos.X() = rRect.Left();
|
||||
break;
|
||||
case WindowAlign::Right:
|
||||
aPos = rRect.TopLeft();
|
||||
aPos.X()--;
|
||||
devPos = OutputToAbsoluteScreenPixel( aPos );
|
||||
if( devPos.X() - rSize.Width() > aScreen.Left() )
|
||||
aPos.X() -= rSize.Width();
|
||||
else
|
||||
if( devPos.X() <= aScreen.Left() )
|
||||
aPos.X() = rRect.Right();
|
||||
break;
|
||||
default:
|
||||
@ -1701,7 +1697,7 @@ IMPL_LINK_NOARG(ToolBox, ImplCallExecuteCustomMenu, void*, void)
|
||||
}
|
||||
}
|
||||
|
||||
sal_uInt16 uId = GetMenu()->Execute( pWin, tools::Rectangle( ImplGetPopupPosition( aMenuRect, Size() ), Size() ),
|
||||
sal_uInt16 uId = GetMenu()->Execute( pWin, tools::Rectangle( ImplGetPopupPosition( aMenuRect ), Size() ),
|
||||
PopupMenuFlags::ExecuteDown | PopupMenuFlags::NoMouseUpClose );
|
||||
|
||||
if ( pWin->IsDisposed() )
|
||||
|
@ -1220,7 +1220,7 @@ void Window::ImplInitAppFontData( vcl::Window* pWindow )
|
||||
tools::Rectangle aBoundingRgn( aCtrlRegion );
|
||||
tools::Rectangle aContentRgn( aCtrlRegion );
|
||||
if( pWindow->GetNativeControlRegion( ControlType::Editbox, ControlPart::Entire, aCtrlRegion,
|
||||
ControlState::ENABLED, aControlValue, OUString(),
|
||||
ControlState::ENABLED, aControlValue,
|
||||
aBoundingRgn, aContentRgn ) )
|
||||
{
|
||||
// comment: the magical +6 is for the extra border in bordered
|
||||
|
@ -103,19 +103,18 @@ namespace psp
|
||||
|
||||
OUString translateValue(
|
||||
const OUString& i_rKey,
|
||||
const OUString& i_rOption,
|
||||
const OUString& i_rValue
|
||||
const OUString& i_rOption
|
||||
) const;
|
||||
|
||||
OUString translateOption( const OUString& i_rKey,
|
||||
const OUString& i_rOption ) const
|
||||
{
|
||||
return translateValue( i_rKey, i_rOption, OUString() );
|
||||
return translateValue( i_rKey, i_rOption );
|
||||
}
|
||||
|
||||
OUString translateKey( const OUString& i_rKey ) const
|
||||
{
|
||||
return translateValue( i_rKey, OUString(), OUString() );
|
||||
return translateValue( i_rKey, OUString() );
|
||||
}
|
||||
};
|
||||
|
||||
@ -187,24 +186,18 @@ namespace psp
|
||||
|
||||
OUString PPDTranslator::translateValue(
|
||||
const OUString& i_rKey,
|
||||
const OUString& i_rOption,
|
||||
const OUString& i_rValue
|
||||
const OUString& i_rOption
|
||||
) const
|
||||
{
|
||||
OUString aResult;
|
||||
|
||||
OUStringBuffer aKey( i_rKey.getLength() + i_rOption.getLength() + i_rValue.getLength() + 2 );
|
||||
OUStringBuffer aKey( i_rKey.getLength() + i_rOption.getLength() + 2 );
|
||||
aKey.append( i_rKey );
|
||||
if( !i_rOption.isEmpty() || !i_rValue.isEmpty() )
|
||||
if( !i_rOption.isEmpty() )
|
||||
{
|
||||
aKey.append( ':' );
|
||||
aKey.append( i_rOption );
|
||||
}
|
||||
if( !i_rValue.isEmpty() )
|
||||
{
|
||||
aKey.append( ':' );
|
||||
aKey.append( i_rValue );
|
||||
}
|
||||
if( !aKey.isEmpty() )
|
||||
{
|
||||
OUString aK( aKey.makeStringAndClear() );
|
||||
|
@ -515,11 +515,8 @@ helpdatafileproxy::Hdf* Databases::getHelpDataFile( const OUString& Database,
|
||||
}
|
||||
|
||||
Reference< XCollator >
|
||||
Databases::getCollator( const OUString& Language,
|
||||
const OUString& System )
|
||||
Databases::getCollator( const OUString& Language )
|
||||
{
|
||||
(void)System;
|
||||
|
||||
OUString key = Language;
|
||||
|
||||
osl::MutexGuard aGuard( m_aMutex );
|
||||
@ -799,7 +796,7 @@ KeywordInfo* Databases::getKeyword( const OUString& Database,
|
||||
}
|
||||
|
||||
// sorting
|
||||
Reference< XCollator > xCollator = getCollator( Language,OUString());
|
||||
Reference< XCollator > xCollator = getCollator( Language );
|
||||
KeywordElementComparator aComparator( xCollator );
|
||||
std::sort(aVector.begin(),aVector.end(),aComparator);
|
||||
|
||||
|
@ -164,11 +164,8 @@ namespace chelp {
|
||||
/**
|
||||
* The following method returns the Collator for the given language-country combination
|
||||
*/
|
||||
|
||||
css::uno::Reference< css::i18n::XCollator >
|
||||
getCollator( const OUString& Language,
|
||||
const OUString& System ); // System not used by current implementation
|
||||
// // of XCollator
|
||||
getCollator( const OUString& Language );
|
||||
|
||||
/**
|
||||
* Returns the cascading style sheet used to format the HTML-output.
|
||||
|
@ -27,16 +27,15 @@ namespace cssu = com::sun::star::uno;
|
||||
namespace cssxc = com::sun::star::xml::crypto;
|
||||
|
||||
ElementCollector::ElementCollector(
|
||||
sal_Int32 nSecurityId,
|
||||
sal_Int32 nBufferId,
|
||||
cssxc::sax::ElementMarkPriority nPriority,
|
||||
bool bToModify,
|
||||
const css::uno::Reference< css::xml::crypto::sax::XReferenceResolvedListener >& xReferenceResolvedListener)
|
||||
:ElementMark(nSecurityId, nBufferId),
|
||||
:ElementMark(cssxc::sax::ConstOfSecurityId::UNDEFINEDSECURITYID, nBufferId),
|
||||
m_nPriority(nPriority),
|
||||
m_bToModify(bToModify),
|
||||
m_bAbleToNotify(false),
|
||||
m_bNotified(false),
|
||||
m_bAbleToNotify(false),
|
||||
m_bNotified(false),
|
||||
m_xReferenceResolvedListener(xReferenceResolvedListener)
|
||||
/****** ElementCollector/ElementCollector *************************************
|
||||
*
|
||||
|
@ -63,7 +63,6 @@ private:
|
||||
|
||||
public:
|
||||
ElementCollector(
|
||||
sal_Int32 nSecurityId,
|
||||
sal_Int32 nBufferId,
|
||||
css::xml::crypto::sax::ElementMarkPriority nPriority,
|
||||
bool bToModify,
|
||||
|
@ -815,7 +815,6 @@ sal_Int32 SAXEventKeeperImpl::createElementCollector(
|
||||
|
||||
ElementCollector* pElementCollector
|
||||
= new ElementCollector(
|
||||
cssxc::sax::ConstOfSecurityId::UNDEFINEDSECURITYID,
|
||||
nId,
|
||||
nPriority,
|
||||
bModifyElement,
|
||||
|
Loading…
x
Reference in New Issue
Block a user