From 80056d7ae2cbde97eb23dcf37307a6f3f8a29bdb Mon Sep 17 00:00:00 2001 From: Darrell Anderson Date: Fri, 13 Apr 2012 02:53:12 -0500 Subject: Fix inadvertent "TQ" changes. --- src/cite/ooo/interface.cpp | 60 +++++++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'src/cite') diff --git a/src/cite/ooo/interface.cpp b/src/cite/ooo/interface.cpp index b1cf69e..383ed1e 100644 --- a/src/cite/ooo/interface.cpp +++ b/src/cite/ooo/interface.cpp @@ -122,7 +122,7 @@ bool OOOHandler::Interface::connect(const std::string& host_, int port_, const s } // Query for the XUnoUrlResolver interface - Reference rResolver(rInstance, UNO_TQUERY); + Reference rResolver(rInstance, UNO_QUERY); if(!rResolver.is()) { DEBUG("Error: Couldn't instantiate com.sun.star.bridge.UnoUrlResolver service"); return false; @@ -145,7 +145,7 @@ bool OOOHandler::Interface::connect(const std::string& host_, int port_, const s return false; } - m_gsmgr = Reference(rInstance, UNO_TQUERY); + m_gsmgr = Reference(rInstance, UNO_QUERY); if(m_gsmgr.is()) { DEBUG("Connected successfully to office"); } else { @@ -180,16 +180,16 @@ bool OOOHandler::Interface::createDocument() { // get the desktop service using createInstance, returns an XInterface type Reference xInstance = m_gsmgr->createInstance(OUString::createFromAscii("com.sun.star.frame.Desktop")); - Reference desktop(xInstance, UNO_TQUERY); + Reference desktop(xInstance, UNO_QUERY); Reference writer = desktop->getCurrentComponent(); - Reference info(writer, UNO_TQUERY); + Reference info(writer, UNO_QUERY); if(info.is() && info->getImplementationName() == OUString::createFromAscii("SwXTextDocument")) { DEBUG("Document already open"); } else { DEBUG("Opening a new document"); //query for the XComponentLoader interface - Reference rComponentLoader(desktop, UNO_TQUERY); + Reference rComponentLoader(desktop, UNO_QUERY); if(!rComponentLoader.is()){ DEBUG("XComponentloader failed to instantiate"); return 0; @@ -203,16 +203,16 @@ bool OOOHandler::Interface::createDocument() { } //Manage many events with EventListener - Reference eventBroadcast(writer, UNO_TQUERY); + Reference eventBroadcast(writer, UNO_QUERY); m_listener = new EventListener(this); Reference xEventListener = static_cast(m_listener); eventBroadcast->addEventListener(xEventListener); - Reference controller = Reference(writer, UNO_TQUERY)->getCurrentController(); - m_cursor = Reference(controller, UNO_TQUERY)->getViewCursor(); - m_doc = Reference(writer, UNO_TQUERY); + Reference controller = Reference(writer, UNO_QUERY)->getCurrentController(); + m_cursor = Reference(controller, UNO_QUERY)->getViewCursor(); + m_doc = Reference(writer, UNO_QUERY); if(m_doc.is()) { - m_dsmgr = Reference(m_doc, UNO_TQUERY); + m_dsmgr = Reference(m_doc, UNO_QUERY); } return m_doc.is(); } @@ -231,12 +231,12 @@ bool OOOHandler::Interface::updateBibliography() { } void OOOHandler::Interface::createBibliography() { - Reference indexes(Reference(m_doc, UNO_TQUERY)->getDocumentIndexes(), UNO_TQUERY); + Reference indexes(Reference(m_doc, UNO_QUERY)->getDocumentIndexes(), UNO_QUERY); for(int i = 0; i < indexes->getCount(); ++i) { - Reference info(indexes->getByIndex(i), UNO_TQUERY); + Reference info(indexes->getByIndex(i), UNO_QUERY); if(info->supportsService(OUSTR("com.sun.star.text.Bibliography"))) { DEBUG("Found existing bibliography..."); - m_bib = Reference(indexes->getByIndex(i), UNO_TQUERY); + m_bib = Reference(indexes->getByIndex(i), UNO_QUERY); break; } } @@ -244,18 +244,18 @@ void OOOHandler::Interface::createBibliography() { if(!m_bib.is()) { DEBUG("Creating new bibliography..."); Reference text = m_doc->getText(); - Reference textRange(text->createTextCursor(), UNO_TQUERY); - Reference cursor(textRange, UNO_TQUERY); + Reference textRange(text->createTextCursor(), UNO_QUERY); + Reference cursor(textRange, UNO_QUERY); cursor->gotoEnd(false); text->insertControlCharacter(textRange, text::ControlCharacter::PARAGRAPH_BREAK, false); - m_bib = Reference(m_dsmgr->createInstance(OUSTR("com.sun.star.text.Bibliography")), UNO_TQUERY); - Reference textContent(m_bib, UNO_TQUERY); + m_bib = Reference(m_dsmgr->createInstance(OUSTR("com.sun.star.text.Bibliography")), UNO_QUERY); + Reference textContent(m_bib, UNO_QUERY); text->insertTextContent(textRange, textContent, false); } } bool OOOHandler::Interface::insertCitations(Cite::Map& fields) { - Reference entry(m_dsmgr->createInstance(OUString::createFromAscii("com.sun.star.text.TextField.Bibliography")), UNO_TQUERY); + Reference entry(m_dsmgr->createInstance(OUString::createFromAscii("com.sun.star.text.TextField.Bibliography")), UNO_QUERY); if(!entry.is()) { DEBUG("Interface::insertCitation - can't create TextField"); return false; @@ -266,12 +266,12 @@ bool OOOHandler::Interface::insertCitations(Cite::Map& fields) { values[i] = propValue(it->first, it->second); std::cout << "Setting " << OU2O(values[i].Name) << " = " << it->second << std::endl; } - Reference(entry, UNO_TQUERY)->setPropertyValue(OUSTR("Fields"), Any(values)); + Reference(entry, UNO_QUERY)->setPropertyValue(OUSTR("Fields"), Any(values)); Reference text = m_doc->getText(); - Reference cursor = text->createTextCursorByRange(Reference(m_cursor, UNO_TQUERY)); - Reference textRange(cursor, UNO_TQUERY); - Reference textContent(entry, UNO_TQUERY); + Reference cursor = text->createTextCursorByRange(Reference(m_cursor, UNO_QUERY)); + Reference textRange(cursor, UNO_QUERY); + Reference textContent(entry, UNO_QUERY); text->insertTextContent(textRange, textContent, false); return true; } @@ -336,13 +336,13 @@ bool OOOHandler::Interface::insertRecords(Cite::Map& fields) { return false; } - Reference rowSet(interface, UNO_TQUERY); + Reference rowSet(interface, UNO_QUERY); if(!rowSet.is()) { DEBUG("Could not create rowset interface"); return false; } - Reference props(rowSet, UNO_TQUERY); + Reference props(rowSet, UNO_QUERY); props->setPropertyValue(OUSTR("DataSourceName"), Any(OUSTR("Bibliography"))); props->setPropertyValue(OUSTR("CommandType"), Any(sdb::CommandType::COMMAND)); OUString s = OUSTR("SELECT COUNT(*) FROM \"biblio\" WHERE identifier='") + O2OU(fields["Identifier"]) + OUSTR("'"); @@ -360,7 +360,7 @@ bool OOOHandler::Interface::insertRecords(Cite::Map& fields) { return false; } - Reference row(rowSet, UNO_TQUERY); + Reference row(rowSet, UNO_QUERY); int count = 0; if(rowSet->next()) { count = row->getString(1).toInt32(); @@ -390,12 +390,12 @@ bool OOOHandler::Interface::insertRecords(Cite::Map& fields) { return false; } - Reference resultSet(rowSet, UNO_TQUERY); - Reference mdSupplier(resultSet, UNO_TQUERY); + Reference resultSet(rowSet, UNO_QUERY); + Reference mdSupplier(resultSet, UNO_QUERY); Reference metaData = mdSupplier->getMetaData(); - Reference rowUpdate(rowSet, UNO_TQUERY); - Reference update(rowSet, UNO_TQUERY); + Reference rowUpdate(rowSet, UNO_QUERY); + Reference update(rowSet, UNO_QUERY); if(count > 0) { resultSet->last(); } else { @@ -425,6 +425,6 @@ bool OOOHandler::Interface::insertRecords(Cite::Map& fields) { update->insertRow(); } - Reference(rowSet, UNO_TQUERY)->dispose(); + Reference(rowSet, UNO_QUERY)->dispose(); return true; } -- cgit v1.2.1